@@ -132,9 +132,26 @@ describe("codex-responses buildRequest", () => {
132132 const body = JSON . parse (
133133 adapter ( ) . buildRequest ( [ userTurn ( "x" ) ] , "gpt-5-codex" , options ) . body ,
134134 ) as Record < string , unknown > ;
135- expect ( body [ "reasoning" ] ) . toEqual ( { effort : "high" , summary : "auto" } ) ;
135+ expect ( body [ "reasoning" ] ) . toEqual ( { effort : "high" } ) ;
136136 } ) ;
137137
138+ // CL-6893: ChatGPT Codex rejects reasoning.summary "auto" for the gpt-5.6-terra /
139+ // gpt-5.3-codex family (HTTP 400). Codex CLI catalog default is none — omit summary
140+ // (effort only) so Terra/Luna request bodies never send summary:"auto".
141+ test . each ( [ "gpt-5.6-terra" , "gpt-5.6-luna" ] as const ) (
142+ "omits reasoning.summary auto for %s (CL-6893)" ,
143+ ( model ) => {
144+ const options : InferenceOptions = {
145+ providerOptions : { ...baseOptions . providerOptions , reasoning_effort : "high" } ,
146+ } ;
147+ const body = JSON . parse (
148+ adapter ( ) . buildRequest ( [ userTurn ( "x" ) ] , model , options ) . body ,
149+ ) as Record < string , unknown > ;
150+ expect ( body [ "reasoning" ] ) . toEqual ( { effort : "high" } ) ;
151+ expect ( body [ "reasoning" ] ) . not . toHaveProperty ( "summary" ) ;
152+ } ,
153+ ) ;
154+
138155 test ( "roundtrips encrypted reasoning signature from prior assistant turn into Responses reasoning item" , ( ) => {
139156 // Prior turn's assistant content included a thinking block with signature.
140157 // buildRequest must emit the "reasoning" item (with encrypted_content) before
0 commit comments