Repository navigation
[PR] fix: forward complete Google response frames once - #6623
Merged
ranxianglei merged 1 commit intoNov 14, 2026
Merged
Conversation
This was referenced Nov 13, 2026
Owner
|
Superseded by #6677 (merged as Landed into master via the real merge commit The fix for #6621 is now in master. Closing this PR as superseded — thanks for the careful, well-tested fix. |
This was referenced Nov 15, 2026
This was referenced Nov 18, 2026
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.
Fixes #6621
Problem
The Google loop adapter forwards the entire response frame for each text/thought part it extracts. One
[text, signed thought, text]frame consequently sends all three parts three times. Per-part forwarding can also expose a sibling's original filtered text before all prose edits have been applied. Output-only frames fall through the text/call/signature dispatch and disappear.A real loopback upstream through
startServerreproduces duplicated signed thoughts in both rounds of anacp_statuscontinuation, missing image/code output, and repeated buffered text in a real-tool continuation. A terminal tool frame can also carry its finish reason twice.Change
Collect the structured deltas and all prose edits for a frame before choosing its single wire carrier. Keep unedited raw frames verbatim, preserve opaque and signed parts, and attach a prose-bearing frame to a text event so the loop's visible-output retry gate remains accurate. Call frames retain the existing settle-time proxy/real classification; proxy removal keeps the other output parts. The terminal stub is the sole finish carrier.
Add
rawHandledto structured text/reasoning events. The loop still records every delta for accounting and the existing re-request rebuild, while the adapter owns its raw bytes. This prevents continuation rounds from synthesizing a second copy of buffered/sibling content. Anthropic's separatewithheldcontract remains unchanged.The scope is client-bound frame forwarding and existing text/thought/tool replay. This does not add a new core representation for replaying opaque media/code outputs across proxy-tool rounds.
Validation
Base
e1f31ad9d5b47500362699a9867819b861c7de96(0.1.213), Node v24.22.1, repository test/storage preloads.git diff --checkpass.These are hermetic HTTP fixtures, not a claim of live-provider testing. The local Codex prerequisite remains blocked by the unreachable upstream at
127.0.0.1:8199; the real-client four-phase suite was not run. Full regression is the hosted CI verdict on this head.Prior work
All-state searches and contributor history distinguish #3162 / #3158 (standalone signatures), #1881 (prose filtering) and #6619 (multiline payload parsing). Their diffs retain this per-part whole-frame forwarding. The Google Content/Part reference specifies ordered parts including non-text payloads.
Topic N, Google/Gemini protocol wiring; suggested
bug,p1,scope/wiring.