Prerequisites
- OpenCode 1.4.10+
- An Arbytra API key
Install OpenCode
Run the official install script:~/.bashrc, which non-interactive shells don’t source. In CI, GitHub Actions, or agent-driven sessions, add this before invoking opencode:
Set your API key
Export your API key:ak_live_ (production) or ak_test_ (testing).
Add this line to ~/.zshrc or ~/.bashrc to persist it across terminal sessions.
Reload your shell after saving:
Verify
Run this from inside a git repository. OpenCode requires a git working tree.Set default model
To avoid passing--model on every run, create an opencode.json in your project root:
~/.config/opencode/opencode.json to set a global default. A project-root config takes precedence.
You don’t need a provider block. OpenCode resolves Arbytra’s models automatically.
Use different models
Pass any registered model with the--model flag:
/models to browse and switch models during a session.
These models are registered in OpenCode’s provider registry and work without configuration:
To list all Arbytra models (not just the 15 registered in OpenCode):
Add unregistered models
The 15 registered models work without configuration. To use any of the 250+ other models Arbytra serves, add a provider and model definition to youropencode.json:
Control routing
Configure routing in the Arbytra dashboard. See routing options for details.Uninstall
RemoveARBYTRA_API_KEY from your shell profile (~/.zshrc or ~/.bashrc). If you created an opencode.json, remove the arbytra-related lines or delete the file.