🔄 Авто-синхронизация: из Discussion #1044 каждые 6 часов.
Gonka AI x OpenCode¶
Автор: @Dankosik · Категория: Show and Tell · Создано: 2026-04-13 09:51 UTC · Обновлено: 2026-04-13 09:51 UTC
📝 Описание¶
Gonka AI x OpenCode¶
Hi everyone,
We just published a small OpenCode setup utility for GonkaGate.
@gonkagate/opencode-setup is an open source onboarding CLI for people who
already use opencode and want to point it at GonkaGate without making setup a
side quest. No hand-editing opencode.json, no shell profile secret exports,
and no need to learn the OpenCode custom-provider config shape before the first
request.
What we built¶
We built a local installer around:
It handles the config plumbing around provider setup, secret binding, scope
selection, and effective-config verification, then gets out of the way so you
can keep using plain opencode.
Why we built it¶
This is one of those pieces of plumbing that should be boring, but often is not. If you already have a GonkaGate key, the next step should not be "open three docs tabs and figure out where OpenCode wants provider config today."
The riskier parts are also the least fun: putting the secret in the wrong place,
leaving a repo-local opencode.json in a weird state, or thinking setup worked
because a file changed even though OpenCode resolves a different config at
runtime. We wanted the setup path to be short, explicit, and careful about what
it claims.
Quick start¶
Interactive¶
Non-interactive with GONKAGATE_API_KEY¶
Non-interactive with stdin¶
printf '%s' "$GONKAGATE_API_KEY" | npx @gonkagate/opencode-setup --api-key-stdin --scope project --yes
After setup:
What the installer does¶
- Checks that local
opencodeis available and supported. - Shows the public curated model picker in interactive mode.
- Asks for
userorprojectscope. - Accepts the GonkaGate key through a hidden prompt,
GONKAGATE_API_KEY, or--api-key-stdin. - Rejects plain
--api-key. - Keeps the secret out of repository-local files.
- Writes the user-level GonkaGate provider definition and secret binding.
- When
projectscope is selected, writes only activation settings to repo-localopencode.json. - Preserves unrelated OpenCode settings where it can.
- Creates rollback backups before replacing managed files.
- Verifies the durable plain-
opencodeconfig and the current session's effective OpenCode config before reporting success.
Gateway, OpenCode config, and transport¶
| Field | Current value |
|---|---|
| Provider id | gonkagate |
| Base URL | https://api.gonkagate.com/v1 |
| OpenCode transport target | chat/completions |
The project scope is intentionally conservative. The repo-local
opencode.json only gets activation settings. The provider definition and
secret binding stay in user scope, so the project file remains commit-safe by
default.
The installer does not write directly to auth.json, does not create .env
files, and does not mutate shell profiles.
Models right now¶
The public picker is deliberately small right now. It has one validated option:
| Status | Model |
|---|---|
| Current validated option | qwen/qwen3-235b-a22b-instruct-2507-fp8 |
We are treating this as a curated list, not a free-form custom model box. More options can be added as they pass the same OpenCode validation path.
What we're not claiming¶
The boundaries are explicit:
- no
/v1/responsessupport today - no arbitrary custom base URL override in v1
- no arbitrary custom model id support in v1
- no plain
--api-key - no shell profile edits
- no
.envgeneration - no direct writes to
auth.json - no live GonkaGate session verification yet
- no perfect explanation for every possible higher-precedence OpenCode config layer, although locally inspectable blockers are surfaced where possible
If /v1/responses support lands later, it should be a migration on this
integration, not a rename or a pretend-it-already-works claim.
Useful links¶
- Repository
- npm package
- README
- How it works
- Security notes
- Troubleshooting
- Model validation
- Changelog
- Issues and feedback
- GonkaGate
- Get a GonkaGate API key
- GonkaGate quickstart
- OpenCode