PerryLink/dsh-budget5

dsh-budget

提供模型调用额度控制与成本治理工具

AI 分析

适合需要对Token消耗、每日预算进行监控、预警和超额阻断的管理员。

套件
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