@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 7bec435130
Fork 0

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 8, 17:45 UTC

[Bugfix] Fix the issue where tool calling does not work when using fast detokenization with dsv32 (#33964)

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>

Chauncey committed Feb 7, 2026 at 01:23 UTC 7bec4351305f7b99ff6385b778760d301e29a6f0
1 file changed +12
vllm/tool_parsers/deepseekv32_tool_parser.py
+12
@@ -110,6 +110,18 @@ class DeepSeekV32ToolParser(ToolParser):
110 """Generate a unique tool call ID."""
111 return f"call_{uuid.uuid4().hex[:24]}"
112
113 + def adjust_request(self, request):
114 + request = super().adjust_request(request)
115 + if request.tools and request.tool_choice != "none":
116 + # Ensure tool call tokens
117 + # (<|DSML|function_calls>, </|DSML|function_calls>)
118 + # are not skippedduring decoding.
119 + # Even though they are not marked as special tokens,
120 + # setting skip_special_tokens=False ensures proper handling in
121 + # transformers 5.x where decoding behavior may have changed.
122 + request.skip_special_tokens = False
123 + return request
124 +
125 def _reset_streaming_state(self):
126 """Reset all streaming state."""
127 self.current_tool_index = 0