Skip to content

Eval bug: Gemma4 fails to call tool after a thought session #32231

Closed

Description

@cristianadam

Name and Version

$ llama-server --version
version: 1.0.0-dev (build 12367, commit fe14cad)
built with AppleClang 21.0.0.21000401 for Darwin arm64

Note that I have:

93cf736 (tag: b12323) chat : refactor gemma4 to build loose schema rules and clean up (#31915)
in the checkout.

My jinja config has:

{#
  Template: Google Gemma 4 Canonical Chat Template
  Author: Google Gemma Engineering Team
  Published: 2026-07-09
  Context: Fixed tool-calling loops, turn closures, and thinking content-ordering.
#}

Operating systems

Mac

GGML backends

Metal

Hardware

Apple Studio M2 Ultra

Models

ggml-org/gemma-4-31B-it-GGUF:Q8_0

Problem description & steps to reproduce

Gemma4 will issue a tool call after a thought session, but the tool call will be displayed verbatim instead of actually calling the tool:

Let's check if there are other occurrences of carticel or other words missing ă in the translations.

<|tool_call>call:bash{command:<|"|>grep -r "carticel" translations/*_ro.ts<|"|>}<tool_call|>

First Bad Commit

No response

Relevant log output

I don't have any logging for the session.

Activity

  1. added 2 commits that reference this issue on Nov 14, 2026
    4cb48cd
    2b5d2b2
  2. added a commit that references this issue on Nov 14, 2026
    1c2adc7
  3. added a commit that references this issue on Nov 19, 2026
    b847bf3
  4. added a commit that references this issue on Nov 21, 2026
    d6e346a
  5. added a commit that references this issue on Nov 26, 2026
    6907047
  6. added a commit that references this issue on Nov 29, 2026
    7cd6fb7
  7. added a commit that references this issue on Nov 30, 2026
    d71f63d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions