ai-sdk-provider icon indicating copy to clipboard operation
ai-sdk-provider copied to clipboard

I have problems using thinking claude-sonnet-4 when y use 'tools' with AI SDK V5

Open drnachio opened this issue 4 months ago • 1 comments

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). We recommend you include thinking blocks from previous turns. To avoid this requirement, disable thinking. Please consult our documentation at https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking

drnachio avatar Aug 21 '25 11:08 drnachio

Did you solved this issue? I have it too exactly with the same setup

prestabucket avatar Sep 15 '25 08:09 prestabucket