fix: harden streaming reasoning/tool parsing across engines#1
Open
krystophny wants to merge 1 commit intoThump604:fix/streaming-reasoning-tool-coexistence-v2from
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.
This builds on waybarrios#177 and adds the remaining hardening that showed up under broader local + live validation.
What this adds on top of the branch:
SimpleEngineandBatchedEnginefinish_reason="tool_calls"Validation on current main before splitting this out:
pytest -q tests -x --timeout=120 -m 'not slow'1090 passed, 11 skipped, 18 deselectedgpt_ossreasoning parser, simple + batchedharmonyreasoning parser, simpleValidation on this branch:
python -m pytest -q tests/test_harmony_parsers.py tests/test_tool_parsers.py tests/test_simple_engine.py tests/test_engine_tool_output_preservation.pypython -m py_compile vllm_mlx/server.py vllm_mlx/engine/simple.py vllm_mlx/engine/batched.py vllm_mlx/reasoning/gpt_oss_parser.py vllm_mlx/reasoning/harmony_parser.py vllm_mlx/tool_parsers/harmony_tool_parser.py vllm_mlx/tool_parsers/qwen_tool_parser.pyNote: importing
server.pyon the base branch still hits pre-existing Responses-API type references that are unrelated to this streaming/tool fix, so I kept the branch-local rerun focused on the directly touched parser/engine coverage.