Stop using AuthManager as the source of codex_home (#8846)

This commit is contained in:
pakrym-oai
2026-01-07 10:56:20 -08:00
committed by GitHub
parent c31960b13a
commit 018de994b0
13 changed files with 79 additions and 47 deletions

View File

@@ -574,7 +574,11 @@ async fn prefers_apikey_when_config_prefers_apikey_even_with_chatgpt_tokens() {
Ok(None) => panic!("No CodexAuth found in codex_home"),
Err(e) => panic!("Failed to load CodexAuth: {e}"),
};
let thread_manager = ThreadManager::new(auth_manager, SessionSource::Exec);
let thread_manager = ThreadManager::new(
codex_home.path().to_path_buf(),
auth_manager,
SessionSource::Exec,
);
let NewThread { thread: codex, .. } = thread_manager
.start_thread(config)
.await

View File

@@ -320,6 +320,7 @@ async fn remote_models_preserve_builtin_presets() -> Result<()> {
..built_in_model_providers()["openai"].clone()
};
let manager = ModelsManager::with_provider(
codex_home.path().to_path_buf(),
codex_core::auth::AuthManager::from_auth_for_testing(auth),
provider,
);
@@ -377,6 +378,7 @@ async fn remote_models_hide_picker_only_models() -> Result<()> {
..built_in_model_providers()["openai"].clone()
};
let manager = ModelsManager::with_provider(
codex_home.path().to_path_buf(),
codex_core::auth::AuthManager::from_auth_for_testing(auth),
provider,
);