Anthropic web_search causes "text content blocks must contain non-whitespace text" error on follow-up messages #12806
B-ai-P
started this conversation in
Feature Requests & Suggestions
Replies: 1 comment 5 replies
-
|
Cannot be reproduced. You didn't specify which version of LibreChat you are using. Try on v0.8.5 |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
Environment
Description
When using an Anthropic model (Claude) with the Web Search tool enabled, the first message works fine — the AI performs a web search and returns a proper response. However, any follow-up message in the same conversation fails with the following API error:
Observed behavior
Expected behavior
Suspected cause
The Anthropic API response for web search typically includes empty
textblocks alongsideserver_tool_useandweb_search_tool_resultblocks. When LibreChat sends the conversation history back to the Anthropic API on the next turn, these empty text blocks are not filtered out, causing the API to reject the request.Version Information
Steps to Reproduce
messages: text content blocks must contain non-whitespace textWhat browsers are you seeing the problem on?
Chrome
Relevant log output
Screenshots
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions