Skip to content

OpenCode Go ​

Rho supports OpenCode Go as a first-party provider. Go is a Zen subscription that serves curated open coding models from https://opencode.ai/inference/go/v1.

Provider details ​

SettingValue
Provideropencode-go
Authopencode-go-api-key
Environment overrideOPENCODE_API_KEY
API basehttps://opencode.ai/inference/go/v1
Model sourceOpenCode Go /models
Metadatamodels.dev opencode-go

Subscribe in the OpenCode Zen console, copy the API key, and store it with Rho. Rho sends the key as a Bearer token for Chat Completions and Responses, as x-api-key for Anthropic Messages, and as x-goog-api-key for Gemini. Do not put the key in config.toml.

Interactive login ​

In the TUI, run /login and choose OpenCode, then Go subscription, or skip the picker:

text
/login opencode-go

If you already logged in to OpenCode Zen, leave the field blank and press Enter to reuse that key.

Rho stores the key and refreshes the models available on the Go gateway. Select one with /model, for example:

text
/model opencode-go/kimi-k2.7-code

Remove the stored key with:

text
/logout opencode-go

Environment and automation ​

For CI or development, set OPENCODE_API_KEY. It overrides a stored key.

bash
export OPENCODE_API_KEY="<api-key>"
rho --provider opencode-go \
  --auth opencode-go-api-key \
  --model opencode-go/kimi-k2.7-code \
  run "review this project"

Models and wire shape ​

Run /refresh-models to fetch the current Go catalog. Rho does not ship a baked default model; the first cached /models id is used until you pick one.

Cost, context, and reasoning controls come from models.dev under opencode-go. The same catalog names the AI SDK package for each model. Rho uses that package to choose Chat Completions, OpenAI Responses, Anthropic Messages, or Gemini generateContent. New Go models work after a models.dev refresh without a Rho update, as long as they use one of those packages.

For Chat Completions models that advertise only a reasoning toggle (such as qwen3.6-plus and qwen3.7-max), off sends reasoning_effort: "none"; max enables reasoning using the backend default without sending an unadvertised effort value. Models with explicit effort values, or a supported_reasoning_levels override in models.toml, still send the selected effort. Anthropic Messages thinking budgets are unchanged. Gemini models send the advertised level as thinkingLevel.

Data use

OpenCode lists some Go models, such as Gemini 4 Argon Contributor and the Muse Spark Contributor models, as not zero-data-retention: your prompts and completions may be used to train the provider's future models. Check the privacy table before sending private code or secrets to a model.

All four adapters send Rho's user agent and the required x-opencode-session routing header. Rho uses the conversation's prompt cache key to keep routing stable across turns and resumed sessions. SDK callers without a prompt cache key get a stable ID per provider instance; supply a distinct prompt_cache_key for each conversation when sharing a provider.

Use /limits to inspect the rolling 5-hour, weekly, and monthly usage windows when you are logged in.

See OpenCode's Go documentation for subscription limits and the live model list.