OpenCode 接入 / OpenCode API gateway
OpenCode 接入 Routin
OpenCode on Routin: /connect and opencode.json
OpenCode 支持任意 OpenAI 兼容服务商。用 /connect 或 opencode.json 把 Routin 配成 provider。
OpenCode accepts any OpenAI-compatible provider. Add Routin with /connect or opencode.json.
接入要点 / Setup facts
- 协议 / Protocol: OpenAI-compatible /v1
- Base URL:
https://api.routin.ai/v1 - opencode.json 里 options.baseURL 为 https://api.routin.ai/v1,npm 包用 @ai-sdk/openai-compatible。 / Set options.baseURL to https://api.routin.ai/v1 and npm to @ai-sdk/openai-compatible.
步骤 / Steps
- 安装 OpenCode / Install OpenCode
npm install -g opencode,或在 macOS 上 brew install opencode。
Install with npm install -g opencode, or brew install opencode on macOS.