LibreChat/api/app/clients
Danny Avila 9f22c0c804 ♻️ refactor: Move inline-memory backend logic into packages/api + share memory load
Workspace boundary: the inline-memory gating/detection logic that had crept into /api now lives in packages/api/src/agents/memory.ts (TS), with /api kept as thin wrappers.

- Add agentHasInlineMemoryTools, isMemoryToolAllowed, and buildInlineMemoryTool to packages/api; handleTools.js now calls buildInlineMemoryTool instead of constructing/gating the tools inline, and client.js imports agentHasInlineMemoryTools instead of redefining it.
- Optimize repeated memory loads: getRequestMemories memoizes getFormattedMemories per request (WeakMap keyed by req), so the run's memory-context load and every memory-enabled agent's set_memory token-usage load share a single DB fetch instead of one per agent.
2026-06-21 08:09:57 -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 ♻️ refactor: Move inline-memory backend logic into packages/api + share memory load 2026-06-21 08:09:57 -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