[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$f241xxygbbbkae":3},{"slug":4,"category":5,"publishedAt":6,"titleZh":7,"titleEn":8,"summaryZh":9,"summaryEn":10,"models":11,"hardwares":12,"bodyZh":13,"bodyEn":14,"sourceName":15,"sourceUrl":16,"updatedAt":17},"llamacpp-b12229-json-schema-fallback-2026-11-10","RUNTIME","2026-11-09T23:05:40.815Z","llama.cpp 修复顶层 JSON Schema 被忽略：接口成功不代表约束生效","llama.cpp fixes ignored top-level JSON Schema: HTTP success is not constraint enforcement","11月9日合并的 #28697 进入 b12229，补上 response_format.schema 的读取回退。嵌套包装仍优先；此次是接口兼容修复，不是模型能力提升。","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.",[],[],"llama.cpp 于 11 月 9 日合并 #28697，并在窗口内发布的 b12229 中纳入结构化输出修复：response_format 的 type 为 json_schema 时，服务端现在支持直接读取顶层 schema。PR 创建于更早时间；今天的新事实是合并和发行，讨论中的旧测试不是今日新实测。\n\n1. 请求被接受，不代表约束被执行。原实现只读取 response_format.json_schema.schema。若客户端按当时 README 的写法，把 schema 直接放在 response_format 下，它可能被静默替换为空 schema，生成失去预期的结构约束。这类问题没有明显的连接报错，却会让下游解析与自动化流程不稳定。\n\n2. 新增回退，不是颠倒优先级。修复兼容顶层形式，同时保留嵌套包装的优先权；两者同时存在时，不应假定服务端会合并两份约束。部署时选定一种请求形状，保留实际发送的 JSON，比只记录“OpenAI 兼容”更有诊断价值。空 schema 与具有明确字段和类型的 schema，也不能当成相同验收条件。\n\n3. 结构正确与答案正确要分开。作者报告过小型测试模型的修复前后对照，补丁包含相应测试；这些只支持指定接口路径的行为判断。本站没有独立复现，不将测试扩写成任意模型都能正确填值，也不宣称修复带来吞吐或推理能力提升。能解析为 JSON，只是输出契约的一部分，不是内容真实性证明。\n\n实际验收应保留构建号、请求体和原始响应，再用同一份 schema 检查必填字段、类型及额外字段限制，另行检验任务答案。升级前后的对照必须使用同样权重和提示。llama.cpp 的 MIT 许可也不替代模型许可。此次可确认的是一处已发版的约束读取修复，而不是结构化任务的全面保证。\n\n来源：https:\u002F\u002Fgithub.com\u002Fggml-org\u002Fllama.cpp\u002Fpull\u002F28697\n发布：https:\u002F\u002Fgithub.com\u002Fggml-org\u002Fllama.cpp\u002Freleases\u002Ftag\u002Fb12229","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.\n\n1. 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.\n\n2. 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.\n\n3. Structural validity and factual correctness are separate. The contributor reported a small-model before\u002Fafter 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.\n\nFor 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.\n\nSource: https:\u002F\u002Fgithub.com\u002Fggml-org\u002Fllama.cpp\u002Fpull\u002F28697\nRelease: https:\u002F\u002Fgithub.com\u002Fggml-org\u002Fllama.cpp\u002Freleases\u002Ftag\u002Fb12229","llama.cpp GitHub PR 与发布页","https:\u002F\u002Fgithub.com\u002Fggml-org\u002Fllama.cpp\u002Fpull\u002F28697","2026-11-09T23:05:40.816Z"]