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 10, 04:00 UTC
fix: avoid crash on zero-arg tool calls in glm4 parser (#32321)
Signed-off-by: seekskyworld <djh1813553759@gmail.com>
seeksky committed
Jan 15, 2026 at 16:45 UTC
a52d1396a7108d9bb8a7afdadb524d72c59fff5c
1 file changed
+7
-1
vllm/tool_parsers/glm4_moe_tool_parser.py
+7
-1
@@ -115,9 +115,15 @@ class Glm4MoeModelToolParser(ToolParser):
115
tool_calls = []
116
for match in matched_tool_calls:
117
tc_detail = self.func_detail_regex.search(match)
118
+ if not tc_detail:
119
+ logger.warning(
120
+ "Failed to parse tool call details from: %s",
121
+ match,
122
+ )
123
+ continue
124
tc_name = tc_detail.group(1)
125
tc_args = tc_detail.group(2)
120
- pairs = self.func_arg_regex.findall(tc_args)
126
+ pairs = self.func_arg_regex.findall(tc_args) if tc_args else []
127
arg_dct = {}
128
for key, value in pairs:
129
arg_key = key.strip()