OpenCode setup
Add a Korvexor provider in opencode.json using the OpenAI-compatible /v1 endpoint.
Create OpenCode config
Add opencode.json in your project or global config with a korvexor provider.
Fill baseURL and apiKey
Set options.baseURL with /v1, apiKey from the console, and model to korvexor/auto.
Run OpenCode
Start opencode and confirm model discovery and your first request work.
Example config (copy-ready):
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"korvexor": {
"npm": "@ai-sdk/openai-compatible",
"name": "Korvexor",
"options": {
"baseURL": "https://api.korvexor.com/v1",
"apiKey": "sk-your-api-key"
},
"models": {
"auto": {
"name": "Korvexor Auto Router"
}
},
"discoverModels": true
}
},
"model": "korvexor/auto"
}
Notes
- • baseURL must end with /v1 (OpenAI Compatible SDK convention).
- • Claude Code uses the gateway root without /v1—the two rules are not interchangeable.
Next steps
Try cURL examples or the troubleshooting page to validate protocol and URLs.