Try CodingPlan free →¥9.9 Try Kimi K3.1 Pro →
Skip to content

OpenCode

Custom provider fields differ between OpenCode v1 and v2. Use the example matching your installed version.

Both examples use https://vectide.cn/v1 and glm-5.3. v1 uses provider / npm / options; v2 uses providers / package / settings. Keep these formats separate.

OpenCode v1

Add a provider named vectide. In /connect, choose Other and use the same provider ID, vectide, when entering your key. Select the model through /models.

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "vectide": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Vectide",
      "options": {
        "baseURL": "https://vectide.cn/v1"
      },
      "models": {
        "glm-5.3": {
          "name": "GLM-5.3"
        }
      }
    }
  }
}

OpenCode v2

v2 uses the separate format below. Make VECTIDE_API_KEY available to the OpenCode process. If you already have providers configured, merge only the vectide entry into your existing file.

{
  "providers": {
    "vectide": {
      "name": "Vectide",
      "env": [
        "VECTIDE_API_KEY"
      ],
      "package": "@opencode/ai/providers/openai-compatible",
      "settings": {
        "baseURL": "https://vectide.cn/v1"
      },
      "models": {
        "glm-5.3": {
          "name": "GLM-5.3"
        }
      }
    }
  }
}

Validate the setup

  1. Confirm the installed version and which configuration file it loads.
  2. Validate the same key and model with the quickstart HTTP request.
  3. Select the Vectide model and send one short message in a fresh session.
  4. Then check streaming or tools required by your workload. A model appearing in a selector is not a successful request.
This page provides configuration examples. Client versions, model parameters and account access affect execution. Configure optional context limits from verified capabilities, not from the model name.

Related documentation