Repository navigation
[PR] fix: forward complete Google frames once + preserve stream-error cause (root-cause #6634) - #6637
ranxianglei wants to merge 0 commit into
Conversation
3b2835a to
2b47e90
Compare
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 查重: 不重复. This is a root-cause aggregation PR (marker Review verdict: code correct, tests have teeth — mergeable once CI is greenI reviewed the full 4-file diff ( Bug 1 (duplicated frames + dropped output-only frames, #6621): The forwarding decision is now made once per complete frame, after all prose edits, and the frame is attached to a single carrier event. Non-text parts and signed-thought bytes keep their original order; structured text/reasoning events feed internal accounting but carry an explicit Bug 2 (stream errors lose their cause, #6629): A non-null top-level Latent bug also fixed (not in the PR description, flagged): stored call chunks now drop Behavior changes (old → new), all intended fixes — flagged per policy:
Regression checks I walked: the Tests: both new files have teeth — exact wire-frame assertions ( CI state (verified live)The run for the previous head ( For the owner
八问
结论:代码与测试均达标,可合入;唯一闸门是新 head |
170cd59 to
4b77eab
Compare
Fixes #6621
Fixes #6629
What this is
One root-cause PR for the google-adapter batch (aggregation #6634). It combines the two already-validated contributor fixes into a single delivery, cherry-picked with original authorship preserved (
-x, original SHAs in each commit message):fix: forward complete Google response frames once(from [PR] fix: forward complete Google response frames once #6623, author Afloat) — Google core loop duplicates complete frames for sibling text/thought parts and drops output-only frames #6621fix: preserve Google stream errors across loop rounds(from [PR] fix: preserve Google stream errors across loop rounds #6631, author Afloat) — Google stream errors lose their cause after a proxy-tool continuation #6629This supersedes the two per-issue PRs #6623 and #6631; please close those in favor of this one.
Bug 1 — duplicated frames + dropped output-only frames (#6621)
The Google loop adapter attached the complete raw frame to every text/thought event it extracted from that frame. A single
[text A, signed thought, text B]frame therefore sent all three parts three times to the client. Because signed thought bytes must stay byte-exact (#1960), the duplicated signed thoughts desynchronize text from signature. Output-only frames (inlineData,executableCode,codeExecutionResult) fell through the text/call/signature dispatch and were dropped entirely.Fix: the forwarding decision is made once per complete frame, after all prose edits. Non-text parts and signed-thought bytes keep their original order; the frame is attached to a single carrier event. Structured text/reasoning events still feed internal accounting but carry an explicit
rawHandledflag so continuation rounds do not synthesize a second copy of the buffered content.Bug 2 — stream errors lose their cause (#6629)
A top-level Google error envelope (
{"error":{...}}) carries nocandidates, so the adapter classified it as ordinary metadata markedfirstRoundOnly. On round 1 that misclassified the error as client framing (blocking the loop's existing zero-output retry); after a proxy-tool continuation thefirstRoundOnlyflag suppressed it, so the client lost the provider's code/status/message and received only a genericno completion eventerror.Fix: a non-null top-level
erroris recognized before candidate/metadata classification and yielded through the loop's existingkind: "error"path, retaining the numeric code, status and message. Already-received text/usage are flushed; parsing of the failed response stops.Validation
Base
e1f31ad9d5(0.1.213), Node v22.No kernel, config surface, persistence format, version or plugin-path changes.