fix: recall via /v3/search so self-hosted backends inject matches - #114
Open
Divyansh151005 wants to merge 1 commit into
Open
fix: recall via /v3/search so self-hosted backends inject matches#114Divyansh151005 wants to merge 1 commit into
Divyansh151005 wants to merge 1 commit into
Conversation
Per-prompt recall only read /v4/profile's embedded searchResults, which stays empty on self-hosted even when /v3/search returns real hits — so the hook looked healthy but never injected context. Route recall through a dedicated searchMemory helper, normalize score/nested-chunk shapes, and leave /v4/profile for session-start profile facts. Fixes supermemoryai#106
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Per-prompt recall (
recall-directive.js) only consumed/v4/profile's embeddedsearchResults. On self-hosted backends that field is always empty even when the same query against/v3/searchreturns real hits — so the plugin looks connected and healthy but never injects recalled context.Confirmed in #106 via direct curl (local
v0.0.5andv0.0.8): profile search →total: 0;/v3/search→ matching documents/chunks.Session-start profile facts (
profile.static/profile.dynamic) are a separate concern and stay on/v4/profile.Fix
searchMemory()inplugin/hooks/lib/api.jsthat POSTs/v3/searchwith bothcontainerTagandcontainerTags(cloud uses singular; the/v4/profile's embeddedsearchResultsreturns empty against self-hosted backend even when/v3/searchfinds matching documents #106 repro used plural)score→similarity, flatten nestedchunks[]document hitsrecall-directive.jstosearchMemoryfor recall injectionTesting
Includes a new regression that stubs the #106 self-hosted response shape (
score+ nested chunks) and asserts/v3/searchis called and the nested texts are injected.Fixes #106