OpenCode setup
A practical OpenCode configuration path
OpenCode and similar clients normally need a provider, base URL, API key, and model. Keep those values explicit and test the complete request path before enabling tools.
Minimal setup
- Create a router.cheap API key.
- Choose an OpenAI-compatible provider in OpenCode.
- Set
https://router.cheap/v1as the base URL. - Choose a model from
/v1/modelsand send a short test request.
Keep costs predictable
Set context and output limits where the client supports them, inspect token usage, and avoid unbounded agent loops. Compare the resulting workload against the live pricing catalog rather than a single prompt.
Frequently asked questions
Can I use a Claude model in OpenCode?
Use the Anthropic-compatible provider mode if your OpenCode version supports it and the model is enabled for your account.
Why does OpenCode return an auth error?
Check the base URL, key scope, endpoint family, and whether a proxy or shell environment is replacing the value.
Is OpenCode affiliated with router.cheap?
No. It is a separate client. This page documents a compatible connection pattern.