mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-09-01 11:33:44 +00:00
🩹 fix: Codex round 2 — drop agent load, summary marker, edit-invalidation
- Stop loading agent/model-spec config server-side (closes the agent-access IDOR and the spec-prompt special-casing). Provider/model/window now come from the client-resolved request (`limits.endpoint`/model — the agent's real provider, not the `agents` endpoint, so the tokenizer is right). Agent/spec/ promptPrefix instructions are uniformly deferred to the full-fidelity follow-up. - Detect summarized branches via the live path's `metadata.summaryUsedTokens` marker (was the wrong `summaryTokenCount` field) and fall back to the summary-aware estimate. - Invalidate the projection query on in-place message edits via a branch content `revision` in the cache key (the tail id is unchanged on edit). Deferred (valid, not a regression): same-window endpoint/model switch keeps a window-matched snapshot — needs endpoint/model persisted on the snapshot, which lands with the fidelity follow-up. Smoke-tested: fits / prunes / summarized→null / no-window→null.
This commit is contained in:
parent
5701a9da9c
commit
0639c5fd21
5 changed files with 37 additions and 43 deletions
|
|
@ -18,7 +18,7 @@ async function contextProjectionController(req, res) {
|
|||
return;
|
||||
}
|
||||
const projection = await resolveContextProjection(
|
||||
{ userId: req.user?.id, getMessages: db.getMessages, getAgent: db.getAgent },
|
||||
{ userId: req.user?.id, getMessages: db.getMessages },
|
||||
params,
|
||||
);
|
||||
res.json(projection ?? null);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue