Kimi K3 in OpenCode: zero-config, in the catalog

Model: Kimi K3 · ✓ Verified on opencode v2.2.0 · 2026-10-28

OpenCode is the open-source terminal coding agent (github.com/anomalyco/opencode) — a TUI you run inside your project directory, with a provider catalog built from models.dev. That last part is why this guide is short: Wallaby Token is in that catalog, so OpenCode already knows our endpoint, our auth variable, and our model id. There is no base URL to copy and no config file to edit. Disclosure: Wallaby Token sells API access to kimi-k3, and the endpoint used here is ours.

Updated for OpenCode 2 (October 15, 2026): every step below was re-verified on v2.0.29, and re-checked again on v2.2.0 (October 28, 2026) with the same result. The zero-config flow is unchanged; the refresh command from v1 is gone, and v2's background server adds one new gotcha, both covered in steps 3 and 4 and in the troubleshooting table. Upgrading from v1? See the upgrade section.

What the setup actually looks like:

  • One environment variable — WALLABY_API_KEY. The catalog entry tells OpenCode exactly which variable to read.
  • One list check: wallaby/moonshotai/kimi-k3 shows up in opencode models once the key variable is set (v2 syncs the catalog for you; the v1 --refresh flag is gone).
  • Then it behaves like any built-in provider — pick the model in the TUI with /models, or pass it with -m in one-shot runs.

What you need

  • A Wallaby Token account (create one at wallabytoken.com; new accounts receive $0.50 in free credit) and an API key from the console
  • macOS or Linux (on Windows, use WSL)
  • Two minutes

Step 1: Install OpenCode

curl -fsSL https://opencode.ai/install | bash

This installs the binary to ~/.opencode/bin/opencode. One real gotcha from our install run: the installer adds the PATH line to ~/.bash_profile only. If your shell is zsh — the macOS default — a new terminal won't find the command. Fix it once:

echo 'export PATH="$HOME/.opencode/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
opencode --version    # 2.2.0 at the time of writing (October 28, 2026)

One v2 distribution note: GitHub Releases stop at v1.19.0, so the install script's --version 2.x pin 404s (it only looks at GitHub). Run the installer unpinned (it fetches the latest v2) or grab the zip from opencode.ai/files/bin/ directly.

Step 2: Set your key

export WALLABY_API_KEY=sk-your-wallaby-key

Add the same line to ~/.zshrc so it survives new terminals.

Step 3: Find us in the catalog

opencode models | grep wallaby

You should see:

wallaby/moonshotai/kimi-k3

Nothing in that line was configured by hand — it comes from the public models.dev catalog that OpenCode syncs. Two things to know, one per major version:

  • The list is credential-gated in both v1 and v2: opencode models only shows providers whose key variable is set. Set WALLABY_API_KEY first (step 2), then look.
  • The v1 refresh command is gone in v2. opencode models --refresh returns Unrecognized flag on OpenCode 2. v2's equivalent of a catalog refresh is restarting its background server (step 4 explains why this matters).

Step 4: Run it

One-shot from the shell:

opencode run -m wallaby/moonshotai/kimi-k3 "Write a Python function that checks whether a string is a palindrome"

Or the interactive way — cd into a project, run opencode, type /models, select Kimi K3 under the Wallaby provider, and start working.

Our verification run on OpenCode 2.2.0, unedited:

$ opencode run -m wallaby/moonshotai/kimi-k3 "Reply with exactly: OK"
> build · moonshotai/kimi-k3
OK

One v2-specific behavior to know before you conclude anything from an error: OpenCode 2 runs a persistent background server, and that server caches the provider catalog. If the server first started before you set WALLABY_API_KEY, its cached catalog doesn't include key-gated providers, and you'll get Model unavailable: wallaby/moonshotai/kimi-k3 even with the key set correctly. The fix is to restart the OpenCode server, or run once with --standalone to bypass it. v1 never had this trap because it fetched the catalog in-process on every start.

Verify on the billing side

A working reply is leg one and two of the test. Leg three: open your console's Usage Logs. Seconds after the request, there is a line with the model, token counts, and cost. Our smoke prompt above cost about $0.019, itemized immediately.

The line will show the model as moonshotai/kimi-k3. That is the models.dev canonical id, not a different model and not a mis-bill — same model, same price as kimi-k3, just the namespaced name the catalog ecosystem uses.

Troubleshooting (only what we actually hit)

Symptom Cause Fix
command not found: opencode Installer wrote PATH to .bash_profile; zsh doesn't read it Add export PATH="$HOME/.opencode/bin:$PATH" to ~/.zshrc
Model unavailable: wallaby/moonshotai/kimi-k3 with the key set (v2) v2's background server cached the catalog before your key was set Restart the OpenCode server, or run once with --standalone
Unrecognized flag: --refresh (v2) opencode models --refresh was removed in OpenCode 2 Restart the server; that is the v2 refresh
wallaby/... not in opencode models The list only shows providers whose key variable is set Confirm echo $WALLABY_API_KEY prints your key, then re-run
"no access to model moonshotai/kimi-k3" (early adopters, before Sep 17 2026) A model-id mismatch on our side Fixed on our gateway — retry; if it persists, email [email protected]
This model does not support assistant message prefill The request ended on an assistant turn (an OpenCode continuation) and the gateway forbids prefill The two triggers and the fixes; a gateway that accepts prefill also works

One failure we mapped separately: OpenCode's free tier went app-only in October 2026 and external API calls started returning a 403 FreeTierError. We reproduced it and wrote up three ways out.

Upgrading from v1 to v2

OpenCode 2 went GA in the second week of October 2026. The official path is opencode upgrade --major from v1.19.0 (the last release on GitHub; v2 binaries ship from OpenCode's own CDN and WinGet). From our network the in-app upgrade stalled and the CDN zip was the faster route. If the upgrade hangs on you, download opencode.ai/files/bin/2.0.29/opencode-<platform>.zip and replace the binary. Note that install.sh --version 2.x 404s because the script only queries GitHub Releases.

Your BYOK setup needs no migration at all: same WALLABY_API_KEY, same wallaby/moonshotai/kimi-k3 model id, same zero-config catalog entry. The two v1 habits to unlearn are the removed --refresh flag and expecting the catalog to be fresh on every start (v2's background server caches it; see step 4). We covered the release itself, including the new Provider Account Management dialog, in OpenCode 2 is out: what actually changes if you bring your own key.

Seeing FreeTierError ("free tier can only be used from within OpenCode") instead? That is a different wall: since September 2026, OpenCode's free models answer only inside the app. We reproduced the 403 and mapped what changed and three ways out.

Rolling out to a team

OpenCode's zero-config path doubles as the fastest team-evaluation path we know: every developer runs the same four steps, no per-machine endpoint babysitting. The account side then carries the team mechanics — one prepaid balance as a hard ceiling on the whole team's spend, one named key per developer with its own dollar cap and optional expiry, and usage logs itemized per key so per-person cost attribution is the default view, not a spreadsheet project. There are no seat fees: adding a teammate costs exactly their token usage. The full walkthrough is in One endpoint, one bill.

Pricing

Per 1M tokens, as of October 28, 2026 (current rates always on the pricing page):

Wallaby Official list
Input $2.70 $3.00
Cached input $0.27 $0.30
Output $13.50 $15.00

The $0.50 trial credit covers this entire guide many times over — the verification call above cost under two cents.

The same TUI also offers Kimi K3 through Zen, OpenCode's own gateway, at the official list price, billed from a prepaid Zen balance with a $20 minimum top-up. Bringing your own Wallaby key instead gives you the same model in the same /models picker at 10% below list, and the trial credit means you can run this entire guide before topping up anything at all.

One caveat on comparing sticker prices: per-token cost is the visible part — rework is the bigger one. The cheapest API is the one you don't redo.

Get started

Create an account at wallabytoken.com, mint a key, set one environment variable, refresh the catalog. It is the shortest path from zero to Kimi K3 in a terminal agent that we are aware of — it took us about two minutes, end to end. Looking for OpenCode's free models instead? Those are app-only since September 2026. We mapped what changed and three ways out.

Why Wallaby

Every request lands on your invoice as an itemized line with token counts — no content logs, no training on your data, no usage reports built from your traffic. We host open-weight models only, keep a public status page, and run our own work through the same gateway we sell.

Live pricing · Status · Why we built Wallaby

Like the Dispatch? Add Wallaby as a preferred source on Google, or subscribe via RSS.
Did this help?