openGSD安装与配置国产大模型
本次介绍的是最新版
https://github.com/open-gsd/gsd-pi
不是之前的gsd,也不是gsd-2。安装命令是
npm install -g @opengsd/gsd-pi@latest第一步:前置条件是git和node环境,都安装最新稳定版就行。
第二步:执行安装命令
第三步:安装后使用cmd命令窗口执行gsd
第四步:第一次执行gsd会提示你完成模型配置等信息,直接选最下面的先skip跳过
第五步到你C盘安装路径下去添加或修改auth.json,models.json,settings.json这三个配置文件,我的安装路径是C:\Users\EDY\.gsd\agent。注意要电脑要设置显示隐藏文件才能看到。
第六步配置国产自己开通好的大模型配置如下:
GSD 配置 DeepSeek 模型指南
一、准备工作
1.1 获取 DeepSeek API 密钥
1. 访问 [DeepSeek 官网](https://platform.deepseek.com/)
2. 注册/登录账户
3. 在 API Keys 页面创建新的 API 密钥
4. 复制生成的 API 密钥(格式:`sk-xxxxxxxxxxxxxxxxxxxx`)
1.2 确认 GSD 安装
gsd --version二、配置文件位置
GSD 的配置文件位于用户目录下的 `.gsd/agent/` 文件夹:
```
C:\Users\<你的用户名>\.gsd\agent\
├── auth.json # API 密钥配置
├── models.json # 模型提供者配置
└── settings.json # 系统设置
```
---
三、配置步骤
3.1 配置 auth.json
打开 `auth.json` 文件,添加 DeepSeek 的 API 密钥:
```json
{
"deepseek": {
"type": "api_key",
"key": "sk-你的API密钥"
}
}
```
3.2 配置 models.json
打开 `models.json` 文件,添加 DeepSeek 提供者配置:
```json
{
"providers": {
"deepseek": {
"baseUrl": "https://api.deepseek.com/v1",
"api": "openai-completions",
"models": [
{
"id": "deepseek-chat",
"name": "DeepSeek Chat"
},
{
"id": "deepseek-v4-flash",
"name": "DeepSeek V4 Flash"
},
{
"id": "deepseek-r1",
"name": "DeepSeek R1"
}
],
"apiKey": "sk-你的API密钥"
}
}
}
```
**可用模型列表**:
- `deepseek-chat` - 标准对话模型
- `deepseek-v4-flash` - V4 快速版本,响应更快
- `deepseek-r1` - R1 推理模型
3.3 配置 settings.json
打开 `settings.json` 文件,设置默认模型:
```json
{
"quietStartup": true,
"collapseChangelog": true,
"defaultProvider": "deepseek",
"defaultModel": "deepseek-v4-flash",
"defaultThinkingLevel": "off",
"lastChangelogVersion": "1.1.1",
"compactionThresholdOverride": 0.6
}
```
---
四、验证配置
4.1 启动 GSD
```powershell
gsd
```
4.2 检查模型配置
启动后,终端顶部会显示当前使用的模型:
```
· deepseek-v4-flash ·
```
4.3 测试对话
输入测试问题验证配置是否生效:
```
你好,现在使用的是什么模型?
```
---
五、常见问题排查
5.1 API 密钥错误
**错误信息**:`401 Unauthorized`
**解决方案**:
- 确认 API 密钥正确无误
- 检查密钥是否过期或被禁用
- 确保网络可以访问 `api.deepseek.com`
5.2 模型未找到
**错误信息**:`No API provider registered for api: xxx`
**解决方案**:
- 检查 `models.json` 中的 `api` 字段是否为 `openai-completions`
- 确认 `baseUrl` 是否正确设置为 `https://api.deepseek.com/v1`
5.3 Bash shell 不可用
**错误信息**:`bash: command not found`
**解决方案**:
1. 安装 [Git for Windows](https://git-scm.com/download/win)
2. 确保安装时选择 "Use Git and optional Unix tools from the Command Prompt"
3. 验证 bash 可用:
```powershell
bash --version
```
---
六、切换模型
如需切换到其他 DeepSeek 模型,只需修改 `settings.json`:
```json
{
"defaultModel": "deepseek-chat" // 或 deepseek-v4-flash, deepseek-r1
}
```
---
七、完整配置示例
### auth.json
```json
{
"deepseek": {
"type": "api_key",
"key": "sk-55f4105c666666666666668bdc81e7"
}
}
```
### models.json
```json
{
"providers": {
"deepseek": {
"baseUrl": "https://api.deepseek.com/v1",
"api": "openai-completions",
"models": [
{ "id": "deepseek-chat", "name": "DeepSeek Chat" },
{ "id": "deepseek-v4-flash", "name": "DeepSeek V4 Flash" },
{ "id": "deepseek-r1", "name": "DeepSeek R1" }
],
"apiKey": "sk-55f4105c6666666666666666df8bdc81e7"
}
}
}
```
### settings.json
```json
{
"quietStartup": true,
"collapseChangelog": true,
"defaultProvider": "deepseek",
"defaultModel": "deepseek-v4-flash",
"defaultThinkingLevel": "off",
"lastChangelogVersion": "1.1.1",
"compactionThresholdOverride": 0.6
}
```
---
八、参考链接
- [DeepSeek 平台](https://platform.deepseek.com/)
- [DeepSeek API 文档](https://platform.deepseek.com/docs)
- [GSD 官方文档](https://docs.opengsd.io/)
---
**文档版本**: 1.0
**更新日期**: 2026-06-03
**适用场景**: GSD v1.1+ 配置 DeepSeek 模型
