-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Open
Open
Copy link
Labels
Model ProviderModel provider relatedModel provider relateddeployment:serverServer-side database modeServer-side database modedevice:pcPC/Desktop browserPC/Desktop browserdockerfeature:toolTool calling and function executionTool calling and function executionhosting:self-hostSelf-hosted on VPS/serverSelf-hosted on VPS/serveros:windowsplatform:webWeb platformWeb platformpriority:mediumImportant issues to be addressed soonImportant issues to be addressed soonprovider:claude
Description
📱 Client Type
Web (Desktop Browser)
💻 Operating System
Windows
📦 Deployment Platform
Self hosting Docker
🔧 Deployment Mode
server db (lobe-chat-database image)
📌 Version
v2.0.0-next.147
🌐 Browser
Edge
🐛 Bug Description
Description
Getting an invalid_request_error from Anthropic API when trying to execute Python code using the Code Interpreter with Claude Haiku (claude-haiku-4-5-20251001).
Error Message
{
"error": {
"type": "invalid_request_error",
"message": "messages.1.content.0.type: Expected `thinking` or `redacted_thinking`, but found `text`. 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.claude.com/en/docs/build-with-claude/extended-thinking"
},
"endpoint": "https://api.anthropic.com",
"provider": "anthropic"
}顺带一提,其他插件也会报错
📷 Recurrence Steps
- Use Claude Haiku model (claude-haiku-4-5-20251001) with extended thinking enabled
- Request to write and execute a Python program via Code Interpreter
- Example prompt: "写一段python程序计算第15个素数,并且用插件运行" (Write a Python program to calculate the 15th prime number and run it with the plugin)
- Error occurs when trying to execute
🚦 Expected Behavior
The Code Interpreter should execute the Python code successfully without API errors.
📝 Additional Information
🛠️ Willing to Submit a PR?
No, but I am happy to help test the fix
✅ Validations
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a LobeChat issue and not a third-party library or provider issue.
- Check that this is a concrete bug. For Q&A, please use GitHub Discussions or join our Discord Server.
dosubot
Metadata
Metadata
Assignees
Labels
Model ProviderModel provider relatedModel provider relateddeployment:serverServer-side database modeServer-side database modedevice:pcPC/Desktop browserPC/Desktop browserdockerfeature:toolTool calling and function executionTool calling and function executionhosting:self-hostSelf-hosted on VPS/serverSelf-hosted on VPS/serveros:windowsplatform:webWeb platformWeb platformpriority:mediumImportant issues to be addressed soonImportant issues to be addressed soonprovider:claude