OpenCode

安装

npm i -g opencode-ai

配置文件路径

~/.config/opencode/opencode.json

Provider 配置示例

opencode.json
{
  "providers": {
    "anthropic": {
      "baseURL": "https://api.wanlai.ai",
      "apiKey": "你的 Claude Key"
    },
    "openai": {
      "baseURL": "https://api.wanlai.ai/v1",
      "apiKey": "你的 GPT Key"
    },
    "google": {
      "baseURL": "https://api.wanlai.ai/v1beta",
      "apiKey": "你的 Gemini Key"
    }
  }
}

参考链接