Skip to content

OpenCode

OpenCode can use an OpenAI-compatible provider. Configure a provider that points to UURoute and authenticate with your UURoute API key.

Terminal window
export UUROUTE_API_KEY="<UUROUTE_API_KEY>"

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"
}
}
}
}
}

Launch OpenCode:

Terminal window
opencode

Then run:

/connect

Use UURoute as the provider name and paste your UURoute API key when prompted.

In OpenCode, open the model picker:

/models

Select gpt-5-codex, claude-sonnet-4.5, or another model listed in your UURoute provider config.

SymptomCheck
Authentication errorConfirm the UURoute provider key saved by OpenCode is your UURoute API key.
Model not foundConfirm the model name exists in UURoute and is listed in the provider config.
Requests go to a different providerConfirm the selected model comes from the UURoute provider.