OpenCode Setup
OpenCode is an open-source AI coding agent that runs in your terminal, similar to Claude Code.Prerequisites
- OpenCode installed (install guide)
- Your API key and endpoint URL from admin
Installation
Setup
Switching Models
Inside OpenCode, type/models to see available models and switch between them.
Available Models
| Model ID | Description |
|---|---|
antigravity/claude-opus-4-5-20250514 | Most capable, complex tasks |
antigravity/claude-sonnet-4-5-20250514 | Fast, great for coding |
Troubleshooting
Using wrong model (big-pickle)
Using wrong model (big-pickle)
- Make sure
opencode.jsonexists in the config directory - Check the
modelfield is set toantigravity/claude-opus-4-5-20250514 - Verify you’re using the alias that sets
OPENCODE_CONFIG_DIR
405 Method Not Allowed
405 Method Not Allowed
- Use
@ai-sdk/openai-compatibleprovider, not nativeanthropic - This routes through OpenAI-compatible endpoint which works reliably
Provider not found
Provider not found
- Make sure the config file is valid JSON
- Check the
npmfield is exactly@ai-sdk/openai-compatible
Config not loading
Config not loading
- Ensure
OPENCODE_CONFIG_DIRis set correctly in your alias - Check JSON syntax is valid