Repository navigation
[PR] fix: preserve Google stream errors across loop rounds - #6631
Merged
ranxianglei merged 2 commits intoNov 14, 2026
Merged
Conversation
Owner
|
Superseded by #6677 (merged as Landed into master via the real merge commit The fix for #6629 is now in master. Closing this PR as superseded — thanks for the careful, well-tested fix. |
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 #6629
Problem
The Google adapter treats a top-level provider error as ordinary metadata marked
firstRoundOnly. On the first round this forwards an error as client framing and prevents the loop's existing zero-output retry. After a proxy-tool continuation the same metadata is suppressed, so the client loses the provider's code, status and explanation and receives only a genericno completion eventerror.Change
Classify non-null Google error envelopes through the loop's existing error event before candidate/metadata handling. Preserve the numeric code, status and message in the error description, flush already received text and usage, and stop consuming content from the failed response.
The existing retry budget and error-envelope policy are retained. A failure before any output can use the existing single retry; a failure after visible text does not replay that text. Final failures use the existing Google
500/INTERNALloop-error envelope, with the upstream code and status retained in its message. No new retry policy or configuration is introduced.Validation
e1f31ad9d5b47500362699a9867819b861c7de96; all 9 pass with this change.acp_statuspreserves its cause without replaying visible text.No kernel, config surface, persistence format, version or plugin-path implementation changes.