For AI Tools & IDEs
opencode
Configure the opencode TUI agent to route requests through VCodeX.
opencode is an OpenAI-compatible terminal coding agent. Add VCodeX as a provider in its config file.
Prerequisites
- opencode installed. See opencode.ai.
- A VCodeX API key (
sk-...).
1 · Get your VCodeX key
Dashboard → Settings → External Keys → Create key.
2 · Configure opencode
Edit ~/.config/opencode/config.json (create if missing):
{
"provider": {
"vcodex": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://app.vcodex.ai/v1",
"apiKey": "sk-..."
},
"models": {
"vcodex/auto": {},
"anthropic/claude-sonnet-4.5": {}
}
}
}
}Then select the provider inside opencode with /model vcodex/vcodex/auto.
3 · Verify
Start opencode, type a prompt, and confirm the request lands in Observability
→ Requests with client_source: opencode.
Troubleshooting
Provider vcodex not found— JSON is malformed; runjq . ~/.config/opencode/config.jsonto validate.Model … not available— add the model id to themodelsblock above, or usevcodex/autoto let the gateway pick.- Requests still hit
api.openai.com— opencode is using its default provider. Explicitly select/model vcodex/...in the session.