LibreChat/packages/api
Danny Avila b43acf91a4 🛃 fix: Screen persistent agent files under both current policies
Persistent agent context files are read inside primeResources, after the caller
has screened this turn's other files, so neither of the caller's checks reached
them.

Content policy was one of those checks. Current and deferred files are inspected
before their bytes can be sent anywhere; a persistent file was not, so a policy
that started refusing it after it was attached did not stop it being uploaded to
the Code API or RAG on the next tool call. It is now inspected the same way and
dropped rather than failing the turn, matching the deferred candidates, since it
was not attached by this request.

The endpoint total-size allowance was the other. Filtering the persistent set
from zero let a current attachment and a persistent file that each fit alone
exceed the limit once merged, which is the same defect the earlier two-set fix
addressed and the reason a per-request budget is the right unit. All three sets
now draw on one allowance. An earlier reply argued these files sit outside the
request's budget; that was wrong, because they are merged into the same delivery
and provisioning sets the limit exists to bound.
2026-08-31 19:09:12 -04:00
..
src 🛃 fix: Screen persistent agent files under both current policies 2026-08-31 19:09:12 -04:00
types
.gitignore
babel.config.cjs
jest.config.mjs 🔇 refactor: Quiet Framework Logging in Unit Tests (#15363) 2026-08-30 15:26:30 -04:00
jest.setup.cjs
package.json 📦 chore: bump @librechat/agents to v3.7.10 (#15378) 2026-08-30 19:28:22 -04:00
tsconfig-paths-bootstrap.mjs
tsconfig.build.json
tsconfig.json
tsconfig.spec.json
tsdown.config.mjs