DeepSeek Harness 插件

cuboteam/dsh-plugin-dit

Star 数 ★ 1 分类 模型与账号接入 收录于 2026-08-18 npm dsh-plugin-dit

DIT.ai 的 DeepSeek Harness 模型接入 bundle:使用一个 DIT_API_KEY 安装 29 个 OpenAI Chat Completions 模型和 10 个 Anthropic Messages 模型,并按协议配置 thinking。

安装

# npm 包(预构建)

dsh plugin --profile web add dsh-plugin-dit

# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)

dsh plugin --profile web add github:cuboteam/dsh-plugin-dit

装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本。请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。

README

npm version CI license

DeepSeek Harness 中使用 DIT.ai 的对话模型目录。这个 profile bundle 会把 DIT 添加为原生模型提供方,不改变 Harness 自带的工具与运行时。

安装

DeepSeek Harness 需要 Node.js 22.19 或更新版本,以及 pnpm。

npx @deepseek-ai/dsh plugin --profile web add dsh-plugin-dit

设置 DIT API Key,然后启动 Harness:

export DIT_API_KEY="你的-DIT-API-Key"
npx @deepseek-ai/dsh web

打开 Settings → Models,选择模型和协议:

  • DIT.ai:推荐默认,使用 OpenAI Chat Completions(/v1/chat/completions
  • DIT.ai Messages:使用 Anthropic Messages(/v1/messages

DIT.ai 提供 DIT 当前所有支持 OpenAI Chat Completions 的模型;DIT.ai Messages 提供当前所有支持 Anthropic Messages 的模型。两个提供方共享同一个 DIT_API_KEY

Headless 模式:

npx @deepseek-ai/dsh plugin --profile headless add dsh-plugin-dit
export DIT_API_KEY="你的-DIT-API-Key"
npx @deepseek-ai/dsh --profile headless "解释这个仓库"

在 Harness 内发现插件

该插件已进入 dsh-market 使用的社区目录,也可以通过 dsh-find-plugin 搜索。

npx @deepseek-ai/dsh plugin --profile web add dshmarket

打开 Market 标签页,搜索 DITdsh-plugin-dit

协议支持

Provider Harness API DIT endpoint Thinking
dit openai-completions /v1/chat/completions 按模型能力
dit-messages anthropic-messages /v1/messages Anthropic Messages 原生 thinking

DIT.ai 适合 OpenAI-compatible 客户端;DIT.ai Messages 适合需要 Anthropic 消息块、tool use、原生 Messages 流事件和 thinking budget 的工作流。

插件配置内容

  • Provider routes:ditdit-messages
  • OpenAI Chat base URL:https://api.dit.ai/v1
  • Anthropic Messages base URL:https://api.dit.ai(Harness 会自动追加 /v1/messages
  • 凭据引用:DIT_API_KEY
  • 归因请求头:X-DIT-Integration: deepseek-harness
  • Chat 模型:/v1/models 当前声明支持 openai_chat_completions 的全部 29 个模型,覆盖 Claude、DeepSeek V4、Gemini、GLM、GPT、Grok、Kimi、MiniMax 系列
  • Messages 模型:当前声明支持 anthropic_messages 的全部 10 个 Claude 模型
  • Messages 原生 thinking,支持 Off、High、Max

API Key 由 Harness 在请求时解析,不会写进插件。 DIT 鉴权后的 /v1/models 是协议支持范围的权威来源。图像、音频和视频模型不在列表中,因为 Harness 使用的是对话模型接口。

安全

插件包不包含 API Key。DIT_API_KEY 只是环境变量引用,Harness 仅在发送请求时解析它。安全问题请通过 GitHub Security Advisory 私下报告。

本地开发

在本目录执行:

pnpm test
pnpm smoke:harness
DIT_API_KEY="你的-DIT-API-Key" node scripts/check-catalog.mjs
npx @deepseek-ai/dsh plugin --profile web add .
npx @deepseek-ai/dsh --profile web --dump-config

pnpm smoke:harness 会让官方 Harness headless agent 分别请求本地 mock 的 /v1/chat/completions/v1/messagesscripts/check-catalog.mjs 会把插件模型 ID 与 DIT 实时声明的协议范围进行对比,不发起模型推理请求。

卸载

npx @deepseek-ai/dsh plugin --profile web remove dsh-plugin-dit

License

MIT

内容来自项目 README(GitHub)↗

链接

同类插件

查看整个分类 →