LibreChat/api/server/controllers/agents
marbence101 3a079b980a
Some checks are pending
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Waiting to run
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Waiting to run
📌 fix: Populate userMessage.files Before First DB Save (#11939)
* fix: populate userMessage.files before first DB save

* fix: ESLint error fixed

* fix: deduplicate file-population logic and add test coverage

Extract `buildMessageFiles` helper into `packages/api/src/utils/message`
to replace three near-identical loops in BaseClient and both agent
controllers. Fixes set poisoning from undefined file_id entries, moves
file population inside the skipSaveUserMessage guard to avoid wasted
work, and adds full unit test coverage for the new behavior.

* chore: reorder import statements in openIdJwtStrategy.js for consistency

---------

Co-authored-by: Danny Avila <danny@librechat.ai>
2026-02-26 09:16:45 -05:00
..
__tests__ 🐛 fix: Normalize output_text blocks in Responses API input conversion (#11835) 2026-02-17 22:34:19 -05:00
callbacks.js 🪆 refactor: Internalize Producer Event Handling into Agent Graph Context (#11816) 2026-02-17 00:53:22 -05:00
client.js 🪣 fix: Prevent Memory Retention from AsyncLocalStorage Context Propagation (#11942) 2026-02-25 17:41:23 -05:00
client.test.js 🧩 fix: Missing Memory Agent Assignment for Matching IDs (#11514) 2026-01-25 12:08:52 -05:00
errors.js 🛜 refactor: Streamline App Config Usage (#9234) 2025-08-26 12:10:18 -04:00
openai.js 🐛 fix: Normalize output_text blocks in Responses API input conversion (#11835) 2026-02-17 22:34:19 -05:00
recordCollectedUsage.spec.js 🪙 refactor: Collected Usage & Anthropic Prompt Caching (#11319) 2026-01-12 23:02:08 -05:00
request.js 📌 fix: Populate userMessage.files Before First DB Save (#11939) 2026-02-26 09:16:45 -05:00
responses.js 🐛 fix: Normalize output_text blocks in Responses API input conversion (#11835) 2026-02-17 22:34:19 -05:00
v1.js 🪣 fix: Serve Fresh Presigned URLs on Agent List Cache Hits (#11902) 2026-02-22 18:29:31 -05:00
v1.spec.js 🪣 fix: Serve Fresh Presigned URLs on Agent List Cache Hits (#11902) 2026-02-22 18:29:31 -05:00