mirror of
https://github.com/openai/codex.git
synced 2026-11-25 23:30:49 +00:00
Enable API-key model discovery by default (#49807)
## What changed - Mark `api_key_model_discovery` as stable and enable it by default, while preserving explicit user opt-outs and provider catalog requirements. - Fall back to bundled models when discovery is disabled at runtime, including when a remote catalog has already been loaded. ## Testing Extend model-list coverage for default enablement, app overrides, and user configuration precedence. Add a regression assertion that runtime opt-outs hide loaded catalogs without additional fetches, and update daemon compatibility tests for the new default. GitOrigin-RevId: feaf732757792cc58063f21a5327d0e633f079f4
This commit is contained in:
@@ -210,12 +210,10 @@ async fn daemon_startup(command: &str) -> Result<()> {
|
||||
steps.push_back(("GPT-5.6-Terra", b"\x14"));
|
||||
"Runningwithoutthesharedbackgroundserver:thisWindowslauncher"
|
||||
} else if mismatch {
|
||||
args.extend(if persisted {
|
||||
["--disable".into(), "api_key_model_discovery".into()]
|
||||
} else if disabling {
|
||||
args.extend(if disabling && !persisted {
|
||||
["--disable".into(), "auth_elicitation".into()]
|
||||
} else {
|
||||
["--enable".into(), "api_key_model_discovery".into()]
|
||||
["--disable".into(), "api_key_model_discovery".into()]
|
||||
});
|
||||
let input: &[u8] = match command {
|
||||
"mismatch-cancel" => b"\x03",
|
||||
@@ -325,7 +323,7 @@ async fn daemon_startup(command: &str) -> Result<()> {
|
||||
let previous_pid = existing_daemon.as_ref().context("missing original daemon PID")?;
|
||||
ensure!((fs::read(&pid_file)? != *previous_pid) == restart);
|
||||
if command == "mismatch-cancel" {
|
||||
ensure!(text.contains("Cannotusethesharedbackgroundserver:Thissessionrequiresapi_key_model_discoverytobeenabled."));
|
||||
ensure!(text.contains("Cannotusethesharedbackgroundserver:Thissessionrequiresapi_key_model_discoverytobedisabled."));
|
||||
} else {
|
||||
ensure!(text.contains("Server:Localbackgroundserver") == restart);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user