Repository navigation
chat : fix Muse Glimmer ignoring response_format json_schema with --jinja - #29615
Merged
Merged
Conversation
pwilkin
approved these changes
Sep 29, 2026
1 task
pierreguillot
pushed a commit
to Ircam-Partiels/llama.cpp
that referenced
this pull request
Oct 1, 2026
…inja (ggml-org#29615) * chat : fix Muse Glimmer ignoring response_format json_schema with --jinja Fixes ggml-org#29613 * chat : accept json fences and clean up * chat : fix choice parenthesis --------- Co-authored-by: Alde Rojas <hello@alde.dev>
frostyautumnleaf
pushed a commit
to frostyautumnleaf/llama.cpp
that referenced
this pull request
Oct 5, 2026
…inja (ggml-org#29615) * chat : fix Muse Glimmer ignoring response_format json_schema with --jinja Fixes ggml-org#29613 * chat : accept json fences and clean up * chat : fix choice parenthesis --------- Co-authored-by: Alde Rojas <hello@alde.dev>
edwardyoon
pushed a commit
to edwardyoon/focus-llama
that referenced
this pull request
Oct 7, 2026
…inja (ggml-org#29615) * chat : fix Muse Glimmer ignoring response_format json_schema with --jinja Fixes ggml-org#29613 * chat : accept json fences and clean up * chat : fix choice parenthesis --------- Co-authored-by: Alde Rojas <hello@alde.dev> (cherry picked from commit 139997d)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Fixes #29613
Upon providing json_schema, Muse Glimmer parser builds the grammar from start applying constraint from the first token. The schema enforced on final answer. Matching the behaviour of gpt-oss.cpp, json_schema takes precedence if both tools and a json_schema are provided.
Additional information
Tests: Added two tests and a grammar check in tests/test-chat.cpp. The check fails without the fix; the full test-chat passes with the fix applied.
schema-valid response gave 8/8 compared to 0/8 before on commit 6f856c7, tested on an M1 Pro 32GB with Metal.
Not run: full CI, perplexity or benchmarks.
The open question: enforce the schema or return an error - raised in the issue.
Requirements