Skip to content

gemma-4-26b and gemma-4-31b opencode interaction issues leading to tool loops/failures #21034

@pchuck

Description

@pchuck

Description

Gemma-4-26b and Gemma-4-31b, even with the latest tokenizer fixes, running on the latest patched engines, is not usable in OpenCode

Additional environment details

  • lmstudio: v0.4.9 - includes: "Improved Gemma 4 tool call reliability"
  • engine: metal llama.cpp v2.11.0 - includes "Gemma 4 improvements"
  • models: google, and unsloth/bartowski imatrix k-quants (including most recent updates as of 2026.04.04 w/ tokenizer fixes)

Model Settings

  • context: 64K
  • temperature: 1
  • top-k: 64
  • repeat penalty: 1.1
  • top-p: 0.95
  • min-p: 0.0
  • flash attention: on
  • cache quantization: off

Plugins

none

OpenCode version

v1.3.13

Steps to reproduce

Configure the model in opencode.json...

            "gemma-4-26b-a4b-it": { 
                "name": "gemma-4-26b-a4b-it",
                "limit": {
                    "context": 65536,
                    "output": 65536
                }
            },

Create a simple test file 'test.txt' in the current working directory

Send a simple prompt in OpenCode

read the file test.txt

Observe the failures:

  • tool failures
  • command repetition on tool success (model not seeing responses?)

(see screenshot)

Screenshot and/or share link

Image

Operating System

MacOS 26.4

Terminal

iTerm2

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions