Skip to content

chat : fix Muse Glimmer ignoring response_format json_schema with --jinja - #29615

Merged
pwilkin merged 3 commits into
ggml-org:masterfrom
vaibhavdedhia:glimmer-response-format
Sep 29, 2026
Merged

pwilkin merged 3 commits into
ggml-org:masterfrom
vaibhavdedhia:glimmer-response-format

Conversation

@vaibhavdedhia

@vaibhavdedhia vaibhavdedhia commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

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

@vaibhavdedhia
vaibhavdedhia requested review from a team and pwilkin as code owners September 28, 2026 21:18
@github-actions github-actions Bot added the testing Everything test related label Sep 28, 2026
@vaibhavdedhia vaibhavdedhia changed the title chat : fix Muse Glimmer ignoring response_format json_schema with --j… chat : fix Muse Glimmer ignoring response_format json_schema with --jinja Sep 28, 2026

@aldehir aldehir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR.

@pwilkin
pwilkin merged commit 139997d into ggml-org:master Sep 29, 2026
12 checks passed
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Everything test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Eval bug: Muse Glimmer ignores response_format json_schema with --jinja

3 participants