前言¶
DSH(DeepSeek Harness)的插件体系允许通过插件扩展模型接入方式。dsh-plugin-dit 做的事情比较具体:把 DIT.ai 作为 DeepSeek Harness 的原生模型提供商加入 Harness,同时暴露 OpenAI Chat Completions 与 Anthropic Messages 两套接口,并在首次运行 Web profile 时提供注册、API-key 创建和 Harness Credentials 保存的引导。
这是什么¶
dsh-plugin-dit 由 cuboteam 维护,许可证为 MIT,当前包版本为 0.2.1。它的定位是为 DeepSeek Harness 提供 DIT.ai provider 和首次运行 onboarding。
它主要做三件事:
- 在 DeepSeek Harness 中加入 DIT.ai 模型提供商
- 同时暴露 OpenAI Chat Completions 与 Anthropic Messages 两类接口
- 为 Web profile 提供注册、API-key 创建和 Harness Credentials 保存的引导
核心功能¶
- 增加 DIT.ai 作为 DeepSeek Harness 的原生模型提供商
- 支持 provider routes:
dit:OpenAI Chat Completions,接口为/v1/chat/completionsdit-messages:Anthropic Messages,接口为/v1/messages- 提供首次运行 Web onboarding,用于注册、创建 API key,并通过 Harness Credentials 保存
- 请求时由 Harness 解析
DIT_API_KEY - 插件本身不包含 API key
- 当前 DIT 目录中列出 29 个 OpenAI Chat Completions 模型,以及 10 个 Anthropic Messages Claude 模型;这些数量以 DIT 当前目录为准
- 支持 Native Messages thinking,等级包括
Off、High、Max - 发送归属头:
X-DIT-Integration: deepseek-harness
- 可以在
dsh-market和dsh-find-plugin中发现 - 保持 stock Harness runtime 和 tools 不变
- 不列出图片、音频和视频模型
安装与启用¶
DeepSeek Harness 要求 Node.js 22.19 或更新版本,并要求 pnpm。package.json 中的 Node 引擎声明为:
"node": "^22.19.0 || >=24.0.0"
Web profile¶
先为 Web profile 安装插件:
npx @deepseek-ai/dsh plugin --profile web add dsh-plugin-dit
然后启动 Harness:
npx @deepseek-ai/dsh web
首次 Web profile 启动时,会有一次性的 DIT 引导,用于注册、打开 API-key 页面,并通过 Harness Credentials 保存 key。
也可以跳过引导,使用环境变量提供 key:
export DIT_API_KEY="your-dit-api-key"
然后在 Harness 中打开:
Settings > Models
选择以下其中一项:
DIT.ai:OpenAI Chat Completions(/v1/chat/completions)DIT.ai Messages:Anthropic Messages(/v1/messages)
Headless profile¶
无界面运行时,先安装到 headless profile:
npx @deepseek-ai/dsh plugin --profile headless add dsh-plugin-dit
设置 key:
export DIT_API_KEY="your-dit-api-key"
然后执行一次调用:
npx @deepseek-ai/dsh --profile headless "Explain this repository"
移除插件¶
如不再需要,可执行:
npx @deepseek-ai/dsh plugin --profile web remove dsh-plugin-dit
密钥与权限¶
这个插件不包含 API key。DIT_API_KEY 由 Harness 在请求时解析,并且只发送到配置的 DIT API endpoint。
默认本地 Harness backend 会把 credential 未加密地保存在:
$DSH_HOME/.credentials.yaml
文件权限为 0600。插件会以当前 dsh 进程权限运行,因此安装前请自行检查源码、许可证和运行环境。
适用场景与注意¶
适合以下使用方式:
- 在 DeepSeek Harness 中接入 DIT.ai 的 OpenAI Chat Completions 接口
- 在同一 Harness 中接入 DIT.ai 的 Anthropic Messages 接口
- 使用 Web profile 的 onboarding 完成注册和 API-key 保存
- 在 headless profile 中用
DIT_API_KEY做命令行调用
需要注意:
- 模型数量是当前目录中的列出值,可能以 DIT 当前目录为准
- 图片、音频和视频模型不在列出范围内
dsh-market等社区目录用于发现插件,不代表插件属于官方应用商店或官方从属关系- 安装前应检查源码与
MIT许可证,并确认当前dsh进程权限符合预期
链接¶
- 社区目录:https://github.com/dsh-market/dsh-market
- 插件仓库:https://github.com/cuboteam/dsh-plugin-dit