Integrations / OpenCode
O

OpenCode

Open source · Verified setup guide

Open-source terminal agent with a provider block per model.

Setup steps

  1. 1
    Get your keyRedeem a voucher at /redeem and copy the key.
  2. 2
    Add the providerPut the block below in opencode.json (project root or ~/.config/opencode/).
  3. 3
    Pick a modelList any /models id under the provider's models and set it as "model".
  4. 4
    Run opencodeStart it and confirm the model answers.

Configuration example

json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "luxechain": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "luxechain",
      "options": {
        "baseURL": "https://api.luxechain.si/v1",
        "apiKey": "lxc_live_YOUR_KEY"
      },
      "models": {
        "minimax-m2.7": { "name": "MiniMax M2.7" },
        "gpt-5.6-luna": { "name": "GPT-5.6 Luna" },
        "kimi-k2.6": { "name": "Kimi K2.6" },
        "hy3": { "name": "Hy3" }
      }
    }
  },
  "model": "luxechain/minimax-m2.7"
}

Replace YOUR_MODEL_ID with any model from the catalogue. Never paste a real API key into a shared document.

Troubleshooting

The base URL here must INCLUDE /v1, OpenCode resolves paths relative to it.

If the tool rejects the endpoint, confirm the base URL exactly matches the value on the right, and that the key is active in your account.