szcdvgnh/dsh-rate-limiter-renew
Per-provider and per-model rate limiting for DeepSeek Harness 0.2.x: an llm/stream interceptor that resolves each (provider, model) to a token bucket with wait or reject modes, an optional FIFO concurrency gate, upstream-429 cool-down, per-route overrides and a stats UI/SSE/HTTP endpoint — and it discovers the models you actually have instead of using a hard-coded route table.
dsh-rate-limiter-renew is a modernised continuation of dsh-provider-rate-limit (0.3.1) that adds per-provider and per-model rate limiting to DeepSeek Harness 0.2.x. An llm/stream interceptor resolves each (provider, model) pair to a token bucket: in wait mode it sleeps then continues, in reject mode (or when the wait exceeds maxWaitMs) it finishes with a RATE_LIMIT result. An optional FIFO concurrency gate bounds parallel calls, and an upstream 429 cools the route down while still forwarding it. The renewal rewrites the parts the 0.2.x framework removed or replaced (module-level installSettingsSection, the old settings slot, legacy store APIs) into a host-owned settings service plus a plugin-owned UI card, and adds a large new behaviour — it discovers the models you actually have from the live llm catalogue instead of relying on a hard-coded route table. Token buckets, wait/reject modes, strict FIFO reservations, per-route overrides, the enable/disable switch, the stats UI, the SSE feed and the HTTP stats endpoint are all retained.
Install
dsh plugin --profile web add "github:szcdvgnh/dsh-rate-limiter-renew"Copied verbatim from the README's 'Install from GitHub' block, which follows it with a commit-pinned form github:szcdvgnh/dsh-rate-limiter-renew#<commit-sha> (pnpm fetches a codeload tarball for github:, so a pinned commit is reproducible). The README also documents a profile-dependency install and a copy-in install; there is no build step.
Compatibility
Requires DeepSeek Harness 0.2.0-rc.0 or newer (0.2.0-rc.2 and 0.2.0 verified; dsh.engines.dsh is >=0.2.0-0) and Node.js 22.8+. A web platform profile (dsh.client.platform = "web") is needed for the settings card and composer line, while the host half works headless. The package declares no peerDependencies on purpose — its only runtime dependency is @deepseek-ai/schemastery, already present in every 0.2.x profile — and needs no build step.
Details
- Repo: szcdvgnh/dsh-rate-limiter-renew
- Category: Models & Providers
- Stars: 0
- Version: GitHub repo szcdvgnh/dsh-rate-limiter-renew (install is a github: spec to the repo itself); the README documents the packaged tarball as dsh-rate-limiter-renew-1.0.0.tgz.
Alternatives
aa2246740/dsh-antigravity-oauth · AmmarByFar/dsh-trustedrouter · BruceLanLan/dsh-tier-router