前言¶
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