Skip to content

fix(gaxios): prevent comma corruption when draining stream error responses - #8779

Merged
feywind merged 7 commits into
mainfrom
jerrylin-fix-comma-corruption-2
Jun 30, 2026
Merged

fix(gaxios): prevent comma corruption when draining stream error responses#8779
feywind merged 7 commits into
mainfrom
jerrylin-fix-comma-corruption-2

Conversation

@pearigee

Copy link
Copy Markdown
Contributor

With this fix, we are hoping to address google-gemini/gemini-cli#21884 and #8768.

Credit to @jerrylin3321 for originally creating this branch. We are creating a PR to add a few additional changes on top of it.

@pearigee
pearigee requested a review from a team as a code owner June 29, 2026 21:09

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses an issue where stream error responses split across multiple chunks were corrupted with commas during string conversion. It updates the response parsing logic to join string chunks directly or concatenate them as Buffers if they contain non-string chunks. A test case was added to verify this behavior with string chunks. The reviewer suggested adding an additional test case using Buffer chunks to ensure full coverage of the fallback concatenation logic.

Comment thread core/packages/gaxios/test/test.getch.ts Outdated
@feywind
feywind merged commit 07b13a1 into main Jun 30, 2026
42 checks passed
@feywind
feywind deleted the jerrylin-fix-comma-corruption-2 branch June 30, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants