A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 12, 02:15 UTC
[Bugfix] fixed deepseekv32 tool calling error (#30025)
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com> Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
Chauncey committed
Dec 4, 2025 at 15:12 UTC
82a64b3d8f93521d39569078d4ac56992a50a640
2 files changed
+6
-3
vllm/tokenizers/deepseek_v32_encoding.py
+4
-2
@@ -95,8 +95,10 @@ def tool_calls_to_openai_format(tool_calls):
95
def encode_arguments_to_dsml(tool_call: dict[str, str]) -> str:
96
p_dsml_template = """<{dsml_token}parameter name="{key}" string="{is_str}">{value}</{dsml_token}parameter>"""
97
P_dsml_strs = []
98
-
99
- arguments = json.loads(tool_call["arguments"])
98
+ if isinstance(tool_call["arguments"], str):
99
+ arguments = json.loads(tool_call["arguments"])
100
+ else:
101
+ arguments = tool_call["arguments"]
102
103
for k, v in arguments.items():
104
p_dsml_str = p_dsml_template.format(
vllm/tokenizers/deepseekv32.py
+2
-1
@@ -43,7 +43,8 @@ class DeepseekV32Tokenizer(HfTokenizer):
43
thinking_mode = "thinking"
44
if not thinking:
45
thinking_mode = "chat"
46
- messages = messages.copy()
46
+ conversation = kwargs.get("conversation", messages)
47
+ messages = conversation.copy()
48
drop_thinking = True
49
if tools is not None and len(tools) > 0:
50
messages.insert(0, {"role": "system"})