Coding tools

opencode

opencode reads its provider list from a JSON config file. Declare xKiro as a provider and list the models you want in the picker.

Wire format

OpenAI format

Base URL

https://api.xkiro.com/v1

Configured by

opencode.json

Model IDs always carry the vendor prefix

Use openai/gpt-5.6-sol, not a bare gpt-5.6-sol. The current list is at GET /v1/models.

Configuration#

opencode reads opencode.json from the project directory, or from your home directory for a global setup. Declare xKiro as a provider and list the models you want in the picker.

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "xkiro": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "xKiro",
      "options": {
        "baseURL": "https://api.xkiro.com/v1",
        "apiKey": "{env:XKIRO_API_KEY}"
      },
      "models": {
        "openai/gpt-5.6-sol": { "name": "GPT-5.6 Sol" },
        "z-ai/glm-5.2": { "name": "GLM-5.2" },
        "qwen/qwen3.8-max": { "name": "Qwen3.8 Max" }
      }
    }
  }
}
export XKIRO_API_KEY="sk-xt-..."

opencode
# then run /models to confirm xKiro shows up

Which npm package matters

Use @ai-sdk/openai-compatible, which targets /v1/chat/completions. The plain @ai-sdk/openai package targets /v1/responses, an endpoint xKiro does not serve.

If it does not work#

Send one request by hand before touching opencode's settings again. A reply proves the URL and key are both fine, which means whatever is left is in the tool's own configuration — and that is a much smaller place to look.

curl https://api.xkiro.com/v1/chat/completions \
  -H "Authorization: Bearer $XKIRO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"openai/gpt-5.6-sol","messages":[{"role":"user","content":"ping"}],"max_tokens":8}'

An error naming an unknown model still counts as a success here: the request was authenticated before the model was rejected. Common failures and what each one means are on the overview page.

Was this page helpful?