fix: memory_search honors generic embedding providers - #97095
Conversation
|
Codex review: needs changes before merge. Reviewed July 3, 2026, 4:31 AM ET / 08:31 UTC. Summary PR surface: Source +10, Tests +26. Total +36 across 2 files. Reproducibility: yes. at source level: current main does not use the generic embedding-provider registry when deriving memory-search model and transport defaults, while the llama.cpp provider registers Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Land one resolver fix that preserves memory-runtime lookup precedence for configured aliases, then close or retire duplicate resolver PRs while leaving broader providerKey work to its canonical issue. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main does not use the generic embedding-provider registry when deriving memory-search model and transport defaults, while the llama.cpp provider registers Is this the best way to solve the issue? No as written: the fallback belongs in this resolver, but it should preserve the runtime's configured memory-owner precedence before trying generic aliases. The safer fix is a narrow reorder plus dual-registration alias coverage. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1fef99962edf. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +10, Tests +26. Total +36 across 2 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
@clawsweeper re-review Current PR body now includes refreshed 2026-07-02 real behavior proof for head |
f9f0e35 to
afe1f44
Compare
|
Land-ready verification for exact head
No screenshot attached: the user-visible evidence is CLI index/search output, not a visual UI. The broader provider-key identity work in #91902 remains out of scope. Thanks @849261680 for the fix. |
|
Merged via squash.
|
* fix(agents): resolve generic memory embedding providers * test(agents): restore generic embedding registry state --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
Related: #91902
What Problem This Solves
Fixes an issue where users configuring memory search with a generic embedding provider would have
memory_searchresolve provider defaults from the memory-specific registry only, so providers registered through the generic embedding provider runtime could miss their configured model and transport metadata.Why This Change Was Made
Memory-search config resolution now falls back to the generic embedding provider runtime after checking memory-specific providers. The helper returns only the small provider metadata surface needed for config resolution, so the runtime contracts for generic and memory embedding providers stay separate.
User Impact
Users with plugin-registered generic embedding providers can use
memory_searchwithout the config resolver silently ignoring that provider's default model or local/remote transport. This addresses the generic-provider resolver slice of the broader memory index identity issue.Evidence
Behavior addressed:
resolveMemorySearchConfig()now recognizes a generic local embedding provider registered throughregisterEmbeddingProvider()and uses its default model/transport metadata.Real environment tested: local source checkout on Node 24.15.0.
Exact steps or command run after this patch:
Evidence after fix: added
src/agents/memory-search.test.tscoverage for a generic local provider registered outside the memory-specific registry; the existing memory-core generic provider bridge/integration proof passed with 2 files and 3 tests;pnpm tsgo:corepassed;oxfmt --checkandgit diff --checkpassed; autoreview reported no accepted/actionable findings.Observed result after fix: the new resolver path returns provider
generic-local, modellocal-gguf-default, and leavesremoteunset for local transport. The bridge proof also exercises a contract-declared generic embedding plugin registered through the plugin API, verifies it is not in the memory-specific registry, creates the memory embedding provider through the generic bridge, and performs query, batch, and structured document embedding calls. The integration proof exercises the core OpenAI-compatible generic provider through a local HTTP embedding server and verifies the memory bridge sends query/document requests with the expected model, dimensions, input types, and sanitized cache-key headers.Terminal output from the generic provider bridge/integration proof:
What was not tested: no live DashScope/Voyage gateway run was performed; local Vitest wrapper attempts for
src/agents/memory-search.test.tshung or routed to no matching files in this checkout, so CI should be treated as the authoritative focused test run for that new source-level regression test.Installed generic provider proof
I also ran an isolated real CLI proof with a temporary native plugin loaded through
plugins.load.paths. The plugin declaredcontracts.embeddingProviders: ["proof-generic"]and registered the provider throughapi.registerEmbeddingProvider(), notapi.registerMemoryEmbeddingProvider().Exact steps or command run after this patch:
Evidence after fix:
Observed result after fix:
Verification refresh (2026-07-02)
Refreshed proof on the current PR head
f9f0e35c4867586a5bc9e2497691f9eaf07b7496.Commands run:
Observed result after refresh:
memory search --jsonreturned the indexedMEMORY.mdchunk containing thesilver anchor proofphrase with a positive score, proving the installed generic-provider path can index and search through the real CLI/plugin/config flow on this branch.