ai-sdk-provider
ai-sdk-provider copied to clipboard
I have problems using thinking claude-sonnet-4 when y use 'tools' with AI SDK V5
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
Did you solved this issue? I have it too exactly with the same setup