logo

OpenCode 配置指南

網址:https://opencode.ai(單擊跳轉!)

配置步驟

創建配置文件

在項目根目錄創建 opencode.json配置文件:

{
  "$schema": "https://opencode.ai/config.json",
  "theme": "opencode",
  "provider": {
    "google": {
      "options": {
        "apiKey": "YOUR_API_KEY_HERE",
        "baseURL": "https://llmoxy.com/v1"
      }
    }
  },
  "model": "google/gpt-5.4",
  "autoupdate": true
}

配置說明

  • apiKey:將 YOUR_API_KEY_HERE替換為您的 LLMoxy 令牌
  • baseURL:API 接入點 https://llmoxy.com/v1
  • model:使用 google/gpt-5.4模型

💡 提示 請使用 auto 分組的令牌。配置完成後,OpenCode 將自動使用 LLMoxy 的 API 服務。