Xidong-AI/dsh-rate-limiter ↗★ 3
@xidong-ai/dsh-rate-limiter
按供应商进行令牌桶主动限速 适合需要防止 API 调用超限、通过延迟排队平滑请求的用户。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Xidong-AI/dsh-rate-limiter說明文件
閱讀完整 README ↗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: falsedisables the plugin entirely.