You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expected thinking or redacted_thinking but found tool_use #8010
When using Claude models with extended thinking enabled, the API returns a 400 validation error when the model attempts to use tools without a preceding thinking block.
Error Message
400: An error occurred (ValidationException) when calling the ConverseStream operation:
The model returned the following errors: messages.1.content.0.type: Expected `thinking` or
`redacted_thinking`, but found `tool_use`. When `thinking` is enabled, a final `assistant`
message must start with a thinking block (preceeding the lastmost set of `tool_use` and
`tool_result` blocks).
This wasn't an issue last week so I assume something changed.
The core issue appears to be that when thinking is enabled on Claude models, the thinking block's signature field is not properly preserved in the message history. When the same message is sent back in subsequent requests, it causes validation errors from the Claude API.
Feel free to ignore if this specific case differs from the above issues.
Activity
github-actions commentedon Jan 12, 2026
This issue might be a duplicate of existing issues. Please check:
thinkingorredacted_thinking, but foundtool_use#3077: Same error message with Claude extended thinking via custom LiteLLM providerthinkingorredacted_thinking, but foundtext." #2599: Original thinking block bug from v0.8.0 with Claude Sonnet 4 + tool useThe core issue appears to be that when thinking is enabled on Claude models, the thinking block's signature field is not properly preserved in the message history. When the same message is sent back in subsequent requests, it causes validation errors from the Claude API.
Feel free to ignore if this specific case differs from the above issues.
thdxr commentedon Mar 25, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.