使用 OpenClaw 快速整合 OpenCode Go 模型
每次在整合不同模型目錄時,最煩的就是要記住一堆不同的 API Key 和複雜的設定方式。如果你正在尋找一種更直覺的方式來管理 Go 相關的模型,OpenCode Go 就是為了簡化這個流程而設計的,讓你不需要在多個設定檔之間切換到頭暈。
OpenCode Go
Section titled “OpenCode Go”OpenCode Go 是 OpenCode 裡的 Go 目錄。它跟 Zen 目錄共用同一個 OPENCODE_API_KEY,但保留了 opencode-go 這個 runtime provider ID,確保上游的各模型路由(routing)能保持正確。
opencode-go/kimi-k2.5opencode-go/glm-5opencode-go/minimax-m2.5
CLI 設定
Section titled “CLI 設定”openclaw onboard --auth-choice opencode-go# or non-interactiveopenclaw onboard --opencode-go-api-key "$OPENCODE_API_KEY"{ env: { OPENCODE_API_KEY: "YOUR_API_KEY_HERE" }, // pragma: allowlist secret agents: { defaults: { model: { primary: "opencode-go/kimi-k2.5" } } },}當模型引用(model ref)使用 opencode-go/... 時,OpenClaw 會自動處理每個模型的路由。
- 關於共用的 onboarding 和目錄概覽,請參考 OpenCode。
- Runtime 引用保持明確:Zen 使用
opencode/...,Go 則使用opencode-go/...。
下一步:
想要更快速的設定體驗嗎?試試我們的 AI Setup Assistant。
OpenClaw Expert
還是卡住了?
如果這篇文件沒有解決你的情境,直接問 OpenClaw Expert,拿到可執行步驟。