| 配置项 | 推荐填写内容 | 注意事项 |
|---|---|---|
| API Key | sk-xxxxxxxxxxxxxxxx | 请填写你在控制台生成的专属令牌 |
| Base URL | https://platform.shuyanai.com/v1 | 必须包含 /v1 后缀 |
| 推荐模型 | qwen3.6-plus | 兼容性最强,支持超长上下文与复杂代码生成 |
opencode --version,输出版本号即代表安装成功。C:\Users\你的用户名\.config\opencode\opencode.json~/.config/opencode/opencode.jsonprovider 字段也必须写 openai(这代表使用 OpenAI 兼容协议):{
"$schema": "[https://opencode.ai/config.json](https://opencode.ai/config.json)",
"provider": {
"openai": {
"options": {
"baseURL": "https://platform.shuyanai.com/v1"
},
"models": {
"qwen3.6-plus": {
"name": "通义千问 Qwen"
}
}
}
}
}C:\Users\你的用户名\.local\share\opencode\auth.json~/.local/share/opencode/auth.json{
"openai": {
"type": "api",
"key": "sk-你的数眼智能令牌"
}
}opencode --model qwen3.6-plus/models:在交互界面中手动切换已注册的模型。/clear