fix: batch missing search embeddings#2041
Conversation
|
Automated Test Results: QUEUED This PR was retargeted to
I will post the final pass/fail result when the run completes. |
|
Automated Test Results: PASSED Cloud test-engine rerun against
Manual code review is still required before merge. |
|
This draft is now Ready for review. Cloud test-engine rerun on |
|
Hi @Memtensor-AI / @CarltonXiang — friendly ping on this draft. Quick observation: this PR still has base branch Could a maintainer please change the base branch from Thanks! |
|
Hi @syzsunshine219 — looks like you've merged 35 of the last 50 PRs on this repo. Friendly ping on this one. This draft (and the other 21 OPEN PRs I have here) is small, single-commit, has cloud test-engine When you have a moment, would you mind one of:
Both fix and feature PRs in this batch are independent — each can be reviewed/merged on its own. Happy to rebase / split / drop any that don't fit the direction. Thanks! |
51d7846 to
141f2b8
Compare
Description
Related Issue (Required): Fixes #1482
Batches missing embedding backfills during API search MMR deduplication.
SearchHandler._extract_embeddings()previously sent every memory without cached embedding in one embedder call. Providers such as DashScopetext-embedding-v4reject batches larger than 10, so a search result with many missing embeddings could fail during deduplication. This change caps each missing-embedding call at 10 documents while preserving the returned embeddings in the original memory order.No public API, request/response model, OpenAPI, dependency, or database schema changes.
Type of change
How Has This Been Tested?
Commands run:
Result: passed.
Also attempted:
These are blocked in the local environment because
pytestandpoetryare not installed. Direct test-function execution is also blocked becausepydanticis not installed.Checklist