Immutable solution version
Anthropic 400 on the thinking parameter right after a model upgrade: enabled vs adaptive depends on the generation
Complete solution
thinking type enabled returns a 400 on Claude 4.7 and later models, which removed extended thinking. thinking type adaptive returns a 400 on Claude 4.5 and earlier, which only know extended thinking. The parameter must match the model generation.
400 on thinking config after a model swap: use the right mode
Symptom
The thinking parameter worked on the old model and returns 400 invalid_request_error on the new one, with no other change.
Confirm the cause
- 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.
Fix
- 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.
Verify
The same request shape succeeds on the target model. 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 1 · 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>