🎁 邀请好友,双向解锁 Coding Plan 福利 !即刻参与 ➔
在 OpenCode 中使用 MiniMax 文本模型进行 AI 编程。
curl
curl -fsSL https://opencode.ai/install | bash
npm
npm i -g opencode-ai
运行认证命令
opencode auth login
选择 Provider
输入 API Key
开始使用
opencode
编辑配置文件
~/.config/opencode/opencode.json
ANTHROPIC_AUTH_TOKEN
ANTHROPIC_BASE_URL
{ "$schema": "https://opencode.ai/config.json", "provider": { "minimax": { "npm": "@ai-sdk/anthropic", "options": { "baseURL": "https://api.minimaxi.com/anthropic/v1", "apiKey": "<MINIMAX_API_KEY> (可选)" }, "models": { "MiniMax-M2.5": { "name": "MiniMax-M2.5" } } } } }
启动 OpenCode
cd /path/to/your/project opencode
选择模型
/models
此页面对您有帮助吗?