Gemma 4 (26B/31B) models stream reasoning inside <thought>...</thought> tags. Zoo Code currently only parses <think>, so the reasoning is treated as plain text. This causes:
- reasoning leaks into the chat
- the agent doesn't see a tool call on the first turn, triggering an unnecessary retry
To Reproduce
Steps to reproduce the behavior:
-
Add an OpenAI-Compatible provider pointing to a Gemma 4 model.
-
Base URL set to https://generativelanguage.googleapis.com/v1beta/openai
-
Set API Key obtained from https://aistudio.google.com/api-keys
-
Choose a reasoning Gemma4 model. There are only 2 options: models/gemma-4-26b-a4b-it and models/gemma-4-31b-it. Optionally, you can set Context Window Size to 256000 below.
Expected behavior
-
Save. Make sure it is selected down below.
-
Send any simple prompt (e.g., "2+2? Give only the answer")
-
Observe raw ... in output
Version: 3.55.0 (d63e7bd)
The tags <thought></thought> wrapped around the reasoning are not expected to show up. Moreover, the whole reasoning should be wrapped into the expandable Thinking item.
What is expected? I already implemented this fix and I creating this feature only because I have to reference the issue.
Here is what is expected
Version: 3.55.0 (6966807)
Additional context
A similar issue alongside with a PR have already been presented for Roo Code:
RooCodeInc/Roo-Code#7615
RooCodeInc/Roo-Code#7617
It was closed. But note that other extensions like Kilo Code somehow solve that issue.
Also, it is not clear why Gemma4 and some other models in Zoo Code so often mention the tools like attempt_completion in the screenshots. I haven't experienced that for other models providing the same API Keys.
And sometimes they trigger additional API Request, even having the correct answer already, which I also did not see in other extensions

(in this screenshot, openrouter free model was configured, but it happens with other model, it's just an example)
In the history, I see a message from a user like: [ERROR] You did not use a tool in your previous response! Please retry with a tool use.. And the rest info. However, it would be absolutely fine to just throw the result to the output and let a user decide what do to next or at least give a user a button like: Model did not use a tool. If you don't satisfied with the result, click below. And a button like "Proceed with a tool".
Gemma 4 (26B/31B) models stream reasoning inside
<thought>...</thought>tags. Zoo Code currently only parses<think>, so the reasoning is treated as plain text. This causes:To Reproduce
Steps to reproduce the behavior:
Add an OpenAI-Compatible provider pointing to a Gemma 4 model.
Base URLset to https://generativelanguage.googleapis.com/v1beta/openaiSet API Key obtained from https://aistudio.google.com/api-keys
Choose a reasoning Gemma4 model. There are only 2 options:
Expected behavior
models/gemma-4-26b-a4b-itandmodels/gemma-4-31b-it. Optionally, you can set Context Window Size to256000below.Save. Make sure it is selected down below.
Send any simple prompt (e.g., "2+2? Give only the answer")
Observe raw ... in output
Version: 3.55.0 (d63e7bd)
The tags
<thought></thought>wrapped around the reasoning are not expected to show up. Moreover, the whole reasoning should be wrapped into the expandable Thinking item.What is expected? I already implemented this fix and I creating this feature only because I have to reference the issue.
Here is what is expected
Version: 3.55.0 (6966807)
Additional context
A similar issue alongside with a PR have already been presented for Roo Code:
RooCodeInc/Roo-Code#7615
RooCodeInc/Roo-Code#7617
It was closed. But note that other extensions like Kilo Code somehow solve that issue.
Also, it is not clear why Gemma4 and some other models in Zoo Code so often mention the tools like
attempt_completionin the screenshots. I haven't experienced that for other models providing the same API Keys.And sometimes they trigger additional API Request, even having the correct answer already, which I also did not see in other extensions
In the history, I see a message from a user like:
[ERROR] You did not use a tool in your previous response! Please retry with a tool use.. And the rest info. However, it would be absolutely fine to just throw the result to the output and let a user decide what do to next or at least give a user a button like: Model did not use a tool. If you don't satisfied with the result, click below. And a button like "Proceed with a tool".