@@ -177,15 +177,15 @@ def test_force_adaptive_thinking_emits_adaptive_schema_for_opus_4_8():
177177 out = select_chat_options (llm , user_kwargs = {}, has_tools = True )
178178
179179 assert out .get ("thinking" ) == {"type" : "adaptive" , "display" : "summarized" }
180- assert out .get ("extra_body " ) == {"output_config" : { " effort" : "high" } }
180+ assert out .get ("output_config " ) == {"effort" : "high" }
181181 assert out .get ("max_tokens" ) == 4096
182182 assert "reasoning_effort" not in out
183183 assert "temperature" not in out
184184 assert "top_p" not in out
185185 assert "top_k" not in out
186186
187187
188- def test_force_adaptive_thinking_merges_into_existing_extra_body ():
188+ def test_force_adaptive_thinking_preserves_existing_extra_body ():
189189 llm = DummyLLM (
190190 model = "claude-opus-4-7" ,
191191 reasoning_effort = "medium" ,
@@ -194,10 +194,8 @@ def test_force_adaptive_thinking_merges_into_existing_extra_body():
194194 )
195195 out = select_chat_options (llm , user_kwargs = {}, has_tools = True )
196196
197- assert out .get ("extra_body" ) == {
198- "return_token_ids" : True ,
199- "output_config" : {"effort" : "medium" },
200- }
197+ assert out .get ("extra_body" ) == {"return_token_ids" : True }
198+ assert out .get ("output_config" ) == {"effort" : "medium" }
201199
202200
203201def test_force_adaptive_thinking_noop_when_model_not_supported ():
@@ -209,7 +207,7 @@ def test_force_adaptive_thinking_noop_when_model_not_supported():
209207 out = select_chat_options (llm , user_kwargs = {}, has_tools = True )
210208
211209 assert "thinking" not in out
212- assert "output_config" not in ( out . get ( "extra_body" ) or {})
210+ assert "output_config" not in out
213211 assert out .get ("reasoning_effort" ) == "high"
214212
215213
@@ -222,4 +220,4 @@ def test_force_adaptive_thinking_disabled_by_default_for_opus_4_8():
222220
223221 assert "thinking" not in out
224222 assert out .get ("reasoning_effort" ) == "high"
225- assert "output_config" not in ( out . get ( "extra_body" ) or {})
223+ assert "output_config" not in out
0 commit comments