[Structured Outputs] Parse Lark grammars natively in the xgrammar backend (#58321)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
This commit is contained in:
Bugen Zhao
2026-09-25 04:35:10 +00:00
committed by GitHub
co-authored by Claude Opus 5.5 mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 8a269919f4
commit 1f0bc49ee6
5 changed files with 171 additions and 145 deletions
@@ -455,7 +455,7 @@ def test_structured_output(
structured_outputs=StructuredOutputsParams(grammar="not a grammar"),
)
with pytest.raises(
VLLMValidationError, match="Failed to convert the grammar "
VLLMValidationError, match="Invalid grammar specification"
):
runner.llm.generate(
(