Skip to content

[pull] main from danny-avila:main - #72

Merged
pull[bot] merged 1 commit into
innFactory:mainfrom
LibreChat-AI:main
Apr 30, 2026
Merged

pull[bot] merged 1 commit into
innFactory:mainfrom
LibreChat-AI:main

Conversation

@pull

@pull pull Bot commented Apr 30, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

…oads (#124)

The Anthropic API rejects assistant content that includes a text block
whose text is whitespace-only (`'messages: text content blocks must
contain non-whitespace text'`). Web search responses can include such
blocks alongside `server_tool_use` and `web_search_tool_result`, so on
follow-up turns the request fails.

The existing filter in `_formatContent` only stripped strict empty
strings (`text === ''`), letting blocks with `' '`, `'\n'`, `'\t'`, etc.
through. Broaden the check to drop any text block whose trimmed content
is empty.

Reported in LibreChat discussion #12806; the user observed it consistently
when web search runs and either custom instructions are set or prompt
caching is off (i.e. when `addCacheControl` is gated off).
@pull pull Bot locked and limited conversation to collaborators Apr 30, 2026
@pull pull Bot added the ⤵️ pull label Apr 30, 2026
@pull
pull Bot merged commit 749e41b into innFactory:main Apr 30, 2026
1 check passed

This branch had an error being deployed

1 failed deployment
publish — 749e41b7 Deployed Apr 30, 2026 by pull[bot] via publish #23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant