mirror of
https://github.com/openai/codex.git
synced 2026-12-04 00:51:02 +00:00
Enable the gateway setup wizard by default (#64791)
## 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
This commit is contained in:
@@ -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()]);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user