Skip to content

[upstream #13811] Load Retention Config on the Archive Route Before Saving #190

Description

@berry-13

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.

Activity

  1. added
    bugSomething isn't working
    readyreviewctl followups state
    area: apireviewctl followups state
    on Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: apireviewctl followups statearea: packagesreviewctl followups statebugSomething isn't workingreadyreviewctl followups state

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions