fix(memory): reject pseudo tool outputs during extraction - #3733
Open
huangxun375-stack wants to merge 1 commit into
Open
fix(memory): reject pseudo tool outputs during extraction#3733huangxun375-stack wants to merge 1 commit into
huangxun375-stack wants to merge 1 commit into
Conversation
Collaborator
|
locomo上的打分有变化么 |
Contributor
Author
使用 DeepSeek-V4-pro
|
Contributor
Author
和模型有关,DeepSeek-V4-pro会因为这个误导难以提取记忆,豆包和gpt没有出现。 |
Collaborator
|
我先合入了 @fujiajie666 后面跑分的时候可以关注下,是否有变化 |
chenjw
reviewed
Aug 7, 2026
| else "" | ||
| ) | ||
| context_workflow = ( | ||
| "2. Use only the pre-fetched context; no tools are available\n" |
Collaborator
There was a problem hiding this comment.
这里好像有问题,模型并不知道pre-fetched的概念吧?
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
Memory extraction can receive a non-empty JSON object shaped like a tool request, for example
{"tool_call_name":"search",...}. The parser currently drops unknown fields and validates the resulting empty object as a successful no-op, so a session commit can complete while silently extracting no memories.This change aligns the extraction prompt and message envelope with the tools that are actually available, and rejects non-empty JSON objects that contain no recognized operation fields so the existing format-retry path can recover.
Human Involvement
Related Issue
N/A
Type of Change
Changes Made
readin the on-demand path.message_type=tool_resultinstead of imitating a callable tool request.{}and allowed[]no-op responses.Testing
Focused and related checks:
git diff --check origin/main...HEADpassed.Direct OpenViking REST E2E, using identical LoCoMo
conv-26payloads across all 19 sessions withdeepseek-v4-pro-260506:main@c7ee8e7b5a5914The replay also verified message/archive fidelity, readable
memory_diff.jsonfiles, and readable durable memories. NoNo memory files to vectorizesignal occurred in either valid run.Checklist
Screenshots (if applicable)
N/A
Additional Notes
The fix reuses the existing extraction format-retry state machine. It does not add a new retry mechanism or change the meaning of an explicit valid no-op response.