OpenCode
Run OpenCode on Boundless models: install, the opencode.json provider, model ids with limits, a verify command and common errors.
OpenCode reaches Boundless through a custom provider in opencode.json, using the OpenAI-compatible package and the base URL https://api.inference.boundless.network/v1.
Install#
Install OpenCode from its own documentation first. Then pick one way to point it at Boundless.
Run this in a terminal on macOS or Linux and choose OpenCode:
Or run the package yourself, which also works on Windows:
Setup signs you in through your browser, creates a key on your account and backs up every file it changes. To undo it, run curl -fsSL https://boundless.md/install | sh -s -- --revert. Need a key to configure by hand? Create one in API Keys.
Configure#
OpenCode#
A custom provider in opencode.json, either in your project or ~/.config/opencode/opencode.json. model is the default for every session and small_model handles titles, summaries and other light work:
A custom provider inherits nothing from OpenCode's catalog, so each model needs its own limit. Undeclared reasoning and tool_call read as false. A key saved for boundless through /connect takes precedence over apiKey; remove it with opencode auth logout boundless.
Model ids#
The examples use boundless/deepseek/deepseek-v4.1-flash. Use boundless/ plus any id from GET https://api.inference.boundless.network/v1/models, never the bare id; the models page lists each one with its price and limits. A custom provider inherits nothing from OpenCode's catalog, so each model needs its own limit; the list in the config above carries them.
Verify#
Run the opencode run command from the setup above. The reply should report boundless.
To check the base URL and key on their own, list the models the gateway serves. A list of models means both are right. A 401 means the key is missing or wrong:
Common errors#
| What you see | What it usually is |
|---|---|
401 on every request |
Wrong key. Set BOUNDLESS_API_KEY, and remove a stale key saved through /connect with opencode auth logout boundless. |
| An error naming a model you never chose | The harness is sending its default. Set the model explicitly, including any small or background slot. |
Empty reply, stop_reason: max_tokens |
The output budget has to cover thinking too. Give reasoning models 1024+. |
403 with model_not_allowed |
Your team admin has not enabled that model for you. Ask them, or pick another. See Model access. |
Every status and code is on the Errors page. Other harnesses are on the Coding Agents & Harnesses page.