b9656

ggml-org/llama.cppb9656Jun 15, 2026by github-actions[bot]same day as b9655

What changed since b9655

low risk

b9656 hardens PEG-native tool-call parsing with OpenAI-style support and clearer parse-failure errors, no behavior change on success.

New features

  • PEG-native tool-call parser now accepts an optional leading `type: "function"` field so OpenAI-style tool calls parse on templates that serialize starting at the name field.
  • OpenAI wrapper grammar trigger is now scoped through the autoparser flag, gating the lenient `type: function` handling behind `openai_wrapper_trigger`.

Improvements

  • Final PEG parse failures now log the unparsed fragment and raise a clear error instead of throwing raw parser position and input.
  • Non-JSON tool arguments are preserved as a raw string in `func_args_not_string` rather than aborting the prompt render.
  • Parser leniency is threaded from the generator into `build_json_tools_flat_keys`, keeping the change minimal and opt-in.

Bug fixes

  • Model output that fails the expected PEG format no longer silently yields an empty assistant turn.
  • Prompt rendering no longer aborts when tool-call arguments are not valid JSON.

Upgrade notes

Successful parses behave identically, so this is a drop-in replacement for most setups. If you depend on OpenAI-style tool calls with the PEG-native parser, confirm the autoparser/openai_wrapper_trigger flag is enabled, since the `type: function` leniency is gated on it. Expect clearer error messages plus logged unparsed fragments where failures previously surfaced as empty turns.

Analyzed Oct 31, 2026

Upgrading?

Release notes summary

Hardens the PEG-native parser for tool calls to better handle OpenAI-style formats and provides clearer error reporting. The release maintains standard build configurations.

Key Highlights

  • Harden PEG-native tool call parsing
  • Improved error handling and logging
  • Support for OpenAI style tool calls
  • Standard release builds for all platforms
  • Disabled KleidiAI build for macOS Apple Silicon

Release Notes (excerpt)

<details open> chat: harden peg-native tool call parsing (#24329) * chat: harden peg-native tool call parsing accept an optional leading type: function field in build_json_tools_flat_keys so openai style tool calls parse on templates whose serialization opens on the name field. return a clean error and log the unparsed fragment on a final peg parse failure instead of throwing the raw parser position and input. keep the raw arguments string in func_args_not_string when it is not…

Published by ggml-org on GitHub.

Read the full release notes

Related Repositories