Skip to content

Conversation

@Shirley125
Copy link
Contributor

What this PR does / why we need it?

fix proxy decode bug while parsing non-UTF-8 characters.

Does this PR introduce any user-facing change?

How was this patch tested?

@github-actions
Copy link

👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:‌‌

  • A PR should do only one thing, smaller PRs enable faster reviews.
  • Every PR should include unit tests and end-to-end tests ‌to ensure it works and is not broken by other future PRs.
  • Write the commit message by fulfilling the PR description to help reviewer and future developers understand.

If CI fails, you can run linting and testing checks locally according Contributing and Testing.

@Shirley125 Shirley125 changed the title fix proxy decode bug [bugfix][0.11]fix proxy decode bug Oct 25, 2025
Copy link
Contributor

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

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 a UnicodeDecodeError that can occur when decoding streamed chunks from backend servers. The change wraps the decode operation in a try...except block. In case of a decoding error, which can happen with split multi-byte characters, the raw byte chunk is yielded to the client. This prevents the proxy from crashing and is a correct approach for a streaming proxy, making the data forwarding more robust. The error handling is also consistent with how JSONDecodeError is handled elsewhere in the function. The changes in both modified files are identical and appropriate.

@wangxiyuan wangxiyuan merged commit e48ca0b into vllm-project:v0.11.0-dev Oct 27, 2025
12 checks passed
Angazenn pushed a commit to Angazenn/vllm-ascend that referenced this pull request Oct 28, 2025
### What this PR does / why we need it?
fix proxy decode bug while parsing non-UTF-8 characters.

---------

Signed-off-by: CHEN <[email protected]>
Clorist33 pushed a commit to Clorist33/vllm-ascend that referenced this pull request Dec 9, 2025
### What this PR does / why we need it?
fix proxy decode bug while parsing non-UTF-8 characters.

---------

Signed-off-by: CHEN <[email protected]>
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.

2 participants