dsh-balance-stats
DSH 设置页插件:DeepSeek 账户余额与本机会话 token 消耗统计面板
AI Analysis
核心用途是实时监控 DeepSeek 账户余额,并统计本机会话的 Token 消耗与费用。适合需要控制 API 支出、设置单日预算制动并直观查看消费统计的用户。支持自定义余额红黄灯警示阈值。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:hhy66/dsh-balance-statsREADME
Read the full README ↗⚙️ 配置
编辑 ~/.dsh/profiles/web/cordis.patch.yml(也可直接改插件自带的 cordis.patch.yml 默认值):
- id: dsh-balance-stats
config:
refreshIntervalMs: 300000 # 余额查询间隔(毫秒),默认 5 分钟
warningThreshold: 10 # 余额低于此值 → 黄灯(元)
dangerThreshold: 5 # 余额低于此值 → 红灯(元)
dailyBudget: 20 # 单日预算上限(元);0 = 关闭预算制动
currency: CNY
prices: # 非 V4 模型的静态单价(元/百万 token)
deepseek-chat: { cacheHit: 0.5, cacheMiss: 2, output: 8 }
改完重启 dsh web 生效。