mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-01-27 14:46:00 +08:00
[Bugfix] Properly reject requests with empty list guided_choice (#20195)
Signed-off-by: mgoin <mgoin64@gmail.com>
This commit is contained in:
parent
d45417b804
commit
f719772281
@ -173,6 +173,12 @@ class Processor:
|
||||
params.guided_decoding.backend = engine_level_backend
|
||||
|
||||
# Request content validation
|
||||
if (isinstance(params.guided_decoding.choice, list)
|
||||
and not params.guided_decoding.choice):
|
||||
# It is invalid for choice to be an empty list
|
||||
raise ValueError(f"Choice '{params.guided_decoding.choice}' "
|
||||
"cannot be an empty list")
|
||||
|
||||
if engine_level_backend.startswith("xgrammar"):
|
||||
# xgrammar with no fallback
|
||||
validate_xgrammar_grammar(params)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user