@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 19b251fe3d
Fork 0

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 optional parameter parsing in MiniMax M2 tool parser #32278 (#32342)

Signed-off-by: baonudesifeizhai <baonudesifeizhai@gmail.com>

baonudesifeizhai committed Jan 14, 2026 at 23:05 UTC 19b251fe3d26ec9c8df6cb633af9dd196cc6ae18
1 file changed +2 -5
vllm/tool_parsers/minimax_m2_tool_parser.py
+2 -5
@@ -217,16 +217,13 @@ class MinimaxM2ToolParser(ToolParser):
217 Returns:
218 The converted value
219 """
220 - if value.lower() == "null":
220 + # Check if the VALUE itself indicates null (not just if null is allowed)
221 + if value.lower() in ("null", "none", "nil"):
222 return None
223
224 # Normalize types
225 normalized_types = [t.lower() for t in param_types]
226
226 - # Try null first if it's in the list
227 - if "null" in normalized_types or value.lower() in ("null", "none", "nil"):
228 - return None
229 -
227 # Try each type in order of preference (most specific first, string as fallback)
228 # Priority: integer > number > boolean > object > array > string
229 type_priority = [