主题
OpenCode 配置指南
- Website: https://opencode.ai
配置步骤
创建配置文件
在项目根目录创建 opencode.json 配置文件:
json
{
"$schema": "https://opencode.ai/config.json",
"theme": "opencode",
"provider": {
"google": {
"options": {
"apiKey": "YOUR_API_KEY_HERE",
"baseURL": "https://www.laoge.xin/v1"
}
}
},
"model": "google/gemini-3-pro-preview",
"autoupdate": true
}配置说明
| 参数 | 说明 |
|---|---|
apiKey | 将 YOUR_API_KEY_HERE 替换为您的令牌 |
baseURL | API 接入点 https://www.laoge.xin/v1 |
model | 使用 google/gemini-3-pro-preview 模型 |
提示
请使用 auto 分组的令牌。配置完成后,OpenCode 将自动使用 API 服务。
