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

This commit is contained in:
xianzhiT authored and GitHub committed 2025-07-23 17:40:23 -07:00
1 parent 01079e174f
commit 624a3b8d1f
2 files changed
+90 -1

No files matched your search

@@ -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,
)