DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Inhibition — DeepSeek Harness 插件(DSH Plugin)
← Plugins

dsh-inhibition

Inhibition

DeepSeek Harness 的限流插件:每个 provider/model 存储桶使用 FIFO 队列,并支持 minIntervalMs 和 maxConcurrent

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add dsh-inhibition@0.1.2
README兼容性版本

兼容性与来源证明

Inhibition 以 dsh-inhibition 发布,当前版本为 0.1.2。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
npm
Registry 更新时间
2026/9/20

版本

0.1.2stable
2026/8/20
0.1.1stable
2026/8/20

相关插件

正在加载相关插件…

最新版
0.1.2
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
19.7 kB
文件数
9
Surface
any
许可证
MIT
发布源
npm
GitHub
★ 0
周下载
44
最近提交
2026/8/20
查看源码 ↗
项目主页 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

相关插件

继续浏览 models-usage 分类下经过校验的插件。

Usage@linxin666/dsh-usage用于 dsh Web GUI 的使用统计插件:检测各提供商的余额和编码计划配额,并提供实时令牌使用记录,同时在侧边栏条目中显示当前会话提供商今日的使用量Whale Widgetdsh-whale-widgetDSH Web 界面右下角的 DeepSeek 余额小鲸鱼挂件:余额/今日已用/峰谷定价、自定义泡泡点击序列(文本/余额/今日/峰谷/图片/随机语句与并列加权选择)、逐行样式与字体、悬浮快捷编辑、音效与每轮消耗、自定义角色/动图/音效、吸附与翻转自定义Usage Stats@ychris12138/dsh-usage-statsdsh Web GUI 的令牌使用热力图、提供商余额和订阅配额Codex Connectdsh-codex-connect用于 DeepSeek Harness 的 ChatGPT OAuth 和 Codex 模型。

README

dsh-inhibition

DeepSeek Harness (DSH) 模型请求限流插件:在 llm/stream waterfall 接缝上为每个 provider/model 桶建立 FIFO 队列,用 minIntervalMs + maxConcurrent 人为控制 API 请求下发频率,避免触发第三方 API 限频。

安装

# 在官方仓库中运行 CLI(或使用你已安装的 dsh)
dsh plugin --profile <名字> add /path/to/dsh-inhibition

# 验证加载
dsh --profile <名字> --dump-config | grep -A 5 inhibition
dsh plugin --profile <名字> why dsh-inhibition

建议为插件开发使用独立 profile(如 dev),不影响日常的 web profile。

配置

在 profile 的 ~/.dsh/profiles/<名字>/cordis.patch.yml 中添加:

- id: inhibition
  config:
    enabled: true            # 总开关,默认 true;false = 全部直通
    default:                 # 所有未命中桶的兜底(缺省 = 不限流)
      minIntervalMs: 3000
      maxConcurrent: 1
    providers:
      deepseek:
        minIntervalMs: 5000
        models:
          deepseek-chat:     # 模型级覆盖
            minIntervalMs: 2000
            maxConcurrent: 2
      openrouter:
        minIntervalMs: 1000

参数语义

参数语义
minIntervalMs相邻两次请求开始下发的最小间隔(毫秒),即频率的倒数
maxConcurrent桶内同时在途请求上限;1 = 严格串行队列;缺省 = 不限制

字段级继承

每个字段独立沿 models[model] → providers[provider] → default 取就近定义值。例如 deepseek-chat 只覆盖了 minIntervalMs,则其 maxConcurrent 继承 providers.deepseek 或 default 的值。完全未配置的 provider(无 default 时)不限流、零开销。

⚠️ 桶拆分的聚合效应

只有当多个模型解析出相同参数时,它们才共享同一个队列。一旦给某个模型设置覆盖,它会分裂成独立的桶:例如 provider 级 minIntervalMs: 5000 + 两个模型各自覆盖,则两个模型各有一条 5s 间隔的独立队列——对同一个 API 的聚合速率可达 2.5s 一次,可能超出你的预期。

如果你要限制的是 provider 整体的请求速率(多数第三方 API 的限频口径),请把参数配在 provider 级或 default 级,不要给模型配覆盖,这样该 provider 的所有模型共享一条队列。

工作原理

  • 插件注册一个 llm/stream waterfall 监听器,包裹每一次流式模型调用;请求先进入对应桶的 FIFO 队列,同时满足间隔与并发约束后才放行到真实 adapter。
  • 排队期间请求被取消(AbortSignal 中止)时,该请求立即出队且不消耗限流名额。
  • 实际等待 > 0 的派发会记录日志:inhibition: deepseek/deepseek-chat dispatched, waited 2340ms (in-flight 1, queued 2)。
  • 插件卸载时唤醒所有排队请求(放行为直通,由 adapter 按 abort 语义处理),不留悬挂定时器。

发布与分发

三种方式,按覆盖范围递增:

  1. 本地/私有: dsh plugin --profile <名字> add /path/to/dsh-inhibition
  2. npm: npm publish --access public 后,用户执行 dsh plugin --profile web add dsh-inhibition(本包产物 lib/ 已提交、无 prepare 脚本,git/npm 安装均无需构建)
  3. dsh-plugin.org 插件中心: 推送到公开 GitHub 仓库 → 仓库添加 topic dsh-plugin → README 含安装命令(✅)且插件导出 apply(ctx)(✅),爬虫自动收录

开发

npm install
npm test        # vitest 单测 + LlmRuntime 集成测试
npm run build   # tsc 产物输出 lib/(已提交,本地安装无需构建)

设计文档见 docs/superpowers/specs/,实现计划见 docs/superpowers/plans/。

License

MIT