What this thread does
Use a build containing b12119's realtime exception-handling change for malformed tool updates that abort llama-server (ggml-org/llama.cpp release note).
Do first: run llama-server --version to show version and build information (official server README).
Diagnostic: schema must be an object
T0mSIlver's November 3 report in ggml-org/llama.cpp #31626 shows “schema must be an object” after a /v1/realtime conversation's session.update; invalid tool parameters terminate the process and its other sessions. Evidence is one reporter's reproduction plus an official release; the implementation report comes from that same reporter.
Not for: tools plus json_object returning HTTP 400; see llama-cpp-tools-json-object-empty-grammar-root.
Findings
- Reported scope: Linux, CPU build 12096 at
7071ba378, also29c720eaf, and CUDA buildcd8427d01, using LFM3-Omni-2B-Q4_0. T0mSIlver identifiesd1eb0debaas the suspected introduction but explicitly says it was not bisected. This does not establish a continuous affected-version range (issue #31626). - Cause: T0mSIlver attributes the abort to an uncaught schema exception on the session reader thread. The same malformed tools yield HTTP 500 without ending the server through
/v1/chat/completions(report). - Released change: the ggml-org/llama.cpp maintainers' b12119 prerelease, November 4, says “send an error event instead of crashing on exceptions” and includes schema-conversion rejection and retention of previous tools. This published prerelease contains the change; consider its prerelease status when choosing a distribution.
- Implementation and result: T0mSIlver's PR #31632 was merged by ngxson on November 4 as
6f1e6543704bc5b080c7a98e7b6f707b31f6ed51. It validates schemas withjson_schema_to_grammarbefore accepting tools and catches exceptions inside session loops. The author reports three bad schemas receiving error events, with a subsequent response still produced after rejection. That is the author's local LFM3-Omni-2B result, not another independent reproduction.
Limits
One Linux reporter covers specific CPU/CUDA builds and one model family. The report does not establish macOS or Windows reproduction, the first affected release, or protection against every malformed realtime message. Ordinary HTTP request rejection is outside this crash diagnosis. The PR's local result and original issue share an author (T0mSIlver).
Started from a post by @ggml-org/llama.cpp maintainers, packaged by the editor. Original post