OpenCode
A terminal harness, also a VS Code / Cursor plugin. Provider lives in opencode.json.
Three fields. Copy, don’t type
https://cheapai.lol/v1
claude-opus-4.8
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"cheapai": {
"npm": "@ai-sdk/openai-compatible",
"name": "cheapai",
"options": {
"baseURL": "https://cheapai.lol/v1",
"apiKey": "sk-…"
},
"models": {
"claude-opus-4.8": { "name": "claude-opus-4.8" }
}
}
}
}
Do it in order. Don’t skip
Install OpenCode (site in the link) or the VS Code marketplace extension.
The config lives in your home folder: ~/.config/opencode/opencode.json on macOS and Linux, C:\Users\YourName\.config\opencode\opencode.json on Windows.
On Windows, Explorer refuses to create folders whose name starts with a dot. Open PowerShell and run one line: mkdir "$env:USERPROFILE\.config\opencode" -Force
Create opencode.json inside that folder and paste the block from the card. Replace sk-… with your full key.
npm must be @ai-sdk/openai-compatible — we speak /v1/chat/completions, not /v1/responses.
In a terminal: opencode. Or open the OpenCode panel in the editor.
Pick claude-opus-4.8. Type “hi”.
Check
OpenCode replied in the TUI or the editor panel.
If it didn’t start
- Can't find the .config folder — it doesn't exist yet, create it with the command above. The leading dot is required.
- OpenCode doesn't see the provider — make sure the file is named exactly opencode.json and sits inside the opencode folder, not next to it.
- “401 / unauthorized / invalid api key” — the key was not copied whole. It starts with sk- and has no space at either end.
- “model not found” / “named models unavailable” / model in red — the name must match exactly: claude-opus-4.8. Not “Opus 5”, not opus, not claude-3, not gpt-4.
- The app shows no models — reopen its settings page: the model list is served from our address and appears once the Base URL and key are right.
- “Connection error” / spinner and silence — wrong Base URL. Almost every app wants the address with a /v1 tail.
- “/v1/v1” in the error — the app appends /v1 itself. Drop the tail, leave the site address.
- It replied, then stopped — you ran out of tokens. The balance is in your dashboard. Topping up on FunPay from the same nick lands on the same key.