LibreChat/packages
Danny Avila f0d3bcb622
📄 fix: Filter Non-PDF Documents on the Anthropic Encode Path (#14535)
Anthropic's Messages API only accepts application/pdf for base64 document
sources, but encodeAndFormatDocuments sent every allowlisted file (docx,
xlsx, csv, html) through the base64 branch unfiltered. The provider 400
recurs on every retry because attachments are re-encoded each request,
permanently breaking the conversation.

- Add isAnthropicDocumentType / isAnthropicTextDocumentType to
  data-provider, mirroring isBedrockDocumentType
- Filter unsupported types before encoding (matching Bedrock semantics)
  and log the skipped attachments
- Send textual types as plain-text document sources (source.type 'text'),
  which Anthropic accepts and supports citations for, instead of invalid
  base64 blocks

Fixes #14485
2026-07-31 09:57:02 -04:00
..
api 📄 fix: Filter Non-PDF Documents on the Anthropic Encode Path (#14535) 2026-07-31 09:57:02 -04:00
client 🌯 chore: Retire Rollup-Era devDependencies After tsdown Migration (#14496) 2026-07-28 22:08:52 -04:00
data-provider 📄 fix: Filter Non-PDF Documents on the Anthropic Encode Path (#14535) 2026-07-31 09:57:02 -04:00
data-schemas 🪢 feat: Langfuse Fanout Connection Setting (#14108) 2026-07-29 18:33:10 -04:00