LibreChat/packages/api
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
..
src 📄 fix: Filter Non-PDF Documents on the Anthropic Encode Path (#14535) 2026-07-31 09:57:02 -04:00
types
.gitignore
babel.config.cjs
jest.config.mjs 📦 chore: npm audit fix (#13828) 2026-06-17 21:54:04 -04:00
jest.setup.cjs 🌱 fix: Inject Code-Tool Files Into Graph Sessions on First Call (+ read_file Sandbox Fallback) (#12831) 2026-04-27 08:56:39 +09:00
package.json 📦 chore: bump @librechat/agents to v3.3.8 (#14525) 2026-07-30 08:23:09 -04:00
tsconfig-paths-bootstrap.mjs
tsconfig.build.json
tsconfig.json 📦 chore: npm audit fixes and Mongoose 8.23 TypeScript follow-ups (#12996) 2026-05-07 09:47:40 -04:00
tsconfig.spec.json
tsdown.config.mjs 🪟 fix: Cross-Platform Absolute-Path Check in tsdown neverBundle Predicates (#13700) 2026-06-13 11:04:46 -04:00