| 配置项 | 推荐填写内容 | 注意事项 |
|---|---|---|
| API Key | sk-xxxxxxxxxxxxxxxx | 请直接填写你在 DataEyesAI 控制台生成的 Key |
| Base URL | https://platform.dataeyes.ai/v1 | 必须包含 /v1 后缀 |
| 模型名称 | 例如 gpt-5 或 claude-opus-4-6 | 填写 DataEyesAI 实际支持且你账号有权限调用的模型 |
opencode --version,如果成功输出版本号即代表安装成功。C:\Users\你的用户名\.config\opencode\opencode.json~/.config/opencode/opencode.json{
"$schema": "https://opencode.ai/config.json",
"provider": {
"openai": {
"options": {
"baseURL": "https://platform.dataeyes.ai/v1"
}
},
"anthropic": {
"options": {
"baseURL": "https://platform.dataeyes.ai/v1"
}
}
}
}C:\Users\你的用户名\.local\share\opencode\auth.json~/.local/share/opencode/auth.jsonsk-... 替换为你实际的 DataEyesAI API Key):{
"openai": {
"type": "api",
"key": "sk-你的DataEyes密钥"
},
"anthropic": {
"type": "api",
"key": "sk-你的DataEyes密钥"
}
}/models 并回车,在列表中选择你想要使用的模型(例如选了 Claude 模型,它就会自动走我们在上面配置的 Anthropic 渠道)。写一段 Python 的冒泡排序auth.json 中的 API Key 是否复制完整,确保没有多余的空格。opencode.json 中的 baseURL 是否正确包含了 /v1 后缀(即 https://platform.dataeyes.ai/v1)。/models 查看工具当前支持的模型列表。只要是你选中的模型,并且 DataEyesAI 后台支持该模型映射,即可正常调用。