Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
de111f32
Unverified
Commit
de111f32
authored
Apr 17, 2026
by
Yufeng He
Committed by
GitHub
Apr 16, 2026
Browse files
[Bugfix] Fix bench_serve UTF-8 decode crash on split multi-byte chars (#38732)
parent
afabb5f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
vllm/benchmarks/lib/endpoint_request_func.py
vllm/benchmarks/lib/endpoint_request_func.py
+3
-1
No files found.
vllm/benchmarks/lib/endpoint_request_func.py
View file @
de111f32
...
...
@@ -2,6 +2,7 @@
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""The request function for API endpoints."""
import
codecs
import
io
import
json
import
os
...
...
@@ -25,11 +26,12 @@ class StreamedResponseHandler:
def
__init__
(
self
):
self
.
buffer
=
""
self
.
_decoder
=
codecs
.
getincrementaldecoder
(
"utf-8"
)()
def
add_chunk
(
self
,
chunk_bytes
:
bytes
)
->
list
[
str
]:
"""Add a chunk of bytes to the buffer and return any complete
messages."""
chunk_str
=
chunk_bytes
.
decode
(
"utf-8"
)
chunk_str
=
self
.
_decoder
.
decode
(
chunk_bytes
)
self
.
buffer
+=
chunk_str
messages
=
[]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment