OpenClaw
OpenClaw includes OpenCode providers for pay-as-you-go and Go. It picks the right API for each
paid or Go model and sends a session ID with every Go request. Free-tier chat models require OpenCode and return HTTP
403 from OpenClaw.
| Provider | Plan | Model prefix |
|---|---|---|
opencode | Pay-as-you-go | opencode/... |
opencode-go | Go | opencode-go/... |
The Go provider ships with OpenClaw. The pay-as-you-go provider is a plugin; install it if openclaw models list
doesn’t show it.
openclaw plugins install @openclaw/opencode-providerSign in from the browser instead of pasting a key. It needs OpenClaw 2026.11.7 or later.
openclaw models auth login --provider opencode-go --method oauthOpen the link OpenClaw prints, confirm the code in Console, and pick a workspace with a Go subscription. OpenClaw keeps and refreshes the sign-in itself.
Each provider signs in separately. Sign in to opencode too for pay-as-you-go models.
openclaw models auth login --provider opencode --method oauthYou can also choose OpenCode Go (browser sign-in) during openclaw onboard, with /login in chat, or from
Settings › Models › Add account.
Both providers read the same key from OPENCODE_API_KEY. Create a personal API key
and pass it to onboarding.
openclaw onboard --opencode-go-api-key "$OPENCODE_API_KEY"Or set it in ~/.openclaw/openclaw.json.
{
env: { vars: { OPENCODE_API_KEY: "oc_sk_..." } },
agents: { defaults: { model: { primary: "opencode-go/kimi-k3" } } },
}A key from a workspace without Go still lists Go’s models, but requests to them fail until the workspace subscribes.
Select a model as <provider>/<model-id>, using IDs from the Console or
Go table. OpenClaw reads the model list from Console, so new models appear without an update.
openclaw models list --provider opencode-goSet the default model for your agents.
openclaw config set agents.defaults.model.primary "opencode-go/kimi-k3"Add the Console MCP server with OAuth, then sign in from the browser while the Gateway runs.
openclaw mcp set opencode-console '{"url":"https://opencode.ai/console/mcp","transport":"streamable-http","auth":"oauth"}'
openclaw mcp login opencode-console