[GH-ISSUE #6248] [Issue]: Gemma 4 tool calls are not executed in 2.4.6 #3488

Closed
opened 2026-10-21 06:03:35 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @SpicyMarinara on GitHub (Sep 15, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6248

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Tool calling in RP mode appears broken for a llama-server-hosted Gemma 4-derived model after updating to Marinara Engine 2.4.6. The model emits a literal tool-call block instead of executing the configured tool, and updating to the latest official Gemma 4 Jinja template did not resolve the issue.

Expected behavior

The model should issue a valid tool call that Marinara recognizes and executes for the configured dice tool.

Actual behavior

Thinking stops and the model outputs the literal block <|tool_call>call:dice_roll{dice_count:1,dice_sides:100}<tool_call|> instead of executing the tool. The configured tool is named roll_dice, but the emitted call uses dice_roll.

Steps to reproduce

  1. Use Marinara Engine 2.4.6 with a llama-server-hosted Gemma 4-derived model.
  2. Use RP mode and configure a dice tool named roll_dice.
  3. Use the latest official Gemma 4 Jinja template from the Hugging Face repository.
  4. Use a prompt or interaction that causes the model to call the dice tool.
  5. Observe that the model stops thinking and emits a literal tool-call block instead of invoking the tool.

Environment

  • Marinara Engine version: 2.4.6
  • Install type: Not provided
  • OS + version: Not provided
  • Browser or app shell: Not provided

Logs, screenshots, or video

Diagnostic console logs: [debug] Thinking tokens (622 chars): ... Let's use the tool. and [debug] Token usage — prompt: 12329 completion: 216 visibleCompletion: unknown (provider did not split hidden thinking) reasoning: unreported total: 12545 cached: 0 cacheWrite: N/A finish: stop. No screenshots or video were provided.

Additional context

The behavior worked before the update and was tested in both a session created before the update and a fresh session created afterward. Updating the Gemma 4 template did not fix it. The report refers to Marinara's engine backend, not a Marinara-hosted model backend. Support diagnostics and the model or agent version were not provided in the Discord context.

Discord thread: Tool calling broken with Gemma 4 in 2.4.6?
Discord thread link: https://discord.com/channels/1417099416812392641/1549523809843814602
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (9 messages)
[2026-09-15T20:54:25.027Z] IRCWasBetter: Noticed that tool calling in RP mode (at least) seems broken with Gemma 4-derived models in the new version. Worked fine before the update. During the thinking block, it goes to call the tool, then thinking stops and it outputs:

> <|tool_call>call:dice_roll{dice_count:1,dice_sides:100}<tool_call|>
not sure what changed on the back end to cause this. i tried it in both a session that existed pre-update and one that was created fresh AFTER the update.

Also checked to make sure i was using the latest jinja gemma 4 template. i actually wasn't, so I updated it! But the problem persisted, so I don' t think it's a chat template issue since I'm using the latest official one from the huggingface repo

this pops up in the diagnostic logs on the console:

> {"level":40,"time":1789504994022,"pid":41588,"hostname":"xxxx-pc-2023","msg":"[debug] Thinking tokens (622 chars):\nThe user wants me to ... elided details ...\n\nLet's use the tool."}
> {"level":40,"time":1789504994022,"pid":41588,"hostname":"xxxx-pc-2023","msg":"[debug] Token usage — prompt: 12329  completion: 216  visibleCompletion: unknown (provider did not split hidden thinking)  reasoning: unreported  total: 12545  cached: 0  cacheWrite: N/A  finish: stop"}
not sure if that's diagnostically relevant or not
[Discord message: https://discord.com/channels/1417099416812392641/1549523809843814602/1549523809843814602]

[2026-09-15T20:54:25.570Z] Professor Mari [bot]: Howdy!

Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.**

**Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab:

`Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.`

If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here:

`Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version`

Thank you, this will help tremendously.

This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case.

Cheers!
[Discord message: https://discord.com/channels/1417099416812392641/1549523809843814602/1549523812121579602]

[2026-09-15T21:06:01.150Z] Marinara: We don’t have a backend, unless you mean the Gemma for agents?
[Discord message: https://discord.com/channels/1417099416812392641/1549523809843814602/1549526729595424832]

[2026-09-15T21:06:08.920Z] Marinara: The side cart one.
[Discord message: https://discord.com/channels/1417099416812392641/1549523809843814602/1549526762185162823]

[2026-09-15T21:07:29.193Z] IRCWasBetter: I mean "the engine backend", as opposed to the front-end. sorry if I was unclear there
[Discord message: https://discord.com/channels/1417099416812392641/1549523809843814602/1549527098874662913]

[2026-09-15T21:08:19.794Z] IRCWasBetter: I have a llama-server hosted gemma4 model that I'm using. Like I mentioned, this was ok in the prior version but abruptly broke after the update, nothing else changed
[Discord message: https://discord.com/channels/1417099416812392641/1549523809843814602/1549527311110512673]

[2026-09-15T21:08:59.634Z] IRCWasBetter: what's interesting is the tool is named roll_dice but it's outputting dice_roll in the tool call block, that's weirdly suspicious to me
[Discord message: https://discord.com/channels/1417099416812392641/1549523809843814602/1549527478211448963]

[2026-09-15T21:10:53.831Z] Marinara: Is it using a wrong tool now?
[Discord message: https://discord.com/channels/1417099416812392641/1549523809843814602/1549527957188386829]

[2026-09-15T21:10:57.394Z] Marinara: Weird.
[Discord message: https://discord.com/channels/1417099416812392641/1549523809843814602/1549527972132954194]

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Sep 15, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6248 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Tool calling in RP mode appears broken for a llama-server-hosted Gemma 4-derived model after updating to Marinara Engine 2.4.6. The model emits a literal tool-call block instead of executing the configured tool, and updating to the latest official Gemma 4 Jinja template did not resolve the issue. ## Expected behavior The model should issue a valid tool call that Marinara recognizes and executes for the configured dice tool. ## Actual behavior Thinking stops and the model outputs the literal block `<|tool_call>call:dice_roll{dice_count:1,dice_sides:100}<tool_call|>` instead of executing the tool. The configured tool is named `roll_dice`, but the emitted call uses `dice_roll`. ## Steps to reproduce 1. Use Marinara Engine 2.4.6 with a llama-server-hosted Gemma 4-derived model. 2. Use RP mode and configure a dice tool named `roll_dice`. 3. Use the latest official Gemma 4 Jinja template from the Hugging Face repository. 4. Use a prompt or interaction that causes the model to call the dice tool. 5. Observe that the model stops thinking and emits a literal tool-call block instead of invoking the tool. ## Environment - Marinara Engine version: 2.4.6 - Install type: Not provided - OS + version: Not provided - Browser or app shell: Not provided ## Logs, screenshots, or video Diagnostic console logs: `[debug] Thinking tokens (622 chars): ... Let's use the tool.` and `[debug] Token usage — prompt: 12329 completion: 216 visibleCompletion: unknown (provider did not split hidden thinking) reasoning: unreported total: 12545 cached: 0 cacheWrite: N/A finish: stop`. No screenshots or video were provided. ## Additional context The behavior worked before the update and was tested in both a session created before the update and a fresh session created afterward. Updating the Gemma 4 template did not fix it. The report refers to Marinara's engine backend, not a Marinara-hosted model backend. Support diagnostics and the model or agent version were not provided in the Discord context. Discord thread: Tool calling broken with Gemma 4 in 2.4.6? Discord thread link: https://discord.com/channels/1417099416812392641/1549523809843814602 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (9 messages)</summary> ```text [2026-09-15T20:54:25.027Z] IRCWasBetter: Noticed that tool calling in RP mode (at least) seems broken with Gemma 4-derived models in the new version. Worked fine before the update. During the thinking block, it goes to call the tool, then thinking stops and it outputs: > <|tool_call>call:dice_roll{dice_count:1,dice_sides:100}<tool_call|> not sure what changed on the back end to cause this. i tried it in both a session that existed pre-update and one that was created fresh AFTER the update. Also checked to make sure i was using the latest jinja gemma 4 template. i actually wasn't, so I updated it! But the problem persisted, so I don' t think it's a chat template issue since I'm using the latest official one from the huggingface repo this pops up in the diagnostic logs on the console: > {"level":40,"time":1789504994022,"pid":41588,"hostname":"xxxx-pc-2023","msg":"[debug] Thinking tokens (622 chars):\nThe user wants me to ... elided details ...\n\nLet's use the tool."} > {"level":40,"time":1789504994022,"pid":41588,"hostname":"xxxx-pc-2023","msg":"[debug] Token usage — prompt: 12329 completion: 216 visibleCompletion: unknown (provider did not split hidden thinking) reasoning: unreported total: 12545 cached: 0 cacheWrite: N/A finish: stop"} not sure if that's diagnostically relevant or not [Discord message: https://discord.com/channels/1417099416812392641/1549523809843814602/1549523809843814602] [2026-09-15T20:54:25.570Z] Professor Mari [bot]: Howdy! Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.** **Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab: `Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.` If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here: `Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version` Thank you, this will help tremendously. This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case. Cheers! [Discord message: https://discord.com/channels/1417099416812392641/1549523809843814602/1549523812121579602] [2026-09-15T21:06:01.150Z] Marinara: We don’t have a backend, unless you mean the Gemma for agents? [Discord message: https://discord.com/channels/1417099416812392641/1549523809843814602/1549526729595424832] [2026-09-15T21:06:08.920Z] Marinara: The side cart one. [Discord message: https://discord.com/channels/1417099416812392641/1549523809843814602/1549526762185162823] [2026-09-15T21:07:29.193Z] IRCWasBetter: I mean "the engine backend", as opposed to the front-end. sorry if I was unclear there [Discord message: https://discord.com/channels/1417099416812392641/1549523809843814602/1549527098874662913] [2026-09-15T21:08:19.794Z] IRCWasBetter: I have a llama-server hosted gemma4 model that I'm using. Like I mentioned, this was ok in the prior version but abruptly broke after the update, nothing else changed [Discord message: https://discord.com/channels/1417099416812392641/1549523809843814602/1549527311110512673] [2026-09-15T21:08:59.634Z] IRCWasBetter: what's interesting is the tool is named roll_dice but it's outputting dice_roll in the tool call block, that's weirdly suspicious to me [Discord message: https://discord.com/channels/1417099416812392641/1549523809843814602/1549527478211448963] [2026-09-15T21:10:53.831Z] Marinara: Is it using a wrong tool now? [Discord message: https://discord.com/channels/1417099416812392641/1549523809843814602/1549527957188386829] [2026-09-15T21:10:57.394Z] Marinara: Weird. [Discord message: https://discord.com/channels/1417099416812392641/1549523809843814602/1549527972132954194] ``` </details> ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 06:03:35 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@SpicyMarinara commented on GitHub (Sep 15, 2026):

Solved, the model ws just dumb.

<!-- gh-comment-id:5688881656 --> @SpicyMarinara commented on GitHub (Sep 15, 2026): Solved, the model ws just dumb.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#3488
No description provided.