Skip to content

[Model] Add optional parameter to reasoning parser constructor#25554

Merged
DarkLight1337 merged 5 commits intovllm-project:mainfrom
taohui:deepseek_v3.1_reasoning_parser_add_request_param
Sep 25, 2025
Merged

[Model] Add optional parameter to reasoning parser constructor#25554
DarkLight1337 merged 5 commits intovllm-project:mainfrom
taohui:deepseek_v3.1_reasoning_parser_add_request_param

Conversation

@taohui
Copy link
Copy Markdown
Contributor

@taohui taohui commented Sep 24, 2025

Purpose

Add an optional parameter to the reasoning parser constructor to allow
behavior control based on fields like 'thinking' in the request.

This PR is split from #24972.
For more details, please refer to the original PR.

Test Plan

Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aims to add optional parameters to the ReasoningParser constructors to allow for more flexible behavior control. While the base class ReasoningParser is correctly updated to accept *args and **kwargs, all modified subclasses fail to forward these arguments in their super().__init__ calls. This oversight defeats the purpose of the change and will prevent the optional parameters from being passed up the inheritance chain. I've added comments with suggestions to fix this in each affected file. This is a critical issue that needs to be addressed for the feature to work as intended.

taohui and others added 2 commits September 24, 2025 16:09
fix(parser): ensure subclasses forward *args and **kwargs to super().__init__

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Tao Hui <taohui3@gmail.com>
…__init__

Signed-off-by: taohui <taohui3@gmail.com>
Copy link
Copy Markdown
Collaborator

@chaunceyjiang chaunceyjiang left a comment

Choose a reason for hiding this comment

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

Thanks~

I believe this is a backward-compatible change.

@chaunceyjiang chaunceyjiang added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 25, 2025
@chaunceyjiang
Copy link
Copy Markdown
Collaborator

/cc @aarnphm PTAL.

Signed-off-by: taohui <taohui3@gmail.com>
@taohui taohui force-pushed the deepseek_v3.1_reasoning_parser_add_request_param branch from 07bd3e2 to b7cc0ec Compare September 25, 2025 10:11
Signed-off-by: taohui <taohui3@gmail.com>
@DarkLight1337 DarkLight1337 merged commit b8d9e4a into vllm-project:main Sep 25, 2025
40 checks passed
yewentao256 pushed a commit that referenced this pull request Oct 3, 2025
Signed-off-by: taohui <taohui3@gmail.com>
Signed-off-by: Tao Hui <taohui3@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: yewentao256 <zhyanwentao@126.com>
choprahetarth pushed a commit to Tandemn-Labs/vllm that referenced this pull request Oct 11, 2025
…project#25554)

Signed-off-by: taohui <taohui3@gmail.com>
Signed-off-by: Tao Hui <taohui3@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
lywa1998 pushed a commit to lywa1998/vllm that referenced this pull request Oct 20, 2025
…project#25554)

Signed-off-by: taohui <taohui3@gmail.com>
Signed-off-by: Tao Hui <taohui3@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
rtourgeman pushed a commit to rtourgeman/vllm that referenced this pull request Nov 10, 2025
…project#25554)

Signed-off-by: taohui <taohui3@gmail.com>
Signed-off-by: Tao Hui <taohui3@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
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.

3 participants