国内直连节点正常

ChatGPT 客户端 / CODEX / OpenCode 配置

本篇汇总主流开发扩展(CODEX、OpenCode)以及跨平台客户端(Cherry Studio、Chatbox、SillyTavern)接入 BBToken 的配置方法。

NOTE

原生协议优势:
这一类客户端原生基于 OpenAI Chat Completions 协议 构建,是与平台兼容性最好、响应最顺畅的工具生态。无需任何复杂的协议转换即可开箱即用。

---

1. CODEX (VS Code 扩展)

  • 协议:OpenAI 兼容协议(Chat Completions)
  • 接口地址:https://bbtoken.boywe.cn/v1
  • API Key:sk-xxxxxxxxxxxxxxxxxxxxxxxx
  • 模型:deepSeek-V4-flash 或 bbqwen3.8-flash-next
WARNING

CODEX 核心避坑点(重试 5 次问题):
在 CODEX 扩展设置中务必勾选开启「路由模式 (Route Mode)」!如果未开启路由模式,CODEX 会因格式识别异常在每次发信时反复提示「重试 5 次 (Retrying 5 times)」。

---

2. OpenCode 客户端配置 (opencode.json)

在你的项目根目录下创建或编辑 opencode.json,使用标准的 OpenAI Compatible 驱动:

json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "bbtoken": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "BBToken",
      "options": {
        "baseURL": "https://bbtoken.boywe.cn/v1",
        "apiKey": "sk-xxxxxxxxxxxxxxxxxxxxxxxx"
      },
      "models": {
        "deepSeek-V4-flash": {
          "name": "deepSeek-V4-flash",
          "limit": { "context": 128000, "output": 16384 }
        },
        "bbqwen3.8-flash-next": {
          "name": "bbqwen3.8-flash-next",
          "limit": { "context": 128000, "output": 8192 }
        }
      }
    }
  }
}

3. 常见图形桌面客户端配置

① Cherry Studio(强烈推荐)

  1. 打开 Cherry Studio ➔ 「设置」 ➔ 「模型服务」 ➔ 添加 「OpenAI 兼容」 服务商。
  2. API Base URL:填写 https://bbtoken.boywe.cn/v1。
  3. API 密钥:粘贴你的 sk-xxxxxxxx。
  4. 点击「管理模型」,输入平台支持的模型名称:deepSeek-V4-flash、bbqwen3.8-flash-next、glm-4.7-flash。

② Chatbox

  1. 打开 Chatbox ➔ 点击「设置」 ➔ 模型提供方选择 「OpenAI API」。
  2. API 域名:填入 https://bbtoken.boywe.cn(Chatbox 底层会自动追加 /v1,无需重复填写)。
  3. API 密钥:填入 sk-xxxxxxxx。
  4. 模型:手动输入 deepSeek-V4-flash 或 bbqwen3.8-flash-next。

③ AutoClaw / Hermes / 酒馆 SillyTavern

  • 均直接走 OpenAI 兼容协议:
    • 端点地址:https://bbtoken.boywe.cn/v1
    • 密钥:sk-xxxxxxxx
    • 模型:deepSeek-V4-flash 或 bbqwen3.8-flash-next
    • Hermes 可执行 hermes setup 命令行快速进入交互式配置。