Skip to content

thinking type should be enabled or disabled Claude Code

Quick fix

Third-party APIs require thinking param as enabled/disabled. Fix via env var CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1 or alt+t toggle.

Error output
API Error: 400 thinking type should be enabled or disabled

Claude Code's Thinking Mode parameter defaults to true or false, but some third-party APIs (e.g., SiliconFlow) require this parameter to be exactly 'enabled' or 'disabled'. When using cc-switch for OpenAI format proxy request conversion, parameter format mismatch causes a 400 error. Additionally, SiliconFlow's Anthropic interface has thinking mode enabled by default; directly closing thinking mode and sending default requests may trigger other 400 errors such as tool calling failures. This issue appeared centrally in Claude Code version 2.1.153, while version 2.1.150 worked normally.

  1. Press alt + t in the Claude Code interface to turn off thinking mode, then press alt + t again to turn it back on. Some models can bypass the error via this operation.

  2. Completely disable adaptive thinking by setting the environment variable.

ToolClaude Code
Version2.1.153
PlatformsUnknown
Why does adding "enable_thinking": false in the config file still cause an error?
The root cause of the error is incompatibility between parameter value formats (true/false vs. enabled/disabled). Simply modifying the boolean value cannot satisfy the third-party API's requirement for specific string formats.
What should I do if tool calls keep returning 400 after turning off thinking mode?
SiliconFlow's Anthropic interface has thinking mode enabled by default. Closing thinking mode and sending default requests may cause tool calling anomalies. It is recommended to try setting the environment variable CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1 to completely disable adaptive thinking.

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.