-
Notifications
You must be signed in to change notification settings - Fork 9k
Closed
Description
Related: #2599
AI_APICallError: litellm.BadRequestError: BedrockException
The model returned the following errors: messages.3.content.0.type: Expectedthinkingorredacted_thinking, but foundtool_use. Whenthinkingis enabled, a finalassistantmessage must start with a thinking block (preceeding the lastmost set oftool_useandtool_resultblocks). We recommend you include thinking blocks from previous turns. To avoid this requirement, disablethinking. Please consult our documentation at https://docs.claude.com/en/docs/build-with-claude/extended-thinking
A session share link where this error happened: https://opencode.ai/s/iDe3unHA
My config
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"my-litellm-provider": {
"name": "My LiteLLM Provider",
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://my-provider.com",
"apiKey": "...",
"includeUsage": true
},
"models": {
"claude-4-5-sonnet": {
"name": "Anthropic Claude Sonnet 4.5",
"release_date": "2025-09-29",
"attachment": true,
"reasoning": true,
"temperature": true,
"tool_call": true,
"limit": {
"context": 200000,
"output": 64000
},
"options": {
"thinking": {
"type": "enabled",
"budget_tokens": 16000,
},
}
},
}
}
}
}
Metadata
Metadata
Assignees
Labels
No labels