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.

Agent Capabilities ★ 0 updated 2026-08-19 ⚠️ needs adapt
View on GitHub ↗

Install

dsh plugin --profile web add github:frozo-ai/dsh-budget

GitHub 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

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

More plugins in Agent Capabilities

Browse more in Agent Capabilities

Guides for Agent Capabilities plugins