集成

在 OpenCode 中使用 Verboo Code

将 Verboo Code 添加为 OpenAI 兼容的提供商,工作流保持不变,付费套餐内 Token 无限。

在此页面
OpenCode

OpenCode

安装

终端 · Bash / Zsh
npm install -g opencode-ai

安装 OpenCode

如果还没有安装,请先通过 npm 安装 OpenCode。

npm
npm install -g opencode-ai

通过 CLI 连接

运行:opencode auth login

在提供商列表中选择 “Other”

输入 “verboo” 作为 ID,并粘贴你的 API key

CLI
opencode auth login

或在 TUI 中使用 /connect

在 OpenCode 中输入 /connect,选择 “Other”,把 ID 设为 “verboo”,再粘贴密钥。

配置文件(可选)

下载 opencode.json,放到项目根目录或 ~/.config/opencode/。

你也可以直接把下面的内容合并到已有的配置文件中。

~/.config/opencode/opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "verboo": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Verboo Code",
      "options": {
        "baseURL": "https://code.verboo.ai/router/v1",
        "apiKey": "{env:VERBOO_API_KEY}"
      },
      "models": {
        "<MODEL_ID>": {
          "name": "Verboo Code"
        }
      }
    }
  }
}

配置文件

创建或编辑 ~/.config/opencode/opencode.json,并保留现有内容。

~/.config/opencode/opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "verboo": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Verboo Code",
      "options": {
        "baseURL": "https://code.verboo.ai/router/v1",
        "apiKey": "{env:VERBOO_API_KEY}"
      },
      "models": {
        "<MODEL_ID>": {
          "name": "Verboo Code"
        }
      }
    }
  }
}

启动并验证

终端 · Bash / Zsh
opencode --model "verboo/<MODEL_ID>"

opencode --model "verboo/<MODEL_ID>"

端点地址

在提供商配置中使用这个基础地址:https://code.verboo.ai/router/v1

官方 OpenCode 文档