How do I use GPT models like GPT-5.6 in OpenCode?
Add openai/gpt-5.6-terra, openai/gpt-5.6-sol and openai/gpt-6-luna to a standardcompute provider in opencode.json (base URL https://api.stdcmpt.com/v1): Terra builds, Sol takes the plan agent and Luna writes titles, on a plan from $19 a month that stops new requests with HTTP 402 when its compute budget is spent. If you already pay for ChatGPT Plus or Pro, OpenCode can use that sign-in for GPT instead.
{
"$schema": "https://opencode.ai/config.json",
"model": "standardcompute/openai/gpt-5.6-terra",
"small_model": "standardcompute/openai/gpt-6-luna",
"agent": { "plan": {"model": "standardcompute/openai/gpt-5.6-sol"} },
"provider": {
"standardcompute": {
"npm": "@ai-sdk/openai-compatible",
"name": "Standard Compute",
"options": {
"baseURL": "https://api.stdcmpt.com/v1",
"apiKey": "{env:STANDARDCOMPUTE_API_KEY}"
},
"models": {
"openai/gpt-5.6-sol": {
"name": "GPT-5.6 Sol",
"reasoning": true,
"attachment": true,
"modalities": { "input": ["text", "image"], "output": ["text"] },
"limit": { "context": 400000, "output": 32000 }
},
"openai/gpt-5.6-terra": {
"name": "GPT-5.6 Terra",
"reasoning": true,
"attachment": true,
"modalities": { "input": ["text", "image"], "output": ["text"] },
"limit": { "context": 400000, "output": 32000 }
},
"openai/gpt-6-luna": {
"name": "GPT-6 Luna",
"reasoning": true,
"attachment": true,
"modalities": { "input": ["text", "image"], "output": ["text"] },
"limit": { "context": 400000, "output": 32000 }
}
}
}
}
}
Swap the model line to standardcompute/openai/gpt-6-luna for a low-cost session; the plan agent keeps Sol.
One GPT per OpenCode slot
OpenCode has three model slots, and the three GPT tiers differ about 40 times in daily cost, so each tier gets the slot that matches its price.
| Model ID | OpenCode slot | Typical day | Busy day |
|---|---|---|---|
| openai/gpt-5.6-sol | agent.plan.model | $8.21 | $83 |
| openai/gpt-5.6-terra | model (build) | $4.19 | $43 |
| openai/gpt-6-luna | small_model | $0.21 | $2.08 |
OpenAI list prices per million tokens, prompts up to 272K: GPT-5.6 Sol $4 input, $0.40 cached, $20 output; Terra $2, $0.20, $12; GPT-6 Luna $0.10, $0.01, $0.50. 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 GPT in OpenCode
- Screenshots work on all three; each entry declares image input.
- With
reasoning: true, OpenCode offers its low, medium and high variants and sends the level as reasoning_effort, which overrides the Models page setting.
The catch
OpenCode supports signing in with ChatGPT Plus or Pro (/connect, OpenAI, ChatGPT Plus/Pro), and Sol is allowed on that sign-in. If you already pay for ChatGPT and stay inside its limits, that costs you nothing extra. Sol all day is expensive on any metered route: $164 for 20 typical days at OpenAI's list price, and OpenCode Go's GPT models are its low-priced Luna tiers.
Where Standard Compute fits
GPT next to Claude, Gemini and the open models on one key, with no 5-hour or weekly windows. A Luna-heavy setup fits Starter; a Sol-heavy one needs Standard ($89 a month) or above.
FAQ
Is GPT-6 Astra available in OpenCode too?
Yes, add openai/gpt-6-astra to the models block. At $10 input and $50 output per million tokens it suits the plan agent for occasional hard steps more than the build agent.
Does my ChatGPT plan work with this config?
No. This config bills a Standard Compute key. The ChatGPT sign-in is OpenCode's separate OpenAI provider; you can keep both and pick per session in /models.