diff --git a/apps/server/src/provider/CodexManagedRuntime.test.ts b/apps/server/src/provider/CodexManagedRuntime.test.ts index 2c697f8fa8531..2c38ff95dee0a 100644 --- a/apps/server/src/provider/CodexManagedRuntime.test.ts +++ b/apps/server/src/provider/CodexManagedRuntime.test.ts @@ -145,7 +145,7 @@ it.live.each( arg.startsWith("model_providers.openai_token_sharing="), )!; assert.include(provider, 'base_url="https://api.openai.com/v1"'); - assert.include(provider, 'model_catalog_url="https://api.openai.com/v1/models"'); + assert.notInclude(provider, "model_catalog_url"); assert.notInclude(provider, "env_key"); assert.include(provider, "refresh_interval_ms=0"); // regression: #16132 Codex fetches each token through this helper, so a running diff --git a/apps/server/src/provider/CodexManagedRuntime.ts b/apps/server/src/provider/CodexManagedRuntime.ts index 3704c919c2791..d72a089c74fa4 100644 --- a/apps/server/src/provider/CodexManagedRuntime.ts +++ b/apps/server/src/provider/CodexManagedRuntime.ts @@ -23,7 +23,8 @@ const managedCodexLaunchArgs = (command: string, args: ReadonlyArray) => [ 'model_provider="openai_token_sharing"', // Codex persists this provider ID in rollouts and needs it unchanged to resume. - `model_providers.openai_token_sharing={name="OpenAI Token Sharing",base_url="https://api.openai.com/v1",model_catalog_url="https://api.openai.com/v1/models",wire_api="responses",requires_openai_auth=false,supports_websockets=false,auth={command=${JSON.stringify(command)},args=${JSON.stringify(args)},timeout_ms=${COMMAND_TIMEOUT_MS},refresh_interval_ms=0}}`, + // An explicit catalog URL disables bundled metadata fallback when discovery fails. + `model_providers.openai_token_sharing={name="OpenAI Token Sharing",base_url="https://api.openai.com/v1",wire_api="responses",requires_openai_auth=false,supports_websockets=false,auth={command=${JSON.stringify(command)},args=${JSON.stringify(args)},timeout_ms=${COMMAND_TIMEOUT_MS},refresh_interval_ms=0}}`, "features.api_key_model_discovery=true", "features.multi_agent=false", "features.multi_agent_v2=false",