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
49ab23b3
Unverified
Commit
49ab23b3
authored
Aug 24, 2025
by
Yu Guo
Committed by
GitHub
Aug 25, 2025
Browse files
[gpt-oss] use reasoning channel for reasoning text in serving_chat (#22920)
Signed-off-by:
Yu Guo
<
yuguo@meta.com
>
parent
c9abb104
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
vllm/entrypoints/openai/serving_chat.py
vllm/entrypoints/openai/serving_chat.py
+6
-6
No files found.
vllm/entrypoints/openai/serving_chat.py
View file @
49ab23b3
...
@@ -663,9 +663,9 @@ class OpenAIServingChat(OpenAIServing):
...
@@ -663,9 +663,9 @@ class OpenAIServingChat(OpenAIServing):
harmony_parser
=
harmony_parsers
[
i
]
harmony_parser
=
harmony_parsers
[
i
]
for
token_id
in
output
.
token_ids
:
for
token_id
in
output
.
token_ids
:
harmony_parser
.
process
(
token_id
)
harmony_parser
.
process
(
token_id
)
# FIXME(woosuk): Support function calling
is_reasoning
=
\
is_final
=
harmony_parser
.
current_channel
==
"
fi
nal"
harmony_parser
.
current_channel
==
"
a
nal
ysis
"
if
not
(
request
.
include_reasoning
or
is_
final
)
:
if
not
request
.
include_reasoning
and
is_
reasoning
:
# Skip the reasoning content.
# Skip the reasoning content.
continue
continue
delta_text
=
harmony_parser
.
last_content_delta
or
""
delta_text
=
harmony_parser
.
last_content_delta
or
""
...
@@ -695,11 +695,11 @@ class OpenAIServingChat(OpenAIServing):
...
@@ -695,11 +695,11 @@ class OpenAIServingChat(OpenAIServing):
current_token_ids
=
as_list
(
output
.
token_ids
)
current_token_ids
=
as_list
(
output
.
token_ids
)
if
self
.
use_harmony
:
if
self
.
use_harmony
:
if
is_final
:
if
is_reasoning
:
delta_message
=
DeltaMessage
(
content
=
delta_text
)
else
:
delta_message
=
DeltaMessage
(
delta_message
=
DeltaMessage
(
reasoning_content
=
delta_text
)
reasoning_content
=
delta_text
)
else
:
delta_message
=
DeltaMessage
(
content
=
delta_text
)
# handle streaming deltas for tools with named tool_choice
# handle streaming deltas for tools with named tool_choice
elif
tool_choice_function_name
:
elif
tool_choice_function_name
:
if
(
self
.
reasoning_parser
and
not
reasoning_end_arr
[
i
]
if
(
self
.
reasoning_parser
and
not
reasoning_end_arr
[
i
]
...
...
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