OpenCode loads custom providers through the AI SDK's OpenAI-compatible adapter, so the WebikAI
gateway drops into opencode.json as one provider block.
wk_live_… key (shown once).opencode.json:{
"$schema": "https://opencode.ai/config.json",
"provider": {
"webik": {
"npm": "@ai-sdk/openai-compatible",
"name": "WebikAI",
"options": {
"baseURL": "https://gateway.webik.ai/v1",
"apiKey": "wk_live_..."
},
"models": {
"auto/code": { "name": "WebikAI auto/code" },
"auto/cheap": { "name": "WebikAI auto/cheap" }
}
}
}
}Then pick webik/auto/code from OpenCode's model list.
| auto/code | Coding route ranked under your policy |
| auto/cheap | Aggressively minimize cost |
| auto/frontier | Premium frontier route under your policy |
| z-ai/glm-5.2 | Pin an exact model (OpenRouter-style slug) |
Every response carries five x-webik-* headers naming the request id, the model and provider
that actually served it, the credential used (byok/managed), and whether a fallback fired. Requests
stop at your per-key and per-client budget caps — before forwarding, never after.
Full reference: docs · live scores: benchmarks · start free