CLAUDE_CODE_DISABLE_THINKING vs MAX_THINKING_TOKENS=0
People think CLAUDE_CODE_DISABLE_THINKING turns thinking off. It does not. It only leaves the thinking field out of the request, for a proxy that rejects the field. A model that thinks by default may still think. MAX_THINKING_TOKENS=0 is the one that asks the Anthropic API for no thinking. On a cloud provider, both just leave the field out. Some new models cannot have thinking turned off at all.
CLAUDE_CODE_DISABLE_THINKING
Set to 1, it leaves the thinking field out of each request.
CLAUDE_CODE_DISABLE_THINKING set to 1 leaves the thinking field out of each request. It is for a proxy that rejects that field. It does not turn thinking off. A model that thinks by default may still think. To ask for no thinking, set MAX_THINKING_TOKENS to 0.
MAX_THINKING_TOKENS
It sets how many tokens Claude may spend thinking.
MAX_THINKING_TOKENS sets a fixed number of tokens Claude may spend thinking before it answers. It stays at least one token below the output limit, and never goes under 1,024. Models that pick their own depth ignore the number. Set to 0, it turns thinking off on the Anthropic API. The 5.5 models and Fable are the catch: their thinking cannot be turned off.
In one line
- CLAUDE_CODE_DISABLE_THINKING
- Set to 1, it leaves the thinking field out of each request.
- MAX_THINKING_TOKENS
- It sets how many tokens Claude may spend thinking.