
Bare JSON Tool-Call Trigger Added in llama.cpp b12634
The open-source inference project llama.cpp published release b12634 on November 22, 2026, introducing a targeted fix for structured tool calling under automatic tool selection. Tracked as pull request #32497 under the commit title chat : trigger lazy grammar on bare JSON tool calls, the update addresses a parsing and constraint-activation gap affecting models that emit function invocations without a preceding wrapper tag or special token.
Maintainer ViezeVingertjes tagged release b12634 in the ggml-org/llama.cpp GitHub repository at 11:19 UTC on November 22, 2026. According to the release note, models such as the Llama 3.x family output tool calls as plain {"name": ...} JSON objects without a dedicated start marker. Because the chat handling layer previously relied on an explicit start marker to activate lazy grammar constraints when tool_choice=auto was configured, no grammar was generated at all for those bare JSON calls. Release b12634 resolves that omission by switching to a pattern trigger matched against the opening of the JSON call object.
Technical Mechanism and Primary Release Metadata
Strictly based on the b12634 release record, the change operates inside the chat subsystem and centers on two named mechanisms: lazy grammar activation and the tool_choice=auto execution mode. In constrained decoding, a lazy grammar remains inactive while a model generates ordinary natural-language text and engages only after the token stream crosses a recognized trigger, enforcing valid JSON schema structure for the remainder of the tool call. When a model omits a preamble token and begins directly with a bare {"name": ...} object, a marker-based trigger never fires.
By substituting a pattern trigger anchored to the opening of the call object, pull request #32497 allows the grammar sampler to engage dynamically without forcing every response into a rigid JSON schema from the first token. The release entry identifies commit hash 42f6a58, created on GitHub and signed with a verified GPG signature (key ID B5690EEEBB952194). It also discloses that development received assistance from Claude Code and lists two downloadable release assets on the GitHub tag page. The primary release note does not publish exact regular-expression strings, supported backend lists, latency numbers, memory footprints, or throughput benchmarks.
Impact on Developer Workflows and Agentic Pipelines
For open-source developers running local inference stacks or self-hosted chat endpoints, reliable tool_choice=auto behavior is critical whenever an application blends conversational replies with function execution. When a user prompt does not require an external tool, forcing a strict JSON grammar upfront prevents the model from answering normally. Conversely, when a model like Llama 3.x decides mid-generation to invoke a function using bare {"name": ...} syntax, failing to activate any grammar leaves the output unconstrained, increasing the risk of malformed brackets, trailing text, or invalid argument types that break downstream JSON parsers.
Applying a pattern trigger at the opening of the call object bridges that gap for multi-turn agent loops, coding assistants, and local orchestration frameworks that depend on tool_choice=auto semantics. Teams building around Llama 3.x checkpoints or similar bare-JSON tool-calling models gain a cleaner path to schema-validated arguments without rewriting prompt templates to inject artificial start markers. At the same time, the disclosure that Claude Code assisted in authoring #32497 highlights how maintainers in active open-source inference repositories are pairing automated coding assistants with GPG-signed human review and release tagging.
Scope Limits, Verification Gaps, and Operational Caveats
Several practical boundaries apply to release b12634. First, the primary tag page does not specify which quantized formats, hardware backends, or operating-system binaries correspond to the two listed assets, nor does it include test matrices or pass/fail counts across model families beyond citing Llama 3.x as an example. Operators upgrading local inference servers should inspect the underlying commit diff for 42f6a58 and validate their specific model templates before assuming every bare-JSON variant is matched.
Second, pattern triggers matched to the opening of a JSON object carry an inherent edge case: if a model emits an ordinary conversational JSON snippet or code block resembling a call object under tool_choice=auto, the lazy grammar could engage prematurely and constrain text that was not intended as a function call. Finally, the primary release page does not state repository licensing terms, hardware acceleration requirements, or regulatory compliance claims. Because release b12634 is an incremental tagged build in a fast-moving inference project, engineering teams should treat the release note as an upstream code fix awaiting local regression testing across their own tool schemas and deployment environments.
EXPLORE THE SOURCE
Projects in this story
GitHub repositories
- ggml-org/llama.cpp ↗View project details
Automated Vertex AI (gemini-4-hydrogen) primary-source report; reviewed 2026-11-23.


