feat: codex app-server --default-chatgpt-proxy-auth

This commit is contained in:
Michael Bolin
2026-01-30 15:08:59 -08:00
parent d59685f6d4
commit 88340071dd
19 changed files with 457 additions and 72 deletions
+18
View File
@@ -283,6 +283,10 @@ struct AppServerCommand {
/// See https://developers.openai.com/codex/config-advanced/#metrics for more details.
#[arg(long = "analytics-default-enabled")]
analytics_default_enabled: bool,
/// Seed ChatGPT proxy auth (tokenless) on startup when no auth is present.
#[arg(long = "default-chatgpt-proxy-auth")]
default_chatgpt_proxy_auth: bool,
}
#[derive(Debug, clap::Subcommand)]
@@ -535,6 +539,7 @@ async fn cli_main(codex_linux_sandbox_exe: Option<PathBuf>) -> anyhow::Result<()
root_config_overrides,
codex_core::config_loader::LoaderOverrides::default(),
app_server_cli.analytics_default_enabled,
app_server_cli.default_chatgpt_proxy_auth,
)
.await?;
}
@@ -1263,6 +1268,19 @@ mod tests {
assert!(app_server.analytics_default_enabled);
}
#[test]
fn app_server_default_chatgpt_proxy_auth_disabled_without_flag() {
let app_server = app_server_from_args(["codex", "app-server"].as_ref());
assert!(!app_server.default_chatgpt_proxy_auth);
}
#[test]
fn app_server_default_chatgpt_proxy_auth_enabled_with_flag() {
let app_server =
app_server_from_args(["codex", "app-server", "--default-chatgpt-proxy-auth"].as_ref());
assert!(app_server.default_chatgpt_proxy_auth);
}
#[test]
fn features_enable_parses_feature_name() {
let cli = MultitoolCli::try_parse_from(["codex", "features", "enable", "unified_exec"])