[Parser] Pass request.tools to tool parser#38860
[Parser] Pass request.tools to tool parser#38860DarkLight1337 merged 2 commits intovllm-project:mainfrom
Conversation
Signed-off-by: sfeng33 <4florafeng@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request updates the parser instantiation logic to support tool definitions by passing request.tools from the serving layer to the parser. Specifically, _WrappedParser in vllm/parser/abstract_parser.py now accepts an optional list of tools and forwards them to the underlying tool parser. A review comment suggests adding *args and **kwargs to the _WrappedParser constructor to maintain compatibility with the base class and prevent potential TypeError issues in the future.
|
The change is small and definitely looks right on the surface. Is there any unit test or manual test you ran that verifies |
Thanks, updated the test plan with steps to trigger the response api non-stream path. |
|
@aarnphm can you please add the ready tag? |
Signed-off-by: sfeng33 <4florafeng@gmail.com> Signed-off-by: Rishi Puri <riship@nvidia.com>
Purpose
Pass request.tools to tool parser in _WrappedParser so non-streaming Responses API tool calls work correctly for parsers that depend on self.tools. Follow up to comment in #38189
Test plan
Triggered response api on non-stream path and validated parser.tool_parser.tools is set