Skip to content

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

Open
pearigee wants to merge 7 commits into
mainfrom
jerrylin-fix-comma-corruption-2
Open

fix(gaxios): prevent comma corruption when draining stream error responses#8779
pearigee wants to merge 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
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.

1 participant