Fix incomplete tool call capture issue in streaming response of DeepSeek-V3 when enable MTP (#7562)

This commit is contained in:
xianzhiT
2025-07-24 08:40:23 +08:00
committed by GitHub
parent 01079e174f
commit 624a3b8d1f
2 changed files with 90 additions and 1 deletions

View File

@@ -113,7 +113,7 @@ class DeepSeekV3Detector(BaseFormatDetector):
calls: list[ToolCallItem] = []
try:
partial_match = re.search(
pattern=r"<tool▁call▁begin>(.*)<tool▁sep>(.*)\n```json\n(.*)",
pattern=r"<tool▁call▁begin>(.*)<tool▁sep>(.*)\n```json\n(.*)\n```.*",
string=current_text,
flags=re.DOTALL,
)