From 945cf1400b04cdd6a1e4079ac13c2acc72c0a8bf Mon Sep 17 00:00:00 2001 From: alexsong-oai Date: Mon, 30 Nov 2026 18:43:54 +0000 Subject: [PATCH] Enable the gateway setup wizard by default (#64791) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What changed Offer “Use a custom provider or gateway” in eligible terminal sign-in flows without requiring users to set `features.gateway_setup_wizard = true`. ## Testing Exercise the default in the gateway onboarding test, which verifies that the selected gateway authenticates before receiving the first chat request. GitOrigin-RevId: e140b13dc12ebe9b35f37711d5b088fd02a0707c --- codex-rs/cli/tests/daemon_startup.rs | 4 ++-- codex-rs/features/src/lib.rs | 2 +- codex-rs/tui/src/lib_tests.rs | 21 +++++++++---------- codex-rs/tui/tests/suite/provider_defaults.rs | 1 - 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/codex-rs/cli/tests/daemon_startup.rs b/codex-rs/cli/tests/daemon_startup.rs index 577ebd8f50..18e5ecf631 100644 --- a/codex-rs/cli/tests/daemon_startup.rs +++ b/codex-rs/cli/tests/daemon_startup.rs @@ -217,7 +217,7 @@ async fn daemon_startup(command: &str) -> Result<()> { if command == "discovered" { "tui.status_line=[\"model\",\"thread-id\",\"thread-name\"]\nfeatures.daemon_auto_start=false" } else if bedrock_onboarding { - "features.gcp_setup_wizard=false" + "features.gcp_setup_wizard=false\nfeatures.gateway_setup_wizard=false" } else { "" }, @@ -406,7 +406,7 @@ async fn daemon_startup(command: &str) -> Result<()> { steps.push_back(("Continuewithdetectedcredentials", b"\r")); "provider:amazon-bedrock-runtime" } else if bedrock_onboarding { - // With GCP disabled, only Bedrock makes the sign-in menu advertise another provider. + // Only Bedrock should make the sign-in menu advertise another provider in this test. "UseanAPIkeyoranotherprovider" } else { args.extend([command.into(), "--strict-config".into()]); diff --git a/codex-rs/features/src/lib.rs b/codex-rs/features/src/lib.rs index f04f55b5ea..6f3278a833 100644 --- a/codex-rs/features/src/lib.rs +++ b/codex-rs/features/src/lib.rs @@ -2493,7 +2493,7 @@ pub const FEATURES: &[FeatureSpec] = &[ id: Feature::GatewaySetupWizard, key: "gateway_setup_wizard", stage: Stage::Stable, - default_enabled: false, + default_enabled: true, }, FeatureSpec { id: Feature::Personality, diff --git a/codex-rs/tui/src/lib_tests.rs b/codex-rs/tui/src/lib_tests.rs index 4ce8dcda58..bf78dc4630 100644 --- a/codex-rs/tui/src/lib_tests.rs +++ b/codex-rs/tui/src/lib_tests.rs @@ -83,6 +83,12 @@ async fn provider_setup_wizards_require_eligible_onboarding() -> color_eyre::Res auth_token: None, }; let enabled = "[features]\nbedrock_setup_wizard = true\ngcp_setup_wizard = true\ngateway_setup_wizard = true\n"; + let wizards = [ + Feature::BedrockSetupWizard, + Feature::GcpSetupWizard, + Feature::GatewaySetupWizard, + ]; + let defaults = wizards.map(Feature::default_enabled); for (label, config_toml, login_status, target, expected) in [ ( @@ -90,7 +96,7 @@ async fn provider_setup_wizards_require_eligible_onboarding() -> color_eyre::Res "", LoginStatus::NotAuthenticated, AppServerTarget::Embedded, - [true, false, false], + defaults, ), ( "explicitly disabled", @@ -101,7 +107,7 @@ async fn provider_setup_wizards_require_eligible_onboarding() -> color_eyre::Res ), ( "only GCP enabled", - "[features]\nbedrock_setup_wizard = false\ngcp_setup_wizard = true\n", + "[features]\nbedrock_setup_wizard = false\ngcp_setup_wizard = true\ngateway_setup_wizard = false\n", LoginStatus::NotAuthenticated, AppServerTarget::Embedded, [false, true, false], @@ -125,7 +131,7 @@ async fn provider_setup_wizards_require_eligible_onboarding() -> color_eyre::Res "model_provider = \"openai\"\n", LoginStatus::NotAuthenticated, AppServerTarget::Embedded, - [true, false, false], + defaults, ), ( "explicit OpenAI provider with wizards enabled", @@ -189,14 +195,7 @@ gateway_setup_wizard = true let codex_home = TempDir::new()?; std::fs::write(codex_home.path().join("config.toml"), config_toml)?; let config = build_config(&codex_home).await?; - for (feature, expected) in [ - Feature::BedrockSetupWizard, - Feature::GcpSetupWizard, - Feature::GatewaySetupWizard, - ] - .into_iter() - .zip(expected) - { + for (feature, expected) in wizards.into_iter().zip(expected) { assert_eq!( should_show_provider_setup_wizard( login_status, diff --git a/codex-rs/tui/tests/suite/provider_defaults.rs b/codex-rs/tui/tests/suite/provider_defaults.rs index 2411ad3a92..eaa1d9101b 100644 --- a/codex-rs/tui/tests/suite/provider_defaults.rs +++ b/codex-rs/tui/tests/suite/provider_defaults.rs @@ -135,7 +135,6 @@ forced_login_method = "api" cli_auth_credentials_store = "file" suppress_unstable_features_warning = true [features] -gateway_setup_wizard = true bedrock_setup_wizard = false gcp_setup_wizard = false api_key_model_discovery = false