GrepBoard/Manuals
605 manuals ·

Fix Claude API 400 "thinking.type.enabled is not supported"

·Tested on Claude API official docs · 2026-10·Test scope ↓·6 steps

After moving to Claude 4.7 or later, a budget_tokens request returns 400. Switch thinking to adaptive and set depth with output_config.effort.

text
"thinking.type.enabled" is not supported for this model. Use "thinking.type.adaptive" and "output_config.effort" to control thinking behavior.

You sent thinking: {"type": "enabled", "budget_tokens": N} to a model that no longer has that mode (extended thinking). The status is 400 and the error type is invalid_request_error. It usually appears when only the model name was updated and the thinking block was left as is.

If you saw this in Claude Code or the Agent SDK, start here. It appears as API Error: 400 ... followed by the text above. You did not write the request JSON, so there is no request to edit. The official Claude Code error reference says the cause is that your Claude Code version is older than the minimum for the selected model, so the CLI sent a thinking configuration the model no longer accepts. The fix:

  • Run claude update and restart Claude Code. The documented minimums are v2.1.111 for Opus 4.7, v2.1.154 for Opus 4.8, v2.1.197 for Sonnet 5, v2.1.219 for Opus 5, v2.1.280 for Opus 5.5, and v2.1.284 for Sonnet 5.5. The docs list no minimum for other models there, so none is given here.
  • On the stable release channel, updating only moves you to the newest stable release, which can still be older than these versions. Switch to the latest channel, then update.
  • If you cannot upgrade, run /model and pick Opus 4.6 or Sonnet 4.6.
  • In the Agent SDK, upgrade the SDK package instead: Opus 4.8 needs TypeScript SDK v0.3.154 or Python SDK v0.2.88 or later, Sonnet 5 needs TypeScript SDK v0.3.197, Opus 5 needs v0.3.219, Opus 5.5 needs v0.3.280, and Sonnet 5.5 needs v0.3.284 or later.

In that case you can skip steps 1 to 6 below. If the error comes from code that calls the API directly, start at step 1.

[1] Check which side your model is on. The docs say extended thinking is deprecated on Claude 4.6 models but requests still succeed, while Claude 4.7 and later models do not support it and reject the request with a 400. The per-model table in the docs, shortened:

ModelSupported modes"enabled"
Opus 4.7 · Opus 4.8 · Sonnet 5 · Opus 5adaptive only400
Opus 5.5 · Sonnet 5.5 · Haiku 5.5 · Fable 5.1adaptive only (Sonnet 5.5 also between_tools)400
Opus 4.6 · Sonnet 4.6adaptive, extended (deprecated)accepted
Opus 4.5 · Sonnet 4.5 · Haiku 4.5extended onlyaccepted

Turning thinking off differs by model. Per the same docs, Opus 5.5 and Fable 5.1 cannot turn it off ("disabled" also returns 400), Sonnet 5.5 takes "between_tools" instead of "disabled", and Haiku 5.5 accepts "disabled" only at effort high or below. Models not in this table (the Mythos line, for example) are in the full table in the docs. If your error starts with "thinking.type.enabled", this is the case.

[2] Change the request. The rule: delete budget_tokens, set thinking.type to adaptive, and set depth with output_config.effort. The docs example:

json
{  "model": "claude-sonnet-4-6",  "max_tokens": 16000,  "thinking": {    "type": "enabled",    "budget_tokens": 10000  }}

becomes:

json
{  "model": "claude-sonnet-4-6",  "max_tokens": 16000,  "thinking": {    "type": "adaptive"  },  "output_config": {    "effort": "high"  }}

The default effort differs by model. Per the docs, Opus 5.5 and Haiku 5.5 default to "medium" and other models that support effort default to "high". Passing the default explicitly is the same as omitting it.

[3] Expect different behavior. A fixed budget thinks on every request. With adaptive thinking the model decides whether and how much to think, and at lower effort it may skip thinking on easy inputs. The docs say you can drop the interleaved-thinking-2025-05-14 beta header after migrating.

[4] An empty thinking field is expected. Newer models default display to "omitted", so you get a signature without text. To get summary text, add display: "summarized" to the thinking config. An empty block must still be sent back unchanged on the next request.

[5] Check max_tokens and caching. Thinking tokens count toward max_tokens, so if replies get cut off, raise max_tokens or lower effort. Changing the thinking mode or effort changes the cached prefix, so the first request afterward can show cache_read_input_tokens of 0.

[6] Know the reverse error. Sending adaptive to an extended-only model (Opus 4.5, Sonnet 4.5, Haiku 4.5) returns this 400. Keep enabled and budget_tokens there.

text
adaptive thinking is not supported on this model

Another 400 from the same errors page is covered in Fix Claude API 400 "does not support assistant message prefill". If replies stop mid-way, see Check stop_reason to Tell If a Claude Response Was Cut Off.

#claude#api#thinking#troubleshooting