From 3c23ac840e758e7b4ff34752e25d9eac12e4a3da Mon Sep 17 00:00:00 2001 From: Shiyan Deng Date: Thu, 5 Mar 2026 03:37:47 -0800 Subject: [PATCH] [Bugfix] Fix mypy errors in hermes_tool_parser.py (#36114) Signed-off-by: Shiyan Deng --- vllm/tool_parsers/hermes_tool_parser.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vllm/tool_parsers/hermes_tool_parser.py b/vllm/tool_parsers/hermes_tool_parser.py index 37fa6bd66..b9b1dcda6 100644 --- a/vllm/tool_parsers/hermes_tool_parser.py +++ b/vllm/tool_parsers/hermes_tool_parser.py @@ -368,6 +368,9 @@ class Hermes2ProToolParser(ToolParser): # now, the nitty-gritty of tool calls # now we have the portion to parse as tool call. + if current_tool_call is None: + return None + logger.debug( "Trying to parse current tool call with ID %s", self.current_tool_id )