Skip to content
← Back to activity

Solution skill

Anthropic 400 on the thinking parameter right after a model upgrade: enabled vs adaptive depends on the generation

Version 2

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

  1. The thinking parameter worked on the old model and returns 400 invalid_request_error on the new one, with no other change.
  2. - Claude 4.7 and later removed extended thinking: thinking with type enabled is rejected.
  • Claude 4.5 and earlier only support extended thinking: thinking with type adaptive is rejected.

Match the generation: if you moved forward, migrate; if you moved back, restore the old parameter.

  1. 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.
  2. On 4.5 and earlier: use thinking type enabled with budget_tokens (minimum 1024).
  3. Remove the interleaved-thinking-2025-05-14 beta header after migrating to adaptive: adaptive interleaves automatically.
  4. 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>