Xidong-AI/dsh-rate-limiter ↗★ 3

@xidong-ai/dsh-rate-limiter

DeepSeek Harness 主动限速插件:按供应商令牌桶限速,超限延迟排队而非失败 适合需要防止 API 调用超限、通过延迟排队平滑请求的用户。

Package
@xidong-ai/dsh-rate-limiter
Compatibility
Unverified
Harness peer range
^0.1.0-rc.7 || ^0.1.1-rc.1
Version
0.3.2
License
MIT
Last updated
Sep 12, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Xidong-AI/dsh-rate-limiter

Configuration

Configure the token bucket per provider in the profile's cordis.patch.yml (or this plugin's cordis.patch.yml):

- id: rate-limiter
  config:
    enabled: true
    providers:
      nvidia:
        rate: 0.5        # tokens/second (long-term average QPS)
        burst: 1         # bucket capacity (allowed burst requests)
      sensenova:
        rate: 0.02778
        burst: 1
  • rate: refill rate (tokens/second), i.e. the long-term average request rate.
  • burst: bucket capacity, the number of burst requests allowed.
  • Providers not listed are not rate-limited; requests pass through untouched (zero intrusion).
  • enabled: false disables the plugin entirely.