[GH-ISSUE #15573] Infinity loop in tool calls with Gemma4 + Ollama 0.20.6+ #35701

Open
opened 2026-04-22 20:23:11 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @ByCzech on GitHub (Apr 14, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/15573

What is the issue?

Upgrade Ollama to version 0.20.6 (edit and 0.20.7 too) causing infinity loop in tool calls with gemma4:31b. After reverting back to version 0.20.5 this problem will disappear. Observed only with the gemma4 model, other models e.g. qwen3.5 work with tool calls without problems.

Relevant log output


OS

Linux

GPU

AMD

CPU

AMD

Ollama version

0.20.6 / 0.20.7 / 0.21.0

Originally created by @ByCzech on GitHub (Apr 14, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/15573 ### What is the issue? Upgrade Ollama to version 0.20.6 (edit and 0.20.7 too) causing infinity loop in tool calls with gemma4:31b. After reverting back to version 0.20.5 this problem will disappear. Observed only with the gemma4 model, other models e.g. qwen3.5 work with tool calls without problems. ### Relevant log output ```shell ``` ### OS Linux ### GPU AMD ### CPU AMD ### Ollama version 0.20.6 / 0.20.7 / 0.21.0
GiteaMirror added the bug label 2026-04-22 20:23:11 -05:00
Author
Owner

@PureBlissAK commented on GitHub (Apr 18, 2026):

🤖 Automated Triage & Analysis Report

Issue: #15573
Analyzed: 2026-04-18T18:20:40.963033

Analysis

  • Type: unknown
  • Severity: medium
  • Components: unknown

Implementation Plan

  • Effort: medium
  • Steps:

This issue has been triaged and marked for implementation.

<!-- gh-comment-id:4274306969 --> @PureBlissAK commented on GitHub (Apr 18, 2026): <!-- ollama-issue-orchestrator:v1 issue:15573 --> ## 🤖 Automated Triage & Analysis Report **Issue**: #15573 **Analyzed**: 2026-04-18T18:20:40.963033 ### Analysis - **Type**: unknown - **Severity**: medium - **Components**: unknown ### Implementation Plan - **Effort**: medium - **Steps**: *This issue has been triaged and marked for implementation.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#35701