mirror of
https://github.com/openai/codex.git
synced 2026-04-28 16:45:54 +00:00
Stop using AuthManager as the source of codex_home (#8846)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user