OpenCode
OpenCode talks to UberLLM through the @ai-sdk/openai-compatible package. You store
the key once, then describe the provider in opencode.json.
Before you start
- An UberLLM account with credit, and an API key from
Dashboard → Keys (
ull_...).
1. Store the key
In OpenCode, run /connect, scroll to Other, enter the provider id uberllm,
then paste your key. OpenCode saves it in ~/.local/share/opencode/auth.json. The id
you type here must match the provider id in opencode.json.
2. Add the provider
Global file: ~/.config/opencode/opencode.json. Project file: opencode.json in the
project root (it wins over the global one).
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"uberllm": {
"npm": "@ai-sdk/openai-compatible",
"name": "UberLLM",
"options": {
"baseURL": "https://api.uberllm.dev/v1"
},
"models": {
"deepseek/deepseek-v4.1-flash": { "name": "DeepSeek V4.1 Flash", "limit": { "context": 1048576, "output": 384000 } },
"z-ai/glm-5.2": { "name": "GLM 5.2", "limit": { "context": 1048576, "output": 32768 } },
"moonshotai/kimi-k3": { "name": "Kimi K3", "limit": { "context": 1048576, "output": 32768 } }
}
}
}
}
To skip /connect, put the key in the file instead: "apiKey": "{env:UBERLLM_API_KEY}"
inside options.
OpenCode lists only the models you name here. Any id from the catalog works.
3. Pick the model
Run /models and choose one of the UberLLM models.
Recommended models
Checked on 2026-10-30: each one answered and made a tool call through UberLLM.
| Model id | Context | Max output |
|---|---|---|
deepseek/deepseek-v4.1-flash |
1,048,576 | 384,000 |
z-ai/glm-5.2 |
1,048,576 | 32,768 |
moonshotai/kimi-k3 |
1,048,576 | 32,768 |
Common errors
| What you see | Cause and fix |
|---|---|
401 |
No key for this provider. Run opencode auth list; the id must be uberllm in both places. |
404 with "page not found" |
baseURL must be https://api.uberllm.dev/v1. Use @ai-sdk/openai-compatible, the provider this setup was tested with. |
404 model_not_found |
The model key in models is not a catalog id. |
402 insufficient_credits |
Balance empty. Add credit under Dashboard → Credits. |