Skip to content
6 changes: 5 additions & 1 deletion vllm/entrypoints/openai/serving_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ def __init__(
self.chat_template = chat_template
self.chat_template_content_format: Final = chat_template_content_format
self.enable_log_outputs = enable_log_outputs
self.use_harmony = model_config.hf_config.model_type == "gpt_oss"
if self.use_harmony:
# override the default tool_parser and auto tools for harmony
tool_parser = 'openai'
Comment thread
aarnphm marked this conversation as resolved.
Outdated
enable_auto_tools = True

# set up tool use
self.enable_auto_tools: bool = enable_auto_tools
Comment thread
aarnphm marked this conversation as resolved.
Outdated
Expand Down Expand Up @@ -141,7 +146,6 @@ def __init__(
else:
self.tool_call_id_type = 'random'

self.use_harmony = model_config.hf_config.model_type == "gpt_oss"
if self.use_harmony:
if "stop_token_ids" not in self.default_sampling_params:
self.default_sampling_params["stop_token_ids"] = []
Expand Down