LibreChat/api/server/controllers/agents
lia-by-librechat[bot] 0f868baf26
🍘 fix: Separate Runtime Context From User Input (#17454)
* fix(agents): skip the empty-memory notice for agents that cannot use memory

Since #16301 formatMemoryContext('') returns the bare memory instructions sentence, and
prepareRuntimeAgent applied it to the primary agent whenever the user had no saved memories.
An agent with no memory tools and no automatic memory extraction can neither read nor write
memory, so the sentence told the model nothing it could act on, yet it reached the model as
per-turn context. The empty-store notice is now added only when the agent has memory tools or
automatic extraction is on. Saved memories are still injected as before.

* fix(agents): distinguish relocated context from user input

* fix(agents): narrow runtime context types

---------

Co-authored-by: shars <32410570+Shabonasar@users.noreply.github.com>
Co-authored-by: Lia <lia@librechat.ai>
2026-10-26 15:51:16 +01:00
..
__tests__ 🩰 fix: Keep Subagent Guidance in Main Chat Order (#17394) 2026-10-24 12:12:57 +02:00
callbacks.background.spec.js
callbacks.js 🩰 fix: Keep Subagent Guidance in Main Chat Order (#17394) 2026-10-24 12:12:57 +02:00
client.codeDecision.spec.js 🍯 fix: Stop Approval Pauses From Unsealing Code Environments (#15963) 2026-09-15 12:30:37 -04:00
client.imageDetail.spec.js 🖍️ fix: Honor Agent Image Detail Settings (#15407) 2026-08-31 08:34:05 -04:00
client.js 🍘 fix: Separate Runtime Context From User Input (#17454) 2026-10-26 15:51:16 +01:00
client.test.js 🍘 fix: Separate Runtime Context From User Input (#17454) 2026-10-26 15:51:16 +01:00
filterAuthorizedTools.spec.js 🚚 chore: Point Repository and Image References at LibreChat-AI (#16005) 2026-09-23 23:08:36 -04:00
openai.js 🙈 feat: Let Config Profiles Hide librechat.yaml MCP Servers and Remove Their Fields (#17327) 2026-10-22 14:10:31 +02:00
protocol.js
queuedTurns.js 🍱 fix: Carry Coding Approval Mode With Queued Turns (#16326) 2026-09-25 07:28:43 -04:00
recordCollectedUsage.spec.js 🥢 fix: Fit MCP App Snapshots Within Message Documents (#16299) 2026-10-01 03:46:17 +00:00
request.js 🚿 fix: Bound Chat Message IDs and Remove Backtracking (#17388) 2026-10-24 10:16:25 +02:00
responses.js 🙈 feat: Let Config Profiles Hide librechat.yaml MCP Servers and Remove Their Fields (#17327) 2026-10-22 14:10:31 +02:00
resume.js 🔗 feat: use LibreChat prompt groups as agent instructions (#16686) 2026-10-04 21:27:26 -04:00
steer.js 📬 feat: Move Agent Queued Turns Server-Side (#15370) 2026-08-30 21:53:58 -04:00
v1.js ⬆️ feat: Migrate to Zod v4 (#17442) 2026-10-26 14:16:22 +01:00
v1.spec.js 🐡 fix: Bound Tool Approval Admission Work (#17387) 2026-10-24 08:58:17 +02:00