Raised by Codex on LibreChat-AI#13811 (LibreChat-AI#13811 (comment)) and deferred there as outside that PR's scope.
What happens
POST /api/convos/archive (api/server/routes/convos.js) calls saveConvo with interfaceConfig: req?.config?.interfaceConfig, but the route is registered without configMiddleware, so req.config is always undefined there. Every retention decision inside saveConvo therefore sees no retention mode:
Why it was not fixed in the PR
The retention PR's contract treats metadata-only operations (delete, tag rename, project membership, share updates, and archive by the same reasoning) as non-conversion triggers, and the missing middleware predates the PR and affects the all mode too.
What a fix probably looks like
Add configMiddleware to the archive route (as /update already has), or pass the resolved config explicitly, and cover archive and unarchive under all and ephemeral with the real saveConvo. Decide whether archive should be a conversion trigger at all, since the ephemeral contract currently says metadata-only operations are not.
Raised by Codex on LibreChat-AI#13811 (LibreChat-AI#13811 (comment)) and deferred there as outside that PR's scope.
What happens
POST /api/convos/archive(api/server/routes/convos.js) callssaveConvowithinterfaceConfig: req?.config?.interfaceConfig, but the route is registered withoutconfigMiddleware, soreq.configis always undefined there. Every retention decision insidesaveConvotherefore sees no retention mode:retentionMode: "all"(already on dev and canary), archiving or unarchiving a legacy row does not give it the general-chat deadline the other save paths heal in;retentionMode: "ephemeral"(added by ⏳ feat: Add Ephemeral Retention Mode for Forced Temporary Chats LibreChat-AI/LibreChat#13811), archiving a conversation that predates the setting does not convert it to temporary.Why it was not fixed in the PR
The retention PR's contract treats metadata-only operations (delete, tag rename, project membership, share updates, and archive by the same reasoning) as non-conversion triggers, and the missing middleware predates the PR and affects the
allmode too.What a fix probably looks like
Add
configMiddlewareto the archive route (as/updatealready has), or pass the resolved config explicitly, and cover archive and unarchive underallandephemeralwith the realsaveConvo. Decide whether archive should be a conversion trigger at all, since the ephemeral contract currently says metadata-only operations are not.