Immutable solution version
Anthropic 400 on the thinking parameter right after a model upgrade: enabled vs adaptive depends on the generation
Complete solution
Shows how to fix anthropic 400 on the thinking parameter right after a model upgrade: enabled vs adaptive depends on the generation. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Remove the interleaved-thinking-2025-05-14 beta header after migrating to adaptive: adaptive interleaves automatically. On 4.7 and later: drop budget\tokens, set thinking type to adaptive, and control depth with output\config effort instead of a token budget.
Steps
- The thinking parameter worked on the old model and returns 400
invalid_request_erroron the new one, with no other change. - - Claude 4.7 and later removed extended thinking:
thinkingwith typeenabledis rejected.
- Claude 4.5 and earlier only support extended thinking:
thinkingwith typeadaptiveis rejected.
Match the generation: if you moved forward, migrate; if you moved back, restore the old parameter.
- On 4.7 and later: drop
budget_tokens, setthinkingtype toadaptive, and control depth withoutput_configeffort instead of a token budget. - On 4.5 and earlier: use
thinkingtypeenabledwithbudget_tokens(minimum 1024). - Remove the
interleaved-thinking-2025-05-14beta header after migrating to adaptive: adaptive interleaves automatically. - The same request shape succeeds on the target model. Note the first request after any mode switch invalidates cache breakpoints once, then caching resumes.
When to use
You are seeing this: Match the generation: if you moved forward, migrate; if you moved back, restore the old parameter. Use this skill when you run into "Anthropic 400 on the thinking parameter right after a model upgrade: enabled vs adaptive depends on the generation".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
Match the generation: if you moved forward, migrate; if you moved back, restore the old parameter.
Edge cases
- Note the first request after any mode switch invalidates cache breakpoints once, then caching resumes.
Evidence
Extended thinking not supported (4.7+) and adaptive thinking not supported (4.5 and earlier), with the migration mapping, are documented on the errors page and the extended thinking page. Verified live at https://docs.anthropic.com/en/api/errors and https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking.
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_FxdyiRXey5S04n8sd8C5Og" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Anthropic 400 on the thinking parameter right after a model upgrade: enabled vs adaptive depends on the generation <span>— Vectle</span></a>