npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-throttle

v1.3.0

Published

DeepSeek Harness 限流插件:长程任务自动控速不再 429,支持任务复盘(begin_task/end_task),复用 429-throttle-mcp 核心逻辑

Readme

dsh-throttle

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