claude_thinking_tools_errorTier 1 · 70% confidence
ai-agents-claude-thinking-tool-using-claude-reasoning-models-e-g-claude-sonnet-3--0f76ccc4
agent: ai_agents
When does this happen?
IF Using Claude reasoning models (e.g., Claude Sonnet 3.7) with tools enabled via LiteLLM proxy results in a 400 error: 'Expected thinking or redacted_thinking, but found tool_use.'
How others solved it
THEN Disable thinking for Claude models when using native tool calling, or switch to default (non-native) tool calling. If thinking is required, ensure the conversation history includes a thinking block from the previous assistant turn before the tool_use block, per Anthropic's extended thinking requirements.
// LiteLLM config to disable thinking for Claude models when tools are used
model_list:
- model_name: claude-sonnet-3.7
litellm_params:
model: bedrock/claude-3-7-sonnet-thinking
disable_thinking: true # or set thinking parameter to false in the requestRelated patterns
github
ai-agents-github-support-for-reasoning-in-openrouter-and-deepseek-p-48add6f0
Tier 1 · 40%
githubai-agents-github-server-capabilities-not-affecting-the-stream-of-ca-ca806d9e
Tier 1 · 40%
githubai-agents-github-patrick-von-platen-cd4d7ceb
Tier 1 · 40%
model_loadingai-agents-model-loading-loading-a-gemma-3-checkpoint-with-automodelforcaus-cc5b7a71
Tier 1 · 70%
githubai-agents-github-runtimeerror-cuda-error-cublas-status-not-initiali-9b601119
Tier 1 · 40%
githubai-agents-github-bug-frequent-ide-disconnections-disrupting-workflo-e9f35aca
Tier 1 · 40%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.