b9986

ggml-org/llama.cppb9986Jul 13, 2026by github-actions[bot]same day as b9985

What changed since b9985

low risk

b9986 is a single chat-template bug fix that stops reasoning content leaking with force-opened bare thinking templates.

Improvements

  • Reasoning start tags are now trimmed before prefix splitting, so tags carrying trailing whitespace (e.g. thinking\n) still match a bare prefill.
  • Template matching logic made more tolerant of whitespace variations between inferred and prefilled reasoning tags.

Bug fixes

  • Fixed reasoning content leaking into the visible response when a force-open template prefills a bare thinking tag.
  • Resolved the Nemotron Nano v2 regression caused by the mismatched reasoning tag prefix.

Upgrade notes

This is a drop-in patch with no config or API changes; only the chat templating path is affected. Upgrade if you use force-opened bare thinking templates or run Nemotron Nano v2, where reasoning text could previously bleed into output. No migration steps are required.

Analyzed Oct 24, 2026

Upgrading?

Release notes summary

A bug fix for the chat interface was implemented to prevent reasoning content from leaking when using force-opened bare templates, specifically addressing a regression with Nemotron Nano v2.

Key Highlights

  • Fixed reasoning leak in chat templates
  • Trimmed reasoning start tags to handle trailing whitespace
  • Fixed Nemotron Nano v2 regression
  • Improved template matching logic

New Features

  • Chat template reasoning leak fix

Release Notes (excerpt)

<details open> chat : fix reasoning leak with force-opened bare <think> templates (#24674) * chat : fix reasoning leak with force-opened bare <think> templates The reasoning start tag inferred from prior turns can carry trailing whitespace (e.g. <think>\n) while a force-open template prefills a bare <think>. Trim the tag used for the prefix split so the bare prefill is matched instead of being swallowed into content. * chat : fix Nemotron Nano v2 regression ---------…

Published by ggml-org on GitHub.

Read the full release notes

Related Repositories