OpenCode
OpenCode can use an OpenAI-compatible provider. Configure a provider that points to UURoute and authenticate with your UURoute API key.
Environment Variables
Section titled “Environment Variables”export UUROUTE_API_KEY="<UUROUTE_API_KEY>"Configure Provider
Section titled “Configure Provider”Add an UURoute provider to your OpenCode configuration:
{ "$schema": "https://opencode.ai/config.json", "provider": { "uuroute": { "npm": "@ai-sdk/openai-compatible", "name": "UURoute", "options": { "baseURL": "https://api.stag.uuroute.net/" }, "models": { "gpt-5-codex": { "name": "GPT-5 Codex" }, "claude-sonnet-4.5": { "name": "Claude Sonnet 4.5" } } } }}Connect API Key
Section titled “Connect API Key”Launch OpenCode:
opencodeThen run:
/connectUse UURoute as the provider name and paste your UURoute API key when prompted.
Run OpenCode
Section titled “Run OpenCode”In OpenCode, open the model picker:
/modelsSelect gpt-5-codex, claude-sonnet-4.5, or another model listed in your UURoute provider config.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Check |
|---|---|
| Authentication error | Confirm the UURoute provider key saved by OpenCode is your UURoute API key. |
| Model not found | Confirm the model name exists in UURoute and is listed in the provider config. |
| Requests go to a different provider | Confirm the selected model comes from the UURoute provider. |