Skip to content

OpenCode Integration

1. Prerequisites

  • Registered and obtained a platform API Key.
  • Node.js environment installed.

2. Installation & Configuration

bash
curl -fsSL https://opencode.ai/install | bash

3. Modify Configuration

bash
# Open the file ~/.config/opencode/opencode.json
# Add the following configuration to the corresponding fields
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "aiwith.chat": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "aiwith.chat",
      "options": {
        "baseURL": "https://aiwith.chat/v1",
        "apiKey": "YOUR_API_KEY"
      },
      "models": {
        "claude-opus-4-6": {
          "name": "claude-opus-4-6"
        },
        "gpt-5.3-codex": {
          "name": "gpt-5.3-codex"
        }
      }
    }
  }
}

4. Launch

bash
opencode