diff --git a/vllm/tool_parsers/glm4_moe_tool_parser.py b/vllm/tool_parsers/glm4_moe_tool_parser.py index 522c67dc2e6a..11eb79244eb9 100644 --- a/vllm/tool_parsers/glm4_moe_tool_parser.py +++ b/vllm/tool_parsers/glm4_moe_tool_parser.py @@ -115,9 +115,15 @@ def _deserialize(value: str) -> Any: 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()