Description
When using the Gemini model, it sometimes abruptly stops during tool calls, and at other times, it stops while thinking. However, with the same upstream source, if connected to chat tools like Chatbox or platforms like Kilo Code, it functions normally, so upstream issues can likely be ruled out.
I also used an AI gateway like AxonHub to check the logs. I can see a message indicating a stop with input but no output, and a specific response body is as follows:
{
"candidates": [
{
"index": 0,
"content": {
"role": "model"
},
"finishReason": "STOP"
}
],
"responseId": "18CRacGiPIuxjuMPw_mKkAk",
"modelVersion": "gemini-3-flash-preview",
"usageMetadata": {
"totalTokenCount": 22066,
"promptTokenCount": 22066
}
}
The "finishReason": "STOP" in the middle caught my attention, and it seems to be the cause of the abrupt termination of output.
Plugins
oh-my-opencode, opencode-axonhub-tracing
OpenCode version
1.2.4
Steps to reproduce
- Use custom channels, use Google's SDK
- When calling Gemini series models, there is a probability of sudden interruption. However, it will not suddenly interrupt when the model outputs text.
Screenshot and/or share link
Operating System
Windows 11 WSL2 Debian
Terminal
Windows Terminal
Description
When using the Gemini model, it sometimes abruptly stops during tool calls, and at other times, it stops while thinking. However, with the same upstream source, if connected to chat tools like Chatbox or platforms like Kilo Code, it functions normally, so upstream issues can likely be ruled out.
I also used an AI gateway like AxonHub to check the logs. I can see a message indicating a stop with input but no output, and a specific response body is as follows:
{ "candidates": [ { "index": 0, "content": { "role": "model" }, "finishReason": "STOP" } ], "responseId": "18CRacGiPIuxjuMPw_mKkAk", "modelVersion": "gemini-3-flash-preview", "usageMetadata": { "totalTokenCount": 22066, "promptTokenCount": 22066 } }The "finishReason": "STOP" in the middle caught my attention, and it seems to be the cause of the abrupt termination of output.
Plugins
oh-my-opencode, opencode-axonhub-tracing
OpenCode version
1.2.4
Steps to reproduce
Screenshot and/or share link
Operating System
Windows 11 WSL2 Debian
Terminal
Windows Terminal