🗃️ feat: Retain Agent Files During All-Data Retention#13477
Conversation
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
Pull request overview
Adds an operator-facing interface.retainAgentFiles flag that allows persistent agent resource uploads to remain non-expiring even when retentionMode: "all" is enabled, while preserving the existing default behavior when the flag is unset/false.
Changes:
- Extends the interface config schema + runtime interface config loading to include
retainAgentFiles. - Updates file retention handling for persistent agent resource uploads to optionally skip retention metadata under all-data retention.
- Documents the new YAML option and expands unit tests across schema/config loading and file retention behavior.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/data-schemas/src/app/interface.ts | Whitelists retainAgentFiles into the runtime interfaceConfig returned by loadDefaultInterface(). |
| packages/data-schemas/src/app/interface.spec.ts | Adds coverage to ensure retainAgentFiles is preserved when configured (with retentionMode: all). |
| packages/data-provider/src/config.ts | Extends interfaceSchema to accept retainAgentFiles. |
| packages/data-provider/specs/config-schemas.spec.ts | Adds schema parsing test for retainAgentFiles under all-data retention. |
| librechat.example.yaml | Documents the retainAgentFiles option and its intended effect under retentionMode: "all". |
| api/server/services/Files/process.js | Introduces shouldRetainPersistentAgentFile() and uses it to skip retention metadata for persistent agent resource uploads when configured. |
| api/server/services/Files/process.spec.js | Expands retention tests to cover retain/expire behavior based on retentionMode and retainAgentFiles. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
GitNexus: 🚀 deployedThe |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
I added an explicit
interface.retainAgentFilesoption so operators can keep persistent agent resources whileretentionMode: "all"still expires non-agent data.retainAgentFilesto the interface schema and runtime interface config loading.Change Type
Testing
npm run build:data-providernpm run build:data-schemasnpm run build:apicd api && npx jest server/services/Files/process.spec.js --runInBandcd packages/data-provider && npx jest specs/config-schemas.spec.ts --runInBandcd packages/data-schemas && npx jest src/app/interface.spec.ts --runInBandTest Configuration:
npm ciChecklist