Skip to content

Fix xgrammar fallback for v0#2155

Merged
wnetelhabana merged 2 commits intoHabanaAI:v1.22.2_nextfrom
12010486:fix_xgrammar_v0
Nov 28, 2025
Merged

Fix xgrammar fallback for v0#2155
wnetelhabana merged 2 commits intoHabanaAI:v1.22.2_nextfrom
12010486:fix_xgrammar_v0

Conversation

@12010486
Copy link
Copy Markdown

@12010486 12010486 commented Nov 27, 2025

Issue:

When using tool calling on V0, xgrammar is falling back to outlines, and we are unable to handle complex tool calling requests (used for Agentic AI) that are handled instead with Nvidia.

It is not a failure, we have:

WARNING 11-26 20:25:33 [__init__.py:34] xgrammar does not support advanced JSON schema features like string length, item limits, or property bounds. Falling back to use outlines instead.

but the service is not usable - wrong parser.

I've adapted this solution:
https://github.com/vllm-project/vllm/blob/v0.9.0.1/vllm/v1/structured_output/backend_xgrammar.py#L198
to the has_xgrammar_unsupported_json_features() function used in V0.

Signed-off-by: 12010486 <silvia.colabrese@intel.com>
@michalkuligowski
Copy link
Copy Markdown

/run-gaudi-tests

@wnetelhabana wnetelhabana merged commit 306d43c into HabanaAI:v1.22.2_next Nov 28, 2025
50 checks passed
PatrykWo pushed a commit that referenced this pull request Dec 4, 2025
## Issue:

When using tool calling on V0, xgrammar is falling back to outlines, and
we are unable to handle complex tool calling requests (used for Agentic
AI) that are handled instead with Nvidia.

It is not a failure, we have:
```
WARNING 11-26 20:25:33 [__init__.py:34] xgrammar does not support advanced JSON schema features like string length, item limits, or property bounds. Falling back to use outlines instead.
```
but the service is not usable - wrong parser. 

I've adapted this solution:

https://github.com/vllm-project/vllm/blob/v0.9.0.1/vllm/v1/structured_output/backend_xgrammar.py#L198
to the `has_xgrammar_unsupported_json_features()` function used in V0.

---------

Signed-off-by: 12010486 <silvia.colabrese@intel.com>
wnetelhabana pushed a commit that referenced this pull request Dec 5, 2025
## Issue:

When using tool calling on V0, xgrammar is falling back to outlines, and
we are unable to handle complex tool calling requests (used for Agentic
AI) that are handled instead with Nvidia.

It is not a failure, we have:
```
WARNING 11-26 20:25:33 [__init__.py:34] xgrammar does not support advanced JSON schema features like string length, item limits, or property bounds. Falling back to use outlines instead.
```
but the service is not usable - wrong parser. 

I've adapted this solution:


https://github.com/vllm-project/vllm/blob/v0.9.0.1/vllm/v1/structured_output/backend_xgrammar.py#L198
to the `has_xgrammar_unsupported_json_features()` function used in V0.

---------

## Essential Elements of an Effective PR Description Checklist
- [ ] The purpose of the PR, such as "Fix some issue (link existing
issues this PR will resolve)".
- [ ] The test plan, such as providing test command.
- [ ] The test results, such as pasting the results comparison before
and after, or e2e results


## Purpose

## Test Plan

## Test Result

<!--- pyml disable-next-line no-emphasis-as-heading -->

Signed-off-by: 12010486 <silvia.colabrese@intel.com>
Co-authored-by: Silvia Colabrese <silvia.colabrese@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants