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

@xidong-ai/dsh-rate-limiter

按供应商进行令牌桶主动限速 适合需要防止 API 调用超限、通过延迟排队平滑请求的用户。

包名
@xidong-ai/dsh-rate-limiter
兼容性
待验证
Harness 依赖范围
^0.1.0-rc.7 || ^0.1.1-rc.1
版本
0.3.2
许可证
MIT
最近更新
2026年9月12日

安装

$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.