Gemini 4 Argon in OpenCode: configuration and current limits
Configure Gemini 4 Argon with OpenCode’s native Google provider. See the tested version, signed-history behavior and unresolved continuation limits.
Read as MarkdownGemini 4 Argon can be configured in OpenCode through its native Google provider. The useful question is what happens after the first answer: does the client preserve signed parts, return tool results correctly and recognize a continuation response? Our offline check of OpenCode v1.19.0 found working text and tool-message handling, alongside gaps in long-output continuation and interrupted streams.
This guide gives you a starting configuration and the exact limits of that evidence. It does not establish a complete, live-tested SeedRouter coding-agent integration. For a smaller client with one deliberate request per turn, use the Python conversation tutorial.
Configure Gemini 4 Argon in OpenCode
Check the installed version with opencode --version. The results below apply to v1.19.0, the published build tested on October 14, 2026. A newer build needs its own verification; a feature in a development branch is not proof that an installed release supports it.[1]
Create an empty project directory for your first check. Download the OpenCode configuration into it. Its connection section is:
{
"provider": {
"google": {
"npm": "@ai-sdk/google",
"options": {
"apiKey": "{env:SEEDROUTER_API_KEY}",
"baseURL": "https://api.seedrouter.ai/v1beta"
},
"models": {
"gemini-4-argon": {
"name": "Gemini 4 Argon",
"reasoning": true,
"tool_call": true,
"limit": { "context": 1048576, "output": 4096 },
"options": {
"thinkingConfig": { "thinkingLevel": "low", "includeThoughts": true }
}
}
}
}
}
}OpenCode supports environment-variable substitution in configuration files.[2] Set SEEDROUTER_API_KEY in your shell without committing it to the project. The downloaded file also selects google/gemini-4-argon, disables sharing and automatic updates, and allows only the read tool. Review those permissions before using an existing repository. The reasoning and tool_call flags describe client behavior; they do not prove that a particular account or service supports every operation.
The 4096 output value is a deliberate starting budget in this configuration, not Argon's official maximum. Thinking consumes that budget. See the API reference for context, output and continuation rules.
Start with one short request
After reviewing the configuration and the current rates, run:
OPENCODE_CONFIG="$PWD/gemini-4-argon-opencode.json" \
OPENCODE_DISABLE_MODELS_FETCH=1 \
OPENCODE_DISABLE_AUTOCOMPACT=1 \
opencode run --model google/gemini-4-argon \
"Explain a mutex in one sentence. Do not use tools."This is a real model request when used with your key. OpenCode may retry failures or issue further requests during an agent run: the command is not a guaranteed single-call spending limit. Stop the process if the answer is incomplete or requests repeat. For strict manual control, use the Python example instead.
The native request path should end in gemini-4-argon:streamGenerateContent?alt=sse. In the tested build, the Google provider sent its credential in x-goog-api-key. This differs from the Bearer-header cURL examples in the general API tutorial; selecting a generic OpenAI provider does not produce the same native request.
What the offline checks established
The test used the released CLI, a local simulated API and dummy credentials. It made 17 loopback requests across eight scenarios. No model generated the replies, and the reported token values were artificial. These observations describe the client, not model quality or real billing.
| Scenario | Observed behavior in v1.19.0 |
|---|---|
| Native text stream | Combined separate text events into the expected answer |
| Second conversation turn | Preserved the tested thought and text signatures in model parts |
| Read-tool round trip | Read a temporary fixture file and returned its contents in functionResponse |
MAX_TOKENS | Reported a length stop without another request in that fixture |
| HTTP 400 | Exited with an error without retrying that fixture |
| HTTP 429 | Retried once when the next simulated response succeeded |
The test confirms that thinkingConfig was sent. It does not prove that a real service honored it. Similarly, passing a synthetic signature through history cannot establish that a real signature will be accepted in a later request.
Why long output needs additional care
Argon's CONTINUATION response requires the original request plus the latest top-level continuationToken. Partial output should not be appended to ordinary conversation history when resuming that generation.[3]
In our fixture, OpenCode v1.19.0 classified CONTINUATION as unknown. Its next request omitted the token and appended the partial answer to history. When a stream ended after partial output without a terminal event, the client also issued additional ordinary requests. The simulated service stopped that scenario after six calls; six is not an established client retry limit.
Consequently, this configuration is not a verified solution for Argon long decode. A successful short answer does not resolve these cases. Before relying on lengthy coding sessions, repeat the relevant checks with the exact client version you plan to use.
OpenCode setup questions
Does this include live tool and billing verification?
No. Basic SeedRouter text streaming has a separate local end-to-end acceptance result, but this OpenCode check used simulated responses. Real tool selection, signatures, media, account permissions and billing still need their own checks.
Can I use an OpenAI-compatible configuration instead?
That is a different protocol and compatibility scope. This guide checks native Gemini content and signatures. Google's long-decode documentation excludes its OpenAI-compatible endpoint from that capability.[3]
Will disabling automatic compaction disable retries?
No. Compaction and request retries are separate behaviors. The environment option in the example does not establish a hard limit on request count or cost.
Decide what to verify next
For Gemini 4 Argon in OpenCode, begin with a short text exchange, then verify the specific tool and history behavior your work needs. Treat continuation and interrupted streams as separate acceptance cases. Keep the model page and native API reference alongside the client configuration so protocol details and current prices remain easy to check.
Sources
[1] OpenCode v1.19.0 release and its provider implementation.



