GitHub Repo
Ollama Community Proposes Gemma 4 Tool-Reply Fix for Possible Blank Answers When Thinking Is Disabled
An October 8 report from the Ollama community says Gemma 4 may generate only control tokens and then stop after receiving tool results with thinking disabled, causing the API to return a blank message. The proposed fix includes renderer tests, but the full failure case has not been publicly reproduced and the patch has not been merged.

On October 8, the Ollama community reported a Gemma 4 tool-calling defect and proposed a fix involving follow-up generation through /api/chat when think: false is explicitly set. The reporter used gemma4:26b and said that, in a specific tool-result context, versions 0.35.1, 0.40.0, and unpatched 0.40.1 all returned blank replies: no body, tool call, or thinking content, yet the response ended with done_reason: "stop". Issue report
The official documentation says applications should add tool results to the conversation and send it back to the model to generate a follow-up answer; thinking output and the response body are placed separately in message.thinking and message.content. As a result, if an application checks only whether generation has stopped, it may treat this kind of blank message as a completed agent step, prematurely ending a multi-turn tool workflow. This is a risk analysis based on the API behavior. Tool calling documentation, thinking control documentation
The patch author traced the cause to prompt rendering: after a tool reply, the branch with thinking disabled did not prefill an empty thinking block, leaving the model to generate and close that block itself. The proposal adds a complete block when thinking is explicitly disabled, and tests the enabled, disabled, and unspecified settings across three Gemma 4 renderers. The author says a private failure case recovered tool calling in all five runs after the patch; this result is based on the author's own testing. Patch proposal
The limits of the evidence are central to this report. The reporter could not publish the full request containing private tool output, and replacing that content did not reproduce the final blank answer. On October 9, another tester confirmed only the prerequisite behavior: the model closing the thinking block itself. The public example can therefore be used to inspect rendering behavior, but it is not enough to independently verify the full failure path. Discussion
As of the time of review, the proposal remained open with no review record. Teams building agents with Gemma 4 can first log cases where both the body and tool calls are empty after a tool result, and use /api/show to check the model's thinking settings. They should then track a de-identified reproduction, maintainer review, and inclusion in a released version before evaluating the fix's effectiveness. Proposal status, settings documentation