[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
+3 -5
View File
@@ -314,7 +314,7 @@ class Qwen3CoderToolParser(ToolParser):
)
tool_calls = [
self._parse_xml_function_call(function_call_str, request.tools)
self._parse_xml_function_call(function_call_str, self.tools)
for function_call_str in function_calls
]
# Populate prev_tool_call_arr for serving layer to set finish_reason
@@ -607,7 +607,7 @@ class Qwen3CoderToolParser(ToolParser):
param_config = self._get_arguments_config(
self.current_function_name or "",
self.streaming_request.tools if self.streaming_request else None,
self.tools,
)
converted_value = self._convert_param_value(
@@ -666,9 +666,7 @@ class Qwen3CoderToolParser(ToolParser):
try:
parsed_tool = self._parse_xml_function_call(
func_content,
self.streaming_request.tools
if self.streaming_request
else None,
self.tools,
)
if parsed_tool and self.current_tool_index < len(
self.prev_tool_call_arr