LibreChat/api/app/clients
Matheus Serpa 21d98b85bd
🏷️ fix: Scope File Search entity_id to Agent Knowledge-Base Files Only (#13693)
User-attached files are embedded by the RAG API under the user id (no
entity), while only agent knowledge-base files are embedded under the
agent's entity_id. Sending entity_id in every /query request made the
RAG API's entity filter return no results for user attachments — with a
shared agent, files attached to the message were effectively invisible
to the file_search tool, while knowledge-base files kept working (which
masked the bug).

primeFiles now tags each file with fromAgent (whether it belongs to the
agent's file_search.file_ids) and createQueryBody only includes
entity_id when fromAgent === true — the safe default for callers that
omit the flag is to query without entity scoping. Tests cover KB files,
user attachments, the omitted-flag default, and restore RAG_API_URL.
2026-06-20 10:18:25 -04:00
..
prompts 🛟 fix: persist Vertex Gemini 3 thoughtSignatures across DB round-trips (#13026) 2026-05-08 18:51:34 -04:00
specs 🪪 fix: Scope Message Conversation Access (#13183) 2026-05-18 17:34:30 -04:00
tools 🏷️ fix: Scope File Search entity_id to Agent Knowledge-Base Files Only (#13693) 2026-06-20 10:18:25 -04:00
BaseClient.js 📊 feat: Real-Time Context Window & Token Usage Tracking (#13670) 2026-06-13 19:38:28 -04:00
index.js 🪦 refactor: Remove Legacy Code (#10533) 2025-12-11 16:36:12 -05:00
OllamaClient.js 🧵 refactor: Migrate Endpoint Initialization to TypeScript (#10794) 2025-12-11 16:37:16 -05:00
TextStream.js 🧹 chore: Cleanup Logger and Utility Imports (#9935) 2025-10-01 23:30:47 -04:00