How do I use Qwen 3.8 in OpenCode?
Add qwen/qwen3.8-max-0902 to a standardcompute provider in opencode.json (base URL https://api.stdcmpt.com/v1), set it as the model and make qwen/qwen3.8-flash the small_model: OpenCode runs on Qwen 3.8 Max with no Alibaba Cloud account, on a plan from $19 a month that returns HTTP 402 to new requests once its compute budget is used.
{
"$schema": "https://opencode.ai/config.json",
"model": "standardcompute/qwen/qwen3.8-max-0902",
"small_model": "standardcompute/qwen/qwen3.8-flash",
"provider": {
"standardcompute": {
"npm": "@ai-sdk/openai-compatible",
"name": "Standard Compute",
"options": {
"baseURL": "https://api.stdcmpt.com/v1",
"apiKey": "{env:STANDARDCOMPUTE_API_KEY}"
},
"models": {
"qwen/qwen3.8-max-0902": {
"name": "Qwen 3.8 Max",
"reasoning": true,
"attachment": true,
"modalities": { "input": ["text", "image"], "output": ["text"] },
"limit": { "context": 400000, "output": 32000 }
},
"qwen/qwen3.8-flash": {
"name": "Qwen 3.8 Flash",
"reasoning": true,
"attachment": true,
"modalities": { "input": ["text", "image"], "output": ["text"] },
"limit": { "context": 400000, "output": 32000 }
}
}
}
}
}
Use the dated ID qwen/qwen3.8-max-0902; the undated qwen/qwen3.8-max is a temporary alias. Both Qwen models read images, so both carry the modalities lines.
Which Qwen ID goes where in OpenCode
| Model ID | OpenCode slot | Images |
|---|---|---|
| qwen/qwen3.8-max-0902 | model, for the build and plan agents | Read |
| qwen/qwen3.8-flash | small_model, for titles and summaries | Read |
| qwen/qwen3.8-27b | A cheaper agent model for read-heavy work | Read, and video |
Use the dated Max ID; qwen/qwen3.8-max without the date is a temporary alias kept for older setups. Qwen3-Coder is not in the catalog.
What a day of Qwen 3.8 Max costs
At Alibaba's list price the Starter plan's $20 compute budget covers about 4 typical days. Qwen's cache-read rate is an eighth of its input rate, and a long OpenCode session resends its context every turn, so keeping one session going costs less than restarting.
| Qwen 3.8 Max at list price | Cost |
|---|---|
| Typical day | $4.30 |
| Busy day | $44 |
Model Studio, Singapore region, per million tokens: Qwen 3.8 Max $2 input, $0.25 implicit cache read, $6 output; Qwen 3.8 Flash $0.15 input, $0.47 output. Source. A typical day is 8.5M tokens and a busy one 86.7M, 87.2% of input as cache reads: the median and 90th-percentile coding-agent day in our Agent Burn Index, measured on OpenCode, Cline, Kilo and similar agents, September 13 to October 12, 2026. Priced at the list rates above; your own days will differ.
What works with Qwen in OpenCode
- Screenshots work on all three IDs, each declared with image modalities.
- Qwen 3.8 Max always reasons. Set its level (minimal to xhigh) on the Models page, or with a
variantsblock, since OpenCode ships none for Qwen IDs.
The catch
OpenCode Go ($10) includes Qwen 3.8 Max with a $15 monthly usage limit ($60 on Go Plus) and Qwen 3.8 Flash. OpenCode's built-in Alibaba provider (DASHSCOPE_API_KEY, alibaba/qwen3.8-max) bills Alibaba's own prices. Alibaba's Token Plan provider in OpenCode also serves qwen3.8-max.
Where Standard Compute fits
Qwen 3.8 Max for the session and Claude or GPT one /models pick away, with one budget across all of them and no Alibaba Cloud region to choose.
FAQ
Can I run Qwen locally in OpenCode instead?
Yes, OpenCode takes any local OpenAI-compatible server the same way, if your hardware holds the model. This page covers the hosted Qwen 3.8 models.
Why does OpenCode show qwen3.8-max but my config says qwen3.8-max-0902?
alibaba/qwen3.8-max is OpenCode's built-in Alibaba provider. Your entry is standardcompute/qwen/qwen3.8-max-0902; pick that one in /models.