@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / f719772281
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 15, 04:45 UTC

[Bugfix] Properly reject requests with empty list guided_choice (#20195)

Signed-off-by: mgoin <mgoin64@gmail.com>

Michael Goin committed Jun 28, 2025 at 14:50 UTC f719772281c76fee6a8641647aa40fbab8a0f3a4
1 file changed +6
vllm/v1/engine/processor.py
+6
@@ -173,6 +173,12 @@ class Processor:
173 params.guided_decoding.backend = engine_level_backend
174
175 # Request content validation
176 + if (isinstance(params.guided_decoding.choice, list)
177 + and not params.guided_decoding.choice):
178 + # It is invalid for choice to be an empty list
179 + raise ValueError(f"Choice '{params.guided_decoding.choice}' "
180 + "cannot be an empty list")
181 +
182 if engine_level_backend.startswith("xgrammar"):
183 # xgrammar with no fallback
184 validate_xgrammar_grammar(params)