fix: include prepend context in gateway recall response#36
Open
lazyayuan wants to merge 1 commit into
Open
Conversation
Signed-off-by: 袁慎亨 <2219014054@qq.com>
Collaborator
|
Hi @lazyayuan, We've received your PR regarding the missing prependContext in Gateway recall response. Thanks for catching this! We'll review and follow up. |
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.
Description | 描述
Fix a Gateway/Hermes
/recallcompatibility issue where L1 recall content inprependContextcould be dropped.The core recall logic already returns L1 memories in
prependContext, but the Gateway/recallresponse previously only exposedappendSystemContextthrough the legacycontextfield. As a result, custom Agent integrations or the Hermes provider calling Gateway/recalldirectly could not receive the L1 memories returned inprependContext.This PR:
prependContextandappendSystemContextto the Gateway/recallresponse.contextfield fromappendSystemContext+prependContext.prefetch()to prefer the split fields when present, and fall back to the legacycontextfield for old Gateway responses./recallresponse behavior.Related Issue | 关联 Issue
None
Change Type | 修改类型
Self-test Checklist | 自测清单
Verified with:
npm testnpm run build:pluginpython -m pytest hermes-plugin/memory/memory_tencentdb/tests -qgit diff --checkAdditional Notes | 其他说明
The legacy
contextfield is preserved so existing clients can still read the full recall context. New clients can readappendSystemContextandprependContextseparately.