mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-01-02 14:47:33 +08:00
[Core] xgrammar: Expand list of unsupported jsonschema keywords (#13783)
Signed-off-by: Russell Bryant <rbryant@redhat.com>
This commit is contained in:
parent
6724e79164
commit
aab392774b
@ -33,6 +33,18 @@ def has_xgrammar_unsupported_json_features(schema: dict) -> bool:
|
||||
]):
|
||||
return True
|
||||
|
||||
# Unsupported keywords for strings
|
||||
if obj.get("type") == "string" and any(
|
||||
key in obj for key in ["minLength", "maxLength", "format"]):
|
||||
return True
|
||||
|
||||
# Unsupported keywords for objects
|
||||
if obj.get("type") == "object" and any(key in obj for key in [
|
||||
"minProperties", "maxProperties", "propertyNames",
|
||||
"patternProperties"
|
||||
]):
|
||||
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