mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-10 05:25:00 +08:00
[bugfix] catch xgrammar unsupported array constraints (#12210)
Signed-off-by: Jason Cheng <jasoncky96@gmail.com>
This commit is contained in:
parent
da7512215f
commit
06a760d6e8
@ -20,6 +20,13 @@ def has_xgrammar_unsupported_json_features(schema: dict) -> bool:
|
||||
]):
|
||||
return True
|
||||
|
||||
# Check for array unsupported keywords
|
||||
if obj.get("type") == "array" and any(key in obj for key in [
|
||||
"uniqueItems", "contains", "minContains", "maxContains",
|
||||
"minItems", "maxItems"
|
||||
]):
|
||||
return True
|
||||
|
||||
# Recursively check all nested objects and arrays
|
||||
for value in obj.values():
|
||||
if isinstance(value, dict):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user