Expose Harmony/GPT-OSS tool parser in serve CLI#4
Merged
krystophny merged 1 commit intomainfrom Mar 24, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
harmonyandgpt-ossas valid--tool-call-parservalues forvllm-mlx serveWhy this is independently deployable
Related upstream context
In upstream
waybarrios/vllm-mlx, the parser building blocks already exist:#50merged Harmony parser support: Add Harmony format parsers for GPT-OSS models waybarrios/vllm-mlx#50#53merged GPT-OSS reasoning parsing: feat: GPT-OSS reasoning parser for channel-based token format waybarrios/vllm-mlx#53The gap this PR fixes is narrower: those parsers were registered, but the serve CLI did not expose them consistently via
--tool-call-parser.Related ongoing work around tool-choice / tool parsing behavior upstream:
#173tool_choice=none: fix: honor tool_choice=none by stripping tools and suppressing parsing waybarrios/vllm-mlx#173#177streaming reasoning branch tool parsing: fix: parse tool calls in streaming reasoning branch waybarrios/vllm-mlx#177#210follow-up tool_choice=none: fix: respect tool_choice="none" by excluding tools from template waybarrios/vllm-mlx#210vllm#37433Responses tool_choice for GPT-OSS/Harmony: [Responses API] tool_choice support (auto / required / none) for GPT-OSS vllm-project/vllm#37433This PR does not try to solve those behavioral questions. It only exposes the parser selections cleanly.
Validation
PYTHONPATH=/Users/ert/code/vllm-mlx /Users/ert/code/.venv/bin/python -m pytest tests/test_server.py -qpython3 -m compileall vllm_mlxWhat could still improve
--tool-call-parser harmonyand--tool-call-parser gpt-osstool_choice=auto/none/required