mirror of
https://github.com/wassname/vllm.git
synced 2026-09-30 11:45:09 +08:00
[Core] xgrammar: Expand list of unsupported jsonschema keywords (#13783)
Signed-off-by: Russell Bryant <rbryant@redhat.com>
This commit is contained in:
1 parent
6724e79164
commit
aab392774b
1 file changed
+12
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user