DeepSeek Harness 插件

iqingyoung/429-throttle-mcp#dsh-throttle

Star 数 ★ 2 分类 工具与能力 收录于 2026-08-29

DeepSeek Harness 限流插件:长程任务自动控速避免 429,支持任务复盘。

安装

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

dsh plugin --profile web add github:iqingyoung/429-throttle-mcp#path:/packages/dsh-throttle

装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。

README

English | 中文

DeepSeek Harness 限流插件 — 为 Harness 生态提供速率限制的 API 代理,复用 429-throttle-mcp 核心逻辑。


是什么

很多免费大模型 API(Grok、Gemini、Dots 等)每分钟只能调用 30 次左右。Agent 在做长程任务时,很容易超出限额被 429 拒绝。

dsh-throttle 在这个痛点上提供了一个透明限流层,专为 DeepSeek Harness 生态设计:

Agent → call_api 工具 → 限流器 → 实际 API 请求 → 返回结果 + 用量快照

与 429-throttle-mcp 共享同一个 rate-limiter.js 核心逻辑,只是通信协议从 MCP stdio 改为 DSH Plugin API。


核心参数

参数 默认值 说明
maxCalls 30 每分钟最大调用次数 (RPM)
maxTokens 750000 每分钟最大 Token 数 (TPM),含请求体和响应体

配置来源:DSH config 或 dsh-manifest.json。


暴露的工具

call_api

通过限流代理发送 HTTP 请求。

参数 类型 必填 说明
url string ✅ 目标 API 的完整 URL
method string ❌ HTTP 方法,默认 GET
body string ❌ 请求体,JSON 字符串
headers string ❌ 自定义请求头,JSON 字符串

如果被限流拒绝,返回 RATE_LIMIT_EXCEEDED 错误,包含 retryAfterSeconds 建议等待时间。

get_rate_limit_status

查询当前速率限制使用情况。返回已用/剩余调用次数和 Token 数。

set_rate_limit

动态调整限流参数(实时生效无需重启)。

参数 类型 说明
callsPerMinute number 每分钟最大调用次数 (RPM)
tokensPerMinute number 每分钟最大 Token 数 (TPM)

安装

npm install dsh-throttle

在 DSH 配置中添加:

{
  "plugins": {
    "dsh-throttle": {
      "maxCalls": 30,
      "maxTokens": 750000
    }
  }
}

加载插件:

dsh plugin load dsh-throttle

与 429-throttle-mcp 的关系

429-throttle-mcp dsh-throttle
类型 MCP Server DSH Plugin
通信协议 MCP stdio JSON-RPC DSH Plugin API
安装 npm i 429-throttle-mcp npm i dsh-throttle
核心代码 rate-limiter.js(共享) rate-limiter.js(共享)
GitHub 主仓库 同仓库

SEO 关键词

429报错, anti 429, DSH限流, DeepSeek Harness plugin, 大模型每分钟调用限制, 免费大模型速率限制, Agent批量调用触发429, RPM, TPM, rate limiter, quota guard, mcp proxy, throttle, llm api quota, cop, HTTP 429, Too Many Requests, rate limiting, token bucket, sliding window


License

MIT

内容来自项目 README(GitHub)↗

链接

同类插件

查看整个分类 →

社区评论

评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。