llama.cpp fixes ignored top-level JSON Schema: HTTP success is not constraint enforcement
Merged November 9 and included in b12229, #28697 adds a fallback for response_format.schema. The nested wrapper still wins; this is an API fix, not a model capability upgrade.
Source: llama.cpp GitHub PR 与发布页
llama.cpp merged #28697 on November 9 and shipped it in b12229 within this reporting window. For response_format with type json_schema, the server now supports the schema placed directly under response_format. The PR is older; the new event is its merge and release, not fresh measurements from the earlier discussion.
-
An accepted request does not prove that its constraint was applied. Previously, the server only read response_format.json_schema.schema. The top-level form documented in the README could silently become an empty schema, leaving generation without the intended structural constraints. A successful connection or status code would not reveal this failure.
-
The fallback does not reverse precedence. The nested wrapper retains priority when both forms are present; callers should not assume that the constraints are merged. Pin one request shape and retain the exact JSON body. An empty schema is not equivalent to a schema with required fields and types.
-
Structural validity and factual correctness are separate. The contributor reported a small-model before/after check and added tests. AraoAI has not independently reproduced them. These checks do not establish arbitrary-model task accuracy, higher throughput, or correct values inside every valid JSON object.
For acceptance, retain the build, request body and raw response; validate required fields, types and additional-property rules against the same schema, then assess the answer separately. Keep weights and prompts fixed for the version comparison. The runtime's MIT license does not replace the model license. This is a released API parsing fix, not a blanket guarantee for structured tasks.
Source: https://github.com/ggml-org/llama.cpp/pull/28697 Release: https://github.com/ggml-org/llama.cpp/releases/tag/b12229