Overview
OpenCode lets you configure custom model providers through its config file. With AllTokens, you can route OpenCode requests through a single gateway and manage API keys, models, and quotas in one place.Quick setup
Set your API key:~/.config/opencode/opencode.json:
Notes
- Use
https://alltoken.co/v1as the base URL. - You can switch models by updating
modelto values likealltoken/deepseek-v3. - You can also put
opencode.jsonin a project root if you want per-project config.