Blog

Claude Code "thinking.type.enabled is not supported" and Other 400 Thinking Errors

Short answer

An API Error: 400 that mentions thinking means the thinking settings in Claude Code's request don't match what the model accepts. Find your message below:

Message contains What it means First thing to try
"thinking.type.enabled" is not supported for this model Claude Code sent the old fixed-budget thinking mode to a model that only accepts adaptive thinking claude update
adaptive thinking is not supported on this model The reverse: adaptive thinking reached a model that only supports the fixed budget Check which model actually serves the request
Effort '...' isn't available with thinking turned off Thinking is off and effort is above high /effort high, or turn thinking back on
max_tokens must be greater than thinking.budget_tokens The thinking budget leaves no room for the answer Raise CLAUDE_CODE_MAX_OUTPUT_TOKENS or lower MAX_THINKING_TOKENS
thinking blocks ... cannot be modified The conversation history doesn't match what the API returned /rewind
Invalid data in redacted_thinking block An earlier turn carries a thinking block the API won't accept claude update, then /clear if it persists

These come from the Claude Code error reference and Anthropic's thinking troubleshooting guide. If you use a gateway with its own model names, read the gateway section below too.

Which models accept which thinking settings

Claude models now use two thinking modes. Adaptive thinking (thinking: {type: "adaptive"}) lets the model decide how much to think, steered by an effort level. Extended thinking is the older manual mode with a fixed budget_tokens. According to Anthropic's guide:

Models Thinking modes thinking.type rejected with 400
Fable 5.1, Fable 5, Opus 5.5, Opus 5, Opus 4.8, Opus 4.7, Sonnet 5.5, Sonnet 5, Haiku 5.5 Adaptive only "enabled" (several also reject "disabled")
Opus 4.6, Sonnet 4.6 Adaptive, and extended (deprecated) Neither
Opus 4.5, Sonnet 4.5, Haiku 4.5 Extended only "adaptive"

Some models also can't have thinking turned off. Claude Code's model configuration docs say that on Opus 5.5, Sonnet 5.5, Haiku 5.5 and the Fable models, alwaysThinkingEnabled: false and MAX_THINKING_TOKENS=0 have no effect.

"thinking.type.enabled" is not supported for this model

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

Claude Code's error reference says this means your Claude Code version is older than the minimum for the selected model. The versions it lists:

Model Minimum Claude Code version
Opus 4.7 v2.1.111
Opus 4.8 v2.1.154
Sonnet 5 v2.1.197
Opus 5 v2.1.219
Opus 5.5 v2.1.280
Sonnet 5.5 v2.1.284

Fix:

  1. Run claude update and restart Claude Code.
  2. If you're on the stable release channel, updating stops at the newest stable release, which can still be older than these versions. Move to the latest channel, then update.
  3. If you can't upgrade, run /model and choose Opus 4.6 or Sonnet 4.6.
  4. In the Agent SDK, upgrade the SDK package instead. The error reference lists the minimum SDK versions for each model.

This was a common report when Opus 4.7 came out. In anthropics/claude-code#49219, switching with /model claude-opus-4-7 on v2.1.110 failed this way, and a maintainer replied that v2.1.111 fixed it.

"adaptive thinking is not supported on this model"

text
API Error: 400 adaptive thinking is not supported on this model

This is the reverse case. Anthropic's guide says it happens when the model supports only extended thinking, such as Opus 4.5, Sonnet 4.5 or Haiku 4.5.

Claude Code chooses thinking settings from the model ID. If the ID names a newer model but the endpoint serves an older one, the request can carry adaptive thinking the model doesn't accept. Check what your gateway or proxy maps the ID to, and use an ID it serves directly. anthropics/claude-code#89633, still open, reports this error on every WebSearch tool call in a session, even after switching the main model.

"Effort isn't available with thinking turned off"

text
API Error: Effort 'xhigh' isn't available with thinking turned off on this model · run /effort high to continue, or turn thinking back on (unset MAX_THINKING_TOKENS=0)

You turned thinking off and set an effort level above high. Some models, Opus 5 among them, don't accept that combination.

Fix: lower the effort with /effort high, or turn thinking back on by unsetting MAX_THINKING_TOKENS or removing "alwaysThinkingEnabled": false from your settings. In a non-interactive run, use --effort high or the effortLevel setting.

Before v2.1.242, Claude Code showed the API's own wording instead:

text
API Error: 400 output_config.effort 'xhigh' is not supported when thinking is disabled on this model. Use effort 'high' or below, or enable thinking.

"max_tokens must be greater than thinking.budget_tokens"

text
API Error: 400 ... max_tokens must be greater than thinking.budget_tokens

With a fixed thinking budget, budget_tokens has to be less than max_tokens, so the budget always leaves room for the answer. This only applies when Claude Code uses a fixed budget: on models that support only extended thinking, or on Opus 4.6 and Sonnet 4.6 with CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1. On adaptive models, Claude Code ignores a positive MAX_THINKING_TOKENS value.

Fix:

  • Raise CLAUDE_CODE_MAX_OUTPUT_TOKENS above your thinking budget, or lower MAX_THINKING_TOKENS.
  • Check both values in your shell and in the env block of ~/.claude/settings.json.

Claude Code itself caps MAX_THINKING_TOKENS at one token below the request's max output tokens. For a model ID it can't resolve, the default max output is 32,000 tokens and the cap is 128,000 (environment variables). anthropics/claude-code#8756 reports the error appearing now and then on Bedrock through a LiteLLM proxy, where a second try often worked.

Thinking block and history errors

text
API Error: 400 ... thinking blocks ... cannot be modified
API Error: 400 ... Invalid `data` in `redacted_thinking` block

The API checks that earlier thinking blocks come back exactly as it sent them. These errors mean the conversation history no longer matches.

  • Blocks cannot be modified: run /rewind, or press Esc twice, to go back to a checkpoint before the broken turn. On Opus 4.7 or Opus 4.8, run claude update first. The error reference says versions before v2.1.156 can trigger this during normal tool use, and /rewind doesn't clear it there.
  • Invalid redacted_thinking data: since v2.1.282, Claude Code drops the earlier thinking and retries once by itself. On older versions every later turn fails, so run claude update and resume. If it still fails, /clear starts a conversation without the block.
  • Through a proxy: Anthropic's guide says the usual cause is code that drops redacted_thinking blocks or rebuilds assistant messages. A proxy that converts or rewrites messages can do the same.

Using a gateway or custom model ID

Claude Code turns on effort levels and thinking by matching the model ID against known patterns. Its docs note that an ID that doesn't match can leave supported features turned off. A mismatch can also go the other way: anthropics/claude-code#52541 reports Cowork on a third-party gateway sending thinking.type.enabled for claude-opus-4.7, which the model rejected, while Opus 4.6 and Sonnet 4.6 worked.

What to do:

  1. Watch the startup warning. If Claude Code prints Model "..." isn't recognized, it doesn't know the ID.
  2. Update first. A model newer than your Claude Code version won't be recognized.
  3. Map the gateway's name to the model. Add a modelOverrides entry in your settings, for example "claude-opus-4-8": "my-gateway-opus". Claude Code then treats the ID as that model (model configuration).
  4. If the gateway rejects the thinking parameter itself, set CLAUDE_CODE_DISABLE_THINKING=1. The env var reference describes it as a compatibility option for proxies and gateways that reject the parameter. Models that think by default may still think.

The ANTHROPIC_DEFAULT_*_MODEL_SUPPORTED_CAPABILITIES variables, which declare a model's capabilities directly, apply on Amazon Bedrock, Google Cloud's Agent Platform and Microsoft Foundry. When ANTHROPIC_BASE_URL points to a gateway, only the matching _NAME and _DESCRIPTION variables apply.

Running Claude Code through TeamoRouter

TeamoRouter is an API gateway with one key for Claude, GPT, Gemini and DeepSeek. Claude runs on the native Anthropic protocol (/v1/messages), so Claude Code only needs a base URL and a key. There's no subscription; you pay per use.

  1. Create an API key in the TeamoRouter console. It starts with sk-teamo-.
  2. Top up from $5. The top-up dialog takes cards. You can also click Pay with crypto and pay with USDT, USDC or ETH from any exchange app — the checkout shows which networks your amount supports (BEP20 works from $5). Step by step: Pay for Claude with USDT.
  3. Set two variables (macOS and Linux):
bash
export ANTHROPIC_BASE_URL=https://api.teamorouter.com
export ANTHROPIC_AUTH_TOKEN="your TeamoRouter API key"
claude

Leave /v1 off the base URL. GET /v1/models lists the model IDs you can use. If Claude Code shows an isn't recognized warning for one of them at startup, run claude update first, then map it with modelOverrides as described above. Windows commands and model settings are in Install and connect Claude Code.

FAQ

Will retrying fix it? Usually not. A mismatch between the thinking settings and the model fails the same way every time until you update Claude Code or change the model or settings.

Can I just turn thinking off? Not on every model. On Opus 5.5, Sonnet 5.5, Haiku 5.5 and the Fable models, thinking can't be turned off. On models where you can, turning it off while effort is above high causes the effort error above.

Does MAX_THINKING_TOKENS still do anything? On adaptive models, Claude Code ignores a positive value; the effort level controls thinking. It matters on fixed-budget models, and MAX_THINKING_TOKENS=0 turns thinking off where that's allowed.

I don't use a gateway. Why do I get "thinking.type.enabled"? Usually an outdated Claude Code. Check claude --version against the table above, and switch to the latest release channel if updating doesn't move you past it.

Next steps

Ready to connect?Log in · top up · create an API key — three steps to start.