From e4f2f092aa0a9780909e0f76f936252a5dd1ddd9 Mon Sep 17 00:00:00 2001 From: jif-oai Date: Tue, 24 Mar 2026 12:53:38 +0000 Subject: [PATCH] chore: force file auth for `0.0.0` --- codex-rs/core/src/config/mod.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/codex-rs/core/src/config/mod.rs b/codex-rs/core/src/config/mod.rs index cbbd023905..95e0bce32e 100644 --- a/codex-rs/core/src/config/mod.rs +++ b/codex-rs/core/src/config/mod.rs @@ -2610,11 +2610,22 @@ impl Config { commit_attribution, // The config.toml omits "_mode" because it's a config file. However, "_mode" // is important in code to differentiate the mode from the store implementation. - cli_auth_credentials_store_mode: cfg.cli_auth_credentials_store.unwrap_or_default(), + cli_auth_credentials_store_mode: if env!("CARGO_PKG_VERSION") == "0.0.0" + && cfg.cli_auth_credentials_store.unwrap_or_default() + != AuthCredentialsStoreMode::Ephemeral + { + AuthCredentialsStoreMode::File + } else { + cfg.cli_auth_credentials_store.unwrap_or_default() + }, mcp_servers, // The config.toml omits "_mode" because it's a config file. However, "_mode" // is important in code to differentiate the mode from the store implementation. - mcp_oauth_credentials_store_mode: cfg.mcp_oauth_credentials_store.unwrap_or_default(), + mcp_oauth_credentials_store_mode: if env!("CARGO_PKG_VERSION") == "0.0.0" { + OAuthCredentialsStoreMode::File + } else { + cfg.mcp_oauth_credentials_store.unwrap_or_default() + }, mcp_oauth_callback_port: cfg.mcp_oauth_callback_port, mcp_oauth_callback_url: cfg.mcp_oauth_callback_url.clone(), model_providers,