794 words
4 minutes

OpenCode Go Setup: Connect the Provider and Select a Model

2026-08-17
AI
OpenCode
/
AI
/
CLI
/
Troubleshooting

OpenCode Go setup is a short TUI flow: subscribe through OpenCode, run /connect, choose OpenCode Go, paste the API key, and run /models to see the models available to that account. The provider is optional; installing OpenCode does not automatically subscribe you to Go.

The important boundary is between authentication and model selection. A successful key entry does not prove that the model ID in a saved configuration is still available, and a model limit is not the same thing as an OpenCode configuration error.

Complete the OpenCode Go connection flow#

OpenCode’s current Go documentation describes Go as a provider that works inside the normal OpenCode workflow. Use this order:

  1. Sign in to OpenCode and subscribe to Go if the account needs the subscription.
  2. Copy the API key from the OpenCode account or console page.
  3. Start OpenCode in the project where you want to use it.
  4. Run /connect in the TUI.
  5. Select OpenCode Go, then paste the key when prompted.
  6. Run /models and choose a model that is listed for the connected account.

The key should be entered through the provider flow, not committed to opencode.json, a shell script, or a public issue. If the terminal keeps a command history, avoid putting the full key in a command-line argument.

Verify the provider before changing configuration#

Use the TUI to check the boundary in small steps:

/connect
/models

If /models shows the Go catalog, authentication and provider discovery are working. Select a model from that output and run a small, read-only request before assigning it to a long-running workflow.

OpenCode’s provider documentation uses a provider/model format for explicit model configuration. The Go guide currently shows IDs such as opencode-go/kimi-k3; the catalog can change, so copy the exact ID shown by your installed OpenCode version instead of keeping a model name from an old screenshot.

An explicit configuration can look like this:

{
"$schema": "https://opencode.ai/config.json",
"model": "opencode-go/kimi-k3"
}

Treat the model value as a checked input. If the model disappears from /models, replace the value with a currently listed ID and verify the request again. Do not add a custom provider block merely because a catalog model changed.

Keep Go limits separate from setup failures#

The Go documentation currently describes dollar-based limits for a five-hour window, a week, and a month. Those limits are usage policy, not evidence that the key or model configuration is invalid. The same page also says that the model list and limits may change as the service evolves.

Use this diagnosis order when a request fails:

SymptomCheck firstWhat it means
Go is missing from /connectAccount and subscription stateThe TUI has not exposed the provider to this account yet.
The key is rejectedThe key source and pasted valueRe-enter or replace the credential through the OpenCode account flow.
/models is empty or missing a modelThe current provider catalogThe saved model ID may be stale, or the catalog is not available to this account.
A request stops after sustained useGo usage limits and the account consoleA limit can block further usage without invalidating the setup.
A custom provider request failsThe provider package and settings fieldsCustom provider options are package-specific; Go does not need a hand-written endpoint just to use its catalog.

If the problem is local command execution rather than provider access, keep those concerns separate. For example, Codex’s --approve-for-me boundary controls approval review and sandbox policy; connecting a model provider does not change what a local coding tool may write.

Use the current catalog as the source of truth#

OpenCode Go’s model list is intentionally not a permanent contract. Before putting a model ID in a team config:

  1. Run /models with the same account that will run the workflow.
  2. Record the exact opencode-go/<model-id> value.
  3. Test one small request with the repository’s normal permissions.
  4. Keep a fallback model or documented change procedure if the workflow is operationally important.

This makes a model change visible as a provider-catalog change instead of an unexplained application failure. It also prevents a copied model table from turning into stale configuration.

Takeaway#

The reliable OpenCode Go setup is /connect followed by /models, with the current catalog deciding the model ID. Keep the API key out of files, treat usage limits as a separate account boundary, and only pin a model after the connected account has listed and answered with it.

FAQ#

Q: Do I need an OpenCode Go subscription to use OpenCode?#

A: No. OpenCode Go is an optional provider. You can use OpenCode with other providers or local models; Go adds its own subscription and catalog when you choose to connect it.

Q: Why does opencode-go/kimi-k3 stop working later?#

A: The provider catalog can change, and the model may no longer be listed for the account. Run /models, copy a currently available ID, and test it before changing a shared configuration.

Q: Should I put the OpenCode Go API key in opencode.json?#

A: No. Use /connect and the provider’s credential storage. A project configuration should contain a model choice or other non-secret settings, not a long-lived API key.

References:

OpenCode Go documentation

OpenCode provider configuration

OpenCode Go Setup: Connect the Provider and Select a Model
https://laplusda.com/en/posts/opencode-go-provider-setup/
Author
Zero
Published at
2026-08-17
License
CC BY-NC-SA 4.0
Was this article useful?

Report a typo or broken link, or suggest a related topic.