[Model] Add optional parameter to reasoning parser constructor#25554
Conversation
Signed-off-by: taohui <taohui3@gmail.com>
There was a problem hiding this comment.
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.
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>
chaunceyjiang
left a comment
There was a problem hiding this comment.
Thanks~
I believe this is a backward-compatible change.
|
/cc @aarnphm PTAL. |
Signed-off-by: taohui <taohui3@gmail.com>
07bd3e2 to
b7cc0ec
Compare
Signed-off-by: taohui <taohui3@gmail.com>
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>
…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>
…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>
…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>
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
supported_models.mdandexamplesfor a new model.