llama.cpp b12229 修复 response_format 顶层 json_schema 被忽略问题
原标题:b12229
AI 摘要
llama.cpp 发布 b12229 版本,修复了 server 端 OpenAI 兼容 chat completions 接口对 response_format 中 json_schema 的处理问题。此前当 schema 直接以 response_format.schema 顶层形式提供(README 中有文档、部分客户端也这样用)时会被静默忽略,导致生成不受约束;现在支持顶层 schema,并让 json_schema 包装器按是否存在优先,同时补充了错误信息、README 文档和测试用例。
正文节选
<details open> server : fix response_format json_schema when schema is not nested in the json_schema wrapper (#28697) * server : accept top-level schema in response_format with type json_schema The OpenAI-compatible chat completions endpoint only applied the schema when it was nested inside response_format.json_schema.schema. When the schema was provided directly as response_format.schema (as documented in the server README, and used by some clients), it was silently ignored and generation ra