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 2, 09:45 UTC
[Refactor] Remove dead current_tool_name_sent assignments from tool parsers (#43997)
Signed-off-by: sfeng33 <4florafeng@gmail.com>
Flora Feng committed
May 29, 2026 at 21:45 UTC
1a096d82087bda7faaf4cad81d639419c4734869
4 files changed
-6
vllm/tool_parsers/ernie45_tool_parser.py
-1
@@ -34,7 +34,6 @@ class Ernie45ToolParser(ToolParser):
34
abc\n</think>\n\n\n<tool_call>\ndef\n</tool_call>\n
35
"""
36
super().__init__(tokenizer, tools)
37
- self.current_tool_name_sent = False
37
self.prev_tool_call_arr: list[dict] = []
38
self.current_tool_id = -1
39
self.streamed_args_for_tool: list[str] = []
vllm/tool_parsers/hunyuan_a13b_tool_parser.py
-3
@@ -38,7 +38,6 @@ class HunyuanA13BToolParser(ToolParser):
38
# Initialize state for streaming mode
39
self.prev_tool_calls: list[dict] = []
40
self.current_tool_id = -1
41
- self.current_tool_name_sent = False
41
self.streamed_args: list[str] = [] # Track arguments sent for each tool
42
43
# For backward compatibility with tests
@@ -262,7 +261,6 @@ class HunyuanA13BToolParser(ToolParser):
261
)
262
else:
263
self.streaming_state["sent_tools"][0]["sent_name"] = True
265
- self.current_tool_name_sent = True
264
return delta
265
return None
266
@@ -306,7 +304,6 @@ class HunyuanA13BToolParser(ToolParser):
304
]
305
)
306
self.streaming_state["sent_tools"][current_idx]["sent_name"] = True
309
- self.current_tool_name_sent = True
307
while len(self.streamed_args) <= current_idx:
308
self.streamed_args.append("")
309
return delta
vllm/tool_parsers/hy_v3_tool_parser.py
-1
@@ -246,7 +246,6 @@ class HYV3ToolParser(ToolParser):
246
def __init__(self, tokenizer: TokenizerLike, tools: list[Tool] | None = None):
247
super().__init__(tokenizer, tools)
248
249
- self.current_tool_name_sent: bool = False
249
self.prev_tool_call_arr: list[dict] = []
250
self.current_tool_id: int = -1
251
self.streamed_args_for_tool: list[
vllm/tool_parsers/phi4mini_tool_parser.py
-1
@@ -47,7 +47,6 @@ class Phi4MiniJsonToolParser(ToolParser):
47
# streaming mode
48
self.prev_tool_call_arr: list[dict[str, Any]] = []
49
self.current_tool_id: int = -1
50
- self.current_tool_name_sent: bool = False
50
self.streamed_args_for_tool: list[
51
str
52
] = [] # map what has been streamed for each tool so far to a list