[Bugfix] Fix DeepSeekV31ToolParser to correctly parse multiple tools in non-streaming output (#25405)

Signed-off-by: taohui <taohui3@gmail.com>
This commit is contained in:
Tao Hui
2025-09-24 20:58:00 +08:00
committed by GitHub
parent b1068903fd
commit e18b714b2e
2 changed files with 55 additions and 1 deletions
@@ -39,7 +39,7 @@ class DeepSeekV31ToolParser(ToolParser):
self.tool_call_end_token: str = "<|tool▁call▁end|>"
self.tool_call_regex = re.compile(
r"<|tool▁call▁begin|>(?P<function_name>.*)<|tool▁sep|>(?P<function_arguments>.*)<|tool▁call▁end|>"
r"<|tool▁call▁begin|>(?P<function_name>.*?)<|tool▁sep|>(?P<function_arguments>.*?)<|tool▁call▁end|>"
)
self.stream_tool_call_portion_regex = re.compile(