Repository navigation
Replay malformed or folded historical tool arguments as valid JSON - #422
Merged
Phantivia merged 4 commits intoNov 19, 2026
Merged
Conversation
- 替换值 REPLAY_ARGS_FOLDED、REPLAY_ARGS_INVALID 是模型看得到的结构标记,和 FOLD_ARGS_PLACEHOLDER 放在一起;native-input.ts 只做替换,函数头注释写替换的条件与不变量。 - 测试改名 native-input.test.ts,断言对照导出的记号而不是字面值;删去回执原样保留那组用例: 替换只看 arguments,回执不经过这段代码,第一组用例已经断言回执和 session 记录不变。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
两页的 owner 行补上 src/providers/transport/native-input.ts。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
Thanks @jcs130, merged. Before merging we pushed two commits to your branch:
One of the reasons we took this: llama.cpp parses every historical It ships with the next release. |
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.
A strict compatible endpoint can reject an entire stateless conversation because one historical function call no longer has parseable JSON arguments. We reproduced this with a truncated call, and with the same call after a Persona added a note to the corresponding non-execution receipt. The latter failed even after a fix that matched the original receipt text exactly.
At the native transport boundary, project malformed historical arguments as a valid JSON object describing their condition. Distinguish the host's folded-arguments marker from invalid source JSON. Preserve valid argument strings byte-for-byte, item identities, provider metadata and all result items. The result remains authoritative about execution. The persistent transcript and live dispatch never pass through this historical edit.
The tests exercise native Responses and Chat Completions, annotated, folded and genuine results, raw request input and context-record input, and a second call interleaved with an interrupted one. A synthetic annotated-receipt replay with the same endpoint and prompt failed before the fix and returned the correct non-execution outcome afterward.