mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-16 13:00:55 +00:00
* fix: Skip Re-Embedding Legacy File Search Files an Agent Already Holds Files embedded before per-namespace tracking carry no embeddedEntities, so lazy provisioning treated them as unembedded and embedded them a second time on the first search after upgrading, duplicating every passage. A legacy record in the agent's own file_search resources was embedded for it, so trust its embedded flag there instead of re-queueing it. * fix: Adopt Legacy Search Embeddings Only for Their Sole Holder Trusting the embedded flag for every legacy File Search file left an agent that inherited one querying a namespace without its vectors. Legacy files held by no other agent now record the active agent as their namespace, a one-time write, and are not embedded again; a file another agent also holds keeps the per-namespace re-embed. Adds an e2e scenario that reshapes an uploaded agent file into the v0.8.7 record and checks that search queries it without a second embed. * test: Cover Legacy Search Files Shared With Another Agent * test: Read the Stored File Id in Legacy Search Scenarios * fix: Pin Legacy Search Adoption to Loaded Records and Wire Every Agent Init file_id is not unique, so adoption now matches each record by its owner and tenant as well, and only rewrites the records priming loaded. The added conversation and client agent initializations receive the dependency too, so their sole-holder legacy files are not embedded a second time. * fix: Adopt Each Legacy Search Record in One Conditional Write * fix: Count a Concurrent Same-Agent Adoption as Adopted * fix: Run Legacy Search Adoption Beside the Liveness Probe and Fall Back on Failure * fix: Keep Committed Legacy Search Adoptions When a Sibling Write Fails * fix: Confirm Legacy Search Embeddings With RAG Before Adopting Them Inferring the embedding agent from current File Search holders could adopt a file for an agent whose namespace held none of its vectors, for example after the agent that embedded it was deleted. Priming now asks RAG for one chunk of each legacy file under the agent's entity_id and records the namespace only on a hit; a miss or an unreachable RAG keeps the file queued for embedding. The data-schemas method no longer scans agents and matches untenanted records as untenanted. The fake RAG server answers these presence checks from the embeds it stores. * fix: Require the Entity's Own Chunks and Keep Confirmed Vectors RAG also returns chunks owned by the requesting user, so a presence check now counts only chunks recorded under the agent itself. Once vectors are confirmed, the turn skips the re-embed even if recording the namespace fails. * fix: Bound the Legacy Search Check and Keep the Fake RAG Query Shape The RAG presence check now times out (fileConfig.legacySearchProbeTimeoutMs, 5s by default) and falls back to embedding, so a stalled RAG cannot hang priming. The fake RAG server records presence checks in their own list and keeps the file_search query records it already returned. * fix: Check Any Unrecorded Namespace Before Embedding a Search File A file another agent embedded first lists only that agent, so the agent whose older vectors went unrecorded skipped the check and embedded a second copy. Priming now asks RAG for every agent File Search file that records no embedding for the active agent, and recording adds the namespace to the ones already there. * fix: Ask RAG for Several Chunks So a User Copy Cannot Hide the Agent's RAG ranks chunks across every owner of a file_id and, once the top one is authorized, returns them all. A copy of an agent file embedded for the requesting user could rank first with k: 1 and hide the agent's own chunks, so the presence check now asks for ten and checks every owner. * fix: Confirm Setup Embeddings in Shared-File Runs and Log Safely The run-file host primes an agent's setup files on its own, so it now receives the RAG presence check and the namespace recorder too; without them a shared-file run could embed a legacy setup file a second time. Failed checks are logged with getSafeErrorMetadata rather than the raw error, which carries the vector store's response body. |
||
|---|---|---|
| .. | ||
| __tests__ | ||
| callbacks.background.spec.js | ||
| callbacks.js | ||
| client.codeDecision.spec.js | ||
| client.imageDetail.spec.js | ||
| client.js | ||
| client.test.js | ||
| filterAuthorizedTools.spec.js | ||
| openai.js | ||
| protocol.js | ||
| queuedTurns.js | ||
| recordCollectedUsage.spec.js | ||
| request.js | ||
| responses.js | ||
| resume.js | ||
| steer.js | ||
| v1.js | ||
| v1.spec.js | ||