Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
a52d1396
Unverified
Commit
a52d1396
authored
Jan 15, 2026
by
seeksky
Committed by
GitHub
Jan 15, 2026
Browse files
fix: avoid crash on zero-arg tool calls in glm4 parser (#32321)
Signed-off-by:
seekskyworld
<
djh1813553759@gmail.com
>
parent
1e584823
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
vllm/tool_parsers/glm4_moe_tool_parser.py
vllm/tool_parsers/glm4_moe_tool_parser.py
+7
-1
No files found.
vllm/tool_parsers/glm4_moe_tool_parser.py
View file @
a52d1396
...
...
@@ -115,9 +115,15 @@ class Glm4MoeModelToolParser(ToolParser):
tool_calls
=
[]
for
match
in
matched_tool_calls
:
tc_detail
=
self
.
func_detail_regex
.
search
(
match
)
if
not
tc_detail
:
logger
.
warning
(
"Failed to parse tool call details from: %s"
,
match
,
)
continue
tc_name
=
tc_detail
.
group
(
1
)
tc_args
=
tc_detail
.
group
(
2
)
pairs
=
self
.
func_arg_regex
.
findall
(
tc_args
)
pairs
=
self
.
func_arg_regex
.
findall
(
tc_args
)
if
tc_args
else
[]
arg_dct
=
{}
for
key
,
value
in
pairs
:
arg_key
=
key
.
strip
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment