[Tool Parser][2/3] Use self.tools instead of request.tools in tool parsers (#38189)

Signed-off-by: sfeng33 <4florafeng@gmail.com>
This commit is contained in:
Flora Feng
2026-03-31 13:41:36 +08:00
committed by GitHub
parent 44eef0ca1e
commit d53cb9cb8e
16 changed files with 113 additions and 105 deletions
+2 -4
View File
@@ -1385,8 +1385,7 @@ class Step3p5ToolParser(ToolParser):
# Reset tool call tracking arrays for new extraction
self.prev_tool_call_arr = []
self.streamed_args_for_tool = []
if request:
self.parser.set_tools(request.tools)
self.parser.set_tools(self.tools)
result = self.parser.parse_single_streaming_chunks(model_output)
if not result.tool_calls:
return ExtractedToolCallInformation(
@@ -1457,8 +1456,7 @@ class Step3p5ToolParser(ToolParser):
# Reset tool call tracking arrays for new streaming session
self.prev_tool_call_arr = []
self.streamed_args_for_tool = []
if request:
self.parser.set_tools(request.tools)
self.parser.set_tools(self.tools)
# Model sometimes outputs separately causing delta_text to be empty.
# If there were tool_calls before and all current tool_calls have ended,