frozo-ai/dsh-budget
Spend enforcement for DeepSeek Harness: hard budget caps, auto-downgrade, chargeback
dsh-cost-gate is spend enforcement for DeepSeek Harness — deliberately not another dashboard. Every other cost plugin measures after the fact; this one stops the call: at the llm/stream waterfall, before next() runs, it checks the meter — over the hard budget it throws before a single token is billed, past the 80% soft fraction it silently routes to a cheap model, and otherwise it passes through and meters the usage chunk. Config (limitUsd, period daily|monthly|total, softFraction, downgradeModel) is set on the plugin row.
Install
dsh plugin --profile web add github:frozo-ai/dsh-budgetGitHub install per README (EN primary); npm dsh-cost-gate 0.2.0 verified 2026-09-03 with repository field → github.com/frozo-ai/dsh-budget (README documents the github: form as primary). Install: dsh plugin --profile web add github:frozo-ai/dsh-budget; example config row: id budget, name 'dsh-cost-gate/plugin', limitUsd 50, period monthly, softFraction 0.8, downgradeModel.
Compatibility
DSH profiles with the llm/stream cordis waterfall (enforcement hooks in before next()); model downgrade target configurable.
Details
- Repo: frozo-ai/dsh-budget
- Category: Agent Capabilities
- Stars: 0
- Version: npm dsh-cost-gate 0.2.0 (git github:frozo-ai/dsh-budget)
- Last push: 2026-08-19
- First seen: 2026-08-18
Recent updates
0.2.0 current on npm (verified 2026-09-03).
FAQ
- How is this different from cost dashboards?
- Dashboards report what you already spent; dsh-cost-gate enforces at the llm/stream waterfall — the only place a call can actually be stopped before tokens are billed.
- What happens at the soft limit?
- Past 80% (configurable) requests are silently routed to the configured downgrade model instead of being blocked.
- What happens at the hard limit?
- The plugin throws before next() runs, so the call never reaches the provider — no tokens billed for that request.
Alternatives
boNeXY226/dsh-cost-chip · YZz-S/dsh-token-cost-meter