Skip to content

[Refactor] Remove dead code from parser infrastructure#44279

Merged
sfeng33 merged 1 commit into
vllm-project:mainfrom
sfeng33:cleanup-parser-infra
Jun 2, 2026
Merged

[Refactor] Remove dead code from parser infrastructure#44279
sfeng33 merged 1 commit into
vllm-project:mainfrom
sfeng33:cleanup-parser-infra

Conversation

@sfeng33

@sfeng33 sfeng33 commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Purpose

  • Remove _WrappedParser — move sub-parser instantiation into Parser.__init__
  • Delete MiniMaxM2Parser — just composed two already-registered parsers
  • Strip unused ParserManager registry machinery (register_module, register_lazy_module, get_parser_internal, list_registered, import_parser, lazy-registration table)

Test Plan

pytest tests/entrypoints/openai/chat_completion/test_serving_chat.py
pytest tests/parser/test_streaming.py

Signed-off-by: sfeng33 <4florafeng@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sfeng33 sfeng33 marked this pull request as ready for review June 2, 2026 05:11
@sfeng33 sfeng33 added the ready ONLY add when PR is ready to merge/full CI is needed label Jun 2, 2026

@yewentao256 yewentao256 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks for the work!

@sfeng33 sfeng33 merged commit 478b49d into vllm-project:main Jun 2, 2026
47 checks passed
@sfeng33 sfeng33 deleted the cleanup-parser-infra branch June 2, 2026 16:08
mvanhorn pushed a commit to mvanhorn/vllm that referenced this pull request Jun 4, 2026
…44279)

Signed-off-by: sfeng33 <4florafeng@gmail.com>
Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
bnellnm pushed a commit to neuralmagic/vllm that referenced this pull request Jun 4, 2026
andakai pushed a commit to andakai/vllm that referenced this pull request Jun 4, 2026
JisoLya pushed a commit to JisoLya/vllm that referenced this pull request Jun 5, 2026
…44279)

Signed-off-by: sfeng33 <4florafeng@gmail.com>
Signed-off-by: JisoLya <523420504@qq.com>
knight0528 pushed a commit to knight0528/vllm that referenced this pull request Jun 8, 2026
alexbi29 added a commit to alexbi29/vllm that referenced this pull request Jun 8, 2026
… API

Three adaptations required after upstream refactors:

1. _WrappedParser removed (vllm-project#44279): replaced with an inline subclass
   _Gemma4Parser(DelegatingParser) with reasoning_parser_cls and
   tool_parser_cls set as class attributes directly.

2. parse_delta() gained a required `finished` kwarg (vllm-project#44017): updated
   _run_streaming to pass finished=(last token), _run_single_delta to
   pass finished=True, and the multi-turn loop to pass finished=False.

3. tool_choice="none" short-circuit added (vllm-project#42752): parse_delta now
   returns raw content immediately when request.tool_choice is "none",
   which is the default when no tools are specified. Fixed _make_request
   to include a dummy tool so tool_choice stays "auto" and the parser
   exercises its actual tool-extraction logic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
waqahmed-amd-fi pushed a commit to waqahmed-amd-fi/vllm that referenced this pull request Jun 10, 2026
…44279)

Signed-off-by: sfeng33 <4florafeng@gmail.com>
Signed-off-by: Waqar Ahmed <waqar.ahmed@amd.com>
alexbi29 added a commit to alexbi29/vllm that referenced this pull request Jun 12, 2026
… API

Three adaptations required after upstream refactors:

1. _WrappedParser removed (vllm-project#44279): replaced with an inline subclass
   _Gemma4Parser(DelegatingParser) with reasoning_parser_cls and
   tool_parser_cls set as class attributes directly.

2. parse_delta() gained a required `finished` kwarg (vllm-project#44017): updated
   _run_streaming to pass finished=(last token), _run_single_delta to
   pass finished=True, and the multi-turn loop to pass finished=False.

3. tool_choice="none" short-circuit added (vllm-project#42752): parse_delta now
   returns raw content immediately when request.tool_choice is "none",
   which is the default when no tools are specified. Fixed _make_request
   to include a dummy tool so tool_choice stays "auto" and the parser
   exercises its actual tool-extraction logic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
alexbi29 added a commit to alexbi29/vllm that referenced this pull request Jun 12, 2026
… API

Three adaptations required after upstream refactors:

1. _WrappedParser removed (vllm-project#44279): replaced with an inline subclass
   _Gemma4Parser(DelegatingParser) with reasoning_parser_cls and
   tool_parser_cls set as class attributes directly.

2. parse_delta() gained a required `finished` kwarg (vllm-project#44017): updated
   _run_streaming to pass finished=(last token), _run_single_delta to
   pass finished=True, and the multi-turn loop to pass finished=False.

3. tool_choice="none" short-circuit added (vllm-project#42752): parse_delta now
   returns raw content immediately when request.tool_choice is "none",
   which is the default when no tools are specified. Fixed _make_request
   to include a dummy tool so tool_choice stays "auto" and the parser
   exercises its actual tool-extraction logic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit c37293e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants