Compare commits

...
Author SHA1 Message Date
khluuandClaude 2b30cdf9f4 [CI/Build] Fix structural tag test for xgrammar 0.2.3
xgrammar 0.2.3 (PR mlc-ai/xgrammar#668) added an `any_order` field to the
json_schema structural-tag format, so `StructuralTag.model_dump()` now emits
`"any_order": False` inside each tag's `content`. This broke the hardcoded
expected dict in `test_get_model_structural_tag_supports_vllm_hermes`, which
runs only in the CPU job (the sole lane that executes `tests/tool_parsers/`
and freshly resolves the open xgrammar range when building its image).

Adopt 0.2.3 rather than pinning below it:
- bump the floor to `xgrammar >= 0.2.3` in requirements/common.txt
- sync the ROCm test lockfile pin to 0.2.3
- add `"any_order": False` to the expected content dicts in the test

Verified against xgrammar 0.2.3 that `JSONSchemaFormat.model_dump()` emits
`any_order` as a sibling of `style`, matching the updated expectations.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Kevin Luu <kevin@inferact.ai>

Signed-off-by: khluu <khluu000@gmail.com>
2026-06-29 12:51:51 -07:00
3 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ outlines_core == 0.2.14
# required for outlines backend disk cache
diskcache == 5.6.3
lark == 1.2.2
xgrammar >= 0.2.1, < 1.0.0; platform_machine == "x86_64" or platform_machine == "aarch64" or platform_machine == "arm64" or platform_machine == "s390x" or platform_machine == "ppc64le"
xgrammar >= 0.2.3, < 1.0.0; platform_machine == "x86_64" or platform_machine == "aarch64" or platform_machine == "arm64" or platform_machine == "s390x" or platform_machine == "ppc64le"
typing_extensions >= 4.10
filelock >= 3.16.1 # need to contain https://github.com/tox-dev/filelock/pull/317
partial-json-parser # used for parsing partial JSON outputs
+1 -1
View File
@@ -1337,7 +1337,7 @@ word2number==1.1
# via lm-eval
wrapt==2.1.2
# via smart-open
xgrammar==0.2.1
xgrammar==0.2.3
# via
# -c requirements/common.txt
# -r requirements/test/../common.txt
@@ -118,6 +118,7 @@ def test_get_model_structural_tag_supports_vllm_hermes(
"required": ["city"],
},
"style": "json",
"any_order": False,
},
"end": "}\n</tool_call>",
},
@@ -132,6 +133,7 @@ def test_get_model_structural_tag_supports_vllm_hermes(
"required": ["city"],
},
"style": "json",
"any_order": False,
},
"end": "}</tool_call>",
},