
jyao-SUSE-power-group/dsh-provider-rate-limit
dsh-provider-rate-limit
dsh-provider-rate-limit
Install
npx @deepseek-ai/dsh plugin --profile web add github:jyao-SUSE-power-group/dsh-provider-rate-limitRestart `dsh web` after install. Bundle APIs can change during the developer preview.
README badge
[](https://dshhub.dev/plugins/dsh-provider-rate-limit)Paste this into your README. The star count updates with every catalog sync.
From the README
Excerpt from jyao-SUSE-power-group/dsh-provider-rate-limit, cleaned of badges and images.
dsh-provider-rate-limit
English | 简体中文
Per-provider & per-model rate limiting for DeepSeek Harness LLM traffic, plus gateway identity rules (client spoofing) for restricted free-tier gateways.
适用于 DeepSeek Harness 的按供应商/模型粒度 LLM 限速插件,附带网关身份规则(客户端伪装)能力。
Features
- Token-bucket rate limiting per
(provider, model)route — smooth refill with burst support, idle-time recovery - Two modes when the bucket is empty:
wait— hold the request up tomaxWaitMs, then let it through (transparent queueing)reject— short-circuit immediately with a syntheticRATE_LIMITresponse carryingproviderRetryAfterMs
- Strict FIFO — reservation-based design guarantees same-order admission without polling
- Gateway identity rules — rewrite
User-Agent/ inject static headers for URLs matching a pattern (e.g. gateways that validate client identity), with a one-click OpenCode Zen preset - Master switch — flip
enabledoff to pass all traffic instantly, no listener re-registration - Settings UI card — full configuration from the Harness settings page, zh/en localized
- Live stats line — compact readout in the composer dock (under the chat input), auto-refreshes every 5s; hover to see per-route provider·model breakdown
- Stats HTTP API —
GET /api/provider-rate-limit.statsreturns aggregate and per-route counters as JSON (used by the dock line; also available for external tooling) - Cross-plugin stats service —
provider-rate-limit/statsservice for in-process consumers (getStats, getAllStats, getAggregateStats, resetStats) - O(1) route lookup — pre-built Map for rule matching instead of linear scan
- Standard ULID — 26-char Crockford base-32 IDs (48-bit big-endian time + 80-bit random)
Install
DSH plugin manager (recommended)
dsh plugin --profile web add github:jyao-SUSE-power-group/dsh-provider-rate-limit
Then restart DeepSeek Harness. The plugin registers itself into the llm service via its cordis patch.
Manual
git clone https://github.com/jyao-SUSE-power-group/dsh-provider-rate-limit.git ~/.dsh/plugins/dsh-provider-rate-limit
cd ~/.dsh/plugins/dsh-provider-rate-limit && pnpm install --prod
Configuration
Open Settings → 插件 → Provider Rate Limit. All options hot-reload — no restart needed.
…

