PerryLink/dsh-budget5

dsh-budget

Cost governance for DeepSeek Harness: aggregated token/cost metering per model, session and day, session/daily/monthly budget caps with threshold alerts (desktop notification + webhook) and alert/block/degrade over-limit policies, built-in carbon footprint estimation and per-model latency benchmarks, a Settings budget tab, and the /budget command

包名
dsh-budget
版本
0.4.9
许可证
Apache-2.0
最近更新
2026年9月12日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:PerryLink/dsh-budget

Configuration

All tunables are Schemastery Config fields (changeable from cordis.yml). cordis.patch.yml documents each key inline.

KeyDefaultMeaning
prices{}Per-model USD prices per 1M tokens, merged over the built-in table
defaultPrice{input: 1.0, output: 3.0}Fallback for models absent from both tables
budgets.session / daily / monthly10 / 50 / 500Budget caps in USD per scope; omit for unlimited
warnRatio0.8Alert once usage reaches this fraction of a cap (0..1)
overLimitalertalert / block / degrade after a cap is crossed
degradation{}Model id → cheaper model id of the same provider
webhookUrl(none)Optional webhook URL for threshold alerts (POST JSON)
webhookTimeoutMs5000Webhook request timeout
alertsEnabledtrueMaster switch for threshold alerts
alertCooldownMs3600000Minimum ms between two alerts of the same scope
desktopNotificationsfalseBrowser desktop notifications while the tab is open
refreshIntervalMs5000Settings tab polling interval
carbon.enabled / region / pue / energyKwhPerTokentrue / global / 1.58 / 0.000007Carbon bridge (regions: global, us, eu, china, india, uk, france, iceland)
latency.enabled / windowSizetrue / 200Per-model latency percentiles and their window
currency{code: USD, rate: 1.0, decimals: 2}Display currency (costs are computed in USD)
outputLanguageen/budget output language: en / zh
historyDays30Per-day usage history kept in the panel snapshot
persistence.enabled / intervalMstrue / 10000Durable day/month persistence across restarts (storage domain); degrades to in-memory when the domain is absent