Qwen3 Coder 30B in opencode, Qwen Code, Cline and Kilo Code for $0.07 per million input tokens
How to point opencode, Qwen Code, Cline and Kilo Code at Qwen3-Coder-30B-A3B-Instruct on TokenWatt's OpenAI-compatible API, and what to expect from a 30B coding model: 64.8% on our 176 single-file Python tasks, for $0.057 for the whole suite.
Choosing GPUs? Compare GPUs for your traffic · Get your node measured, free
Update, November 19, 2026: we retired Qwen3-Coder-30B on api.tokenwatt.io; requests for it now return 404. The same endpoint and keys now serve Qwen3.6-35B-A3B and Qwen3.8-27B; prices and setup are on the API page. The steps below work the same with either model id. This post is kept as published on November 15.
Qwen3-Coder-30B-A3B-Instruct is a small, fast coding model: 30.5B parameters, 3.3B active per token. We serve it at https://api.tokenwatt.io/v1 for $0.07 per million input tokens and $0.28 per million output tokens, with a 131,072-token context, up to 65,536 output tokens, tool calling and JSON output. On OpenRouter, the only provider of this model lists it at $0.15 / $0.60 today.
Disclosure: TokenWatt is our service. On November 15 we ran opencode 1.19.5 against it end to end: asked to add type hints to a small Python file, it edited the file in 7 seconds. We also tested the API directly (chat, streaming with usage, tool calls). The Qwen Code, Cline and Kilo Code steps follow each tool's documentation as of that date.
Get a key
Sign up at tokenwatt.io/api.html. We email a key and $1 of credit. Then:
export TOKENWATT_API_KEY="your-key"
Model ID everywhere below: qwen/qwen3-coder-30b-a3b-instruct.
opencode
TokenWatt is in the models.dev catalog that opencode reads, so there is nothing to configure by hand. If TokenWatt isn't in the list yet, refresh the catalog once (a fresh install of 1.19.5 needed this on November 15):
opencode models --refresh
/connect # choose TokenWatt, paste your key (or set TOKENWATT_API_KEY)
/models # pick TokenWatt / Qwen3-Coder 30B-A3B Instruct
For one run, or as the default in opencode.jsonc:
opencode run --model tokenwatt/qwen/qwen3-coder-30b-a3b-instruct "Add type hints to utils.py"
{
"$schema": "https://opencode.ai/config.json",
"model": "tokenwatt/qwen/qwen3-coder-30b-a3b-instruct",
}
One thing to know: opencode's cost estimate treats cached input as free for this model, because the catalog lists no cache-read price. We bill cached input tokens at the input price, so for long sessions your TokenWatt dashboard will show more than opencode does.
Qwen Code
Qwen's own CLI talks to any OpenAI-compatible endpoint:
npm install -g @qwen-code/qwen-code@latest
export OPENAI_API_KEY="$TOKENWATT_API_KEY"
export OPENAI_BASE_URL="https://api.tokenwatt.io/v1"
export OPENAI_MODEL="qwen/qwen3-coder-30b-a3b-instruct"
qwen
Cline
Settings (⚙️) → API Provider: OpenAI Compatible
- Base URL:
https://api.tokenwatt.io/v1 - API Key: your key
- Model ID:
qwen/qwen3-coder-30b-a3b-instruct - Model Configuration: Context Window Size
131072, Max Output Tokens up to65536, Input Price0.07, Output Price0.28(per million), Image Support off
Kilo Code
Add a provider with Provider API: OpenAI Compatible, Base URL https://api.tokenwatt.io/v1, your API key, and the model qwen/qwen3-coder-30b-a3b-instruct (from the fetched list or added by hand).
Anything else
Any OpenAI SDK works with base_url="https://api.tokenwatt.io/v1". Examples are on the API page.
What to expect from a 30B coding model
We ran the same 176 single-file Python tasks (Exercism plus Aider's hard set) we use for larger models, with one retry on a failed test:
| Model | Solved | Cost of the whole suite (list price) | Median latency |
|---|---|---|---|
| Claude Haiku 5.5 | 93.8% | $0.152 | 5.5 s |
| DeepSeek Chat | 80.7% | $0.116 | 2.8 s |
| Qwen3 Coder 30B (TokenWatt) | 64.8% | $0.057 | 3.9 s |
So it's the cheapest per solved task of the three, and it solves noticeably fewer. It fits high-volume, simpler work where a miss is cheap: test scaffolding, docstrings and type hints, small refactors, log triage, code tagging and summaries, batch jobs. For long multi-file agent sessions, a larger model will solve more.
Limits: single-file Python tasks, one run, short single-turn contexts; Qwen3 Coder was called directly on our endpoint (November 12), the other two through CodeRouter's production path, so latencies aren't strictly comparable. Your workload may differ. Per-task results: data. If you run it at volume, tell us what you send and we'll measure it on our node for free.
Keep reading
The pi adapter for Qwen3.8-27B on FP8: 3× fewer turns held up, the accuracy gain was smaller
harness-hub's pi adapter is a LoRA that teaches Qwen3.8-27B to work inside the pi coding agent. Its card reports 39.5% → 55.8% on Terminal-Bench 2.1 on BF16 weights. We serve the FP8 checkpoint, so we tested it there: on 25 Terminal-Bench tasks under pi, the adapter solved 17 and the base model 14, a gap too small to call on 25 tasks. Its efficiency held clearly: on the 12 tasks both solved, it needed 9.5 turns against 28.5 and 1,432 output tokens against 5,254 (medians). It also ran 10 minutes without a fault under the long-context load that crashed MTP on our shared GPU. It's on our API now at Qwen3.8's price.
94% prefix-cache hits on hybrid models with real coding-agent traffic, against 56% in our synthetic test
A synthetic test we published on November 16 showed a hybrid model, Qwen3.8-27B, reusing far less of a shared prompt than a dense-attention model (56% against 89%), because vLLM caches its prompts only in whole blocks of 784 tokens. On two days of our own team's coding-agent traffic on our API, the same rule cost little: vLLM served 94.3% of Qwen3.8-27B's prompt tokens and 94.8% of Qwen3.6-35B-A3B's from cache, on median prompts of 114K and 86K tokens. The median request recomputed only 1,562 to 2,690 tokens.
MTP on Qwen3.8-27B: 2.65× faster per request, at the cost of 24% of the KV cache
Qwen3.8-27B ships with a one-layer multi-token prediction (MTP) head that vLLM can use as a draft model. On one H100 NVL with vLLM 0.33.0, three draft tokens per step raised single-request decode from 74.8 to 198 tokens per second (2.65×), and total throughput by 101%, 49% and 19% at 4, 16 and 48 requests in flight. GSM8K held (99.0% against 98.0%). The price is memory: room for the KV cache fell 24%, from 709,527 to 541,801 tokens. We turned it on in our API the same day, then off again that evening: with two models sharing the GPU under CUDA MPS, MTP crashed both engines under long-context load.