Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions vllm/entrypoints/openai/serving_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -1761,6 +1761,7 @@ def _make_request_with_harmony(
assert not self.supports_browsing
assert not self.supports_code_interpreter
sys_msg = get_system_message(
model_identity=(request.chat_template_kwargs or {}).get("model_identity"),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
model_identity=(request.chat_template_kwargs or {}).get("model_identity"),
model_identity=(request.chat_template_kwargs or {}).get("harmony_model_identity"),

WDYT? @yeqcharlotte @lyuwen

Copy link
Copy Markdown
Author

@lyuwen lyuwen Dec 22, 2025

Choose a reason for hiding this comment

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

"model_identity" seems more straightforward since it aligns with the GPT-OSS's original chat template. Using "harmony_model_identity" would need a bit more explanation in the vllm docs.
Pasted from the chat template:

{#-
--
In addition to the normal inputs of `messages` and `tools`, this template also accepts the
following kwargs:
- "builtin_tools": A list, can contain "browser" and/or "python".
- "model_identity": A string that optionally describes the model identity.
- "reasoning_effort": A string that describes the reasoning effort, defaults to "medium".
#}

Maybe the additional ones suggested in #30873 could use a prefix since it could be harmony specific?
Anyway, either works for me.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It appears that apart from reasoning_effort, the remaining fields are specific to the Harmony format.

I think it might be beneficial to add a harmony_ prefix to these keys (e.g., harmony_model_identity). My concern is that even users familiar with the Harmony format might easily overlook this feature unless they carefully read the vLLM documentation.

reasoning_effort=request.reasoning_effort,
browser_description=None,
python_description=None,
Expand Down