@@ -112,24 +112,26 @@ export class OpenAiNativeCodexHandler extends BaseProvider {
112112 try {
113113 raw = await fs . readFile ( explicitPath , "utf8" )
114114 } catch ( e : any ) {
115- throw new Error (
116- t ( "common:errors.openaiNativeCodex.oauthReadFailed" , {
117- path : explicitPath ,
118- error : e ?. message || String ( e ) ,
119- } ) ,
120- )
115+ const base = t ( "common:errors.openaiNativeCodex.oauthReadFailed" , {
116+ path : explicitPath ,
117+ error : e ?. message || String ( e ) ,
118+ } )
119+ const tip =
120+ " Tip: Authenticate with the Codex CLI to generate auth.json (defaults to ~/.codex/auth.json), then retry."
121+ throw new Error ( base + tip )
121122 }
122123
123124 let j : any
124125 try {
125126 j = JSON . parse ( raw )
126127 } catch ( e : any ) {
127- throw new Error (
128- t ( "common:errors.openaiNativeCodex.oauthParseFailed" , {
129- path : explicitPath ,
130- error : e ?. message || String ( e ) ,
131- } ) ,
132- )
128+ const base = t ( "common:errors.openaiNativeCodex.oauthParseFailed" , {
129+ path : explicitPath ,
130+ error : e ?. message || String ( e ) ,
131+ } )
132+ const tip =
133+ " Tip: Ensure the file is valid JSON or re-authenticate via the Codex CLI to regenerate auth.json."
134+ throw new Error ( base + tip )
133135 }
134136
135137 const tokens = ( j ?. tokens as any ) || { }
@@ -277,8 +279,8 @@ export class OpenAiNativeCodexHandler extends BaseProvider {
277279 metadata ?: ApiHandlerCreateMessageMetadata ,
278280 ) {
279281 // For Codex provider:
280- // - Regular "gpt-5" should default to minimal reasoning unless explicitly overridden in settings.
281- // - The "gpt-5- codex" variant should NOT force minimal; use provided/default effort.
282+ // - Use the model's default reasoning effort (currently "medium") unless explicitly overridden in settings.
283+ // - Both "gpt-5" and "gpt-5- codex" follow the provided/default effort without forcing "minimal" .
282284 let effectiveEffort : ReasoningEffortWithMinimal | undefined = reasoningEffort
283285
284286 const body : any = {
0 commit comments