@@ -19,12 +19,11 @@ export interface CodexEffectiveRuntime {
1919 readonly revision : string ;
2020}
2121const decodeSettings = Schema . decodeSync ( CodexSettings ) ;
22- const managedCodexLaunchArgs = ( profileKey : string , command : string , args : ReadonlyArray < string > ) =>
22+ const managedCodexLaunchArgs = ( command : string , args : ReadonlyArray < string > ) =>
2323 [
24- `model_provider="openai_token_sharing_${ profileKey } "` ,
25- // Codex recursively merges -c tables. A profile-specific key avoids inheriting
26- // auth fields or headers from a shared openai_token_sharing provider.
27- `model_providers.openai_token_sharing_${ profileKey } ={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}}` ,
24+ 'model_provider="openai_token_sharing"' ,
25+ // Codex persists this provider ID in rollouts and needs it unchanged to resume.
26+ `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}}` ,
2827 "features.api_key_model_discovery=true" ,
2928 "features.multi_agent=false" ,
3029 "features.multi_agent_v2=false" ,
@@ -129,7 +128,7 @@ export const makeCodexManagedRuntime = Effect.fn("makeCodexManagedRuntime")(func
129128 setupMode : "managed" ,
130129 binaryPath : executable . executablePath ,
131130 homePath,
132- launchArgs : managedCodexLaunchArgs ( profileKey , invocation . command , authArgs ) ,
131+ launchArgs : managedCodexLaunchArgs ( invocation . command , authArgs ) ,
133132 } ) ,
134133 environment,
135134 revision : profileKey ,
0 commit comments