Tools
A list-valued JSON Schema type let structured outputs silently bypass vLLM's xgrammar capability check
vLLM PR #48416 (merged 2026-09-21) fixes `has_xgrammar_unsupported_json_features` recognizing only scalar `type` values. A schema like `{"type": ["string", "null"], "pattern": "^[0-9-]+$", "maxLength": 10}` — the nullable form OpenAI's own Structured Outputs docs demonstrate — skipped the unsupported-feature check entirely, stayed on xgrammar in the default `auto` mode, and compiled a grammar that accepts strings longer than `maxLength`. The fix normalizes scalar and list types before the existing checks so unsupported schemas fall back to another backend; regressions were added for numeric, string, array and object list-types and verified against xgrammar 0.2.1, 0.2.3 and 0.2.7.
Source
↳ Follow the thread