@lemcae/dsh-balance
DeepSeek 开放平台余额与会话消耗读取插件,支持在 Web 客户端页眉展示余额与会话估算费用,提供自动刷新、价格表编辑及专用查询工具。
AI 分析
核心用途是实时监控 DeepSeek 官方 API 的余额和单次会话花费。适合使用官方 API 且需要控制预算的个人或团队。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:LemCAE/dsh-balance说明文档
阅读完整 README ↗Usage
- Chip: shows
余额 ¥x | 会话 ≈¥y; click to refresh; hover for details (breakdown, model, 更新于, refresh cadence / pause note). - Settings: 设置 → DeepSeek 余额 — balance rows, 自动刷新间隔 (15 s … 5 min or custom), 自动刷新开关, 界面语言 (auto / 中文 / English), price-table editor (保存 persists), peak-hours hint.
- Command (also usable from the command palette):
/dsh-balance [refresh | interval | prices | language | auto-refresh ]. - Tool:
deepseek_balance(no arguments).
Configuration
Settings namespace dsh-balance:
| Field | Default | Meaning |
|---|---|---|
autoRefresh | true | Enable/disable the auto-refresh timer (/dsh-balance auto-refresh on|off) |
refreshIntervalMs | 30000 | Active auto-refresh interval (5 000–600 000 ms) |
language | auto | Plugin UI language:auto (follow host UI), zh-CN, or en |
prices | see source | { models: { deepseek-v4-flash, deepseek-v4-pro, default } }, each model { offPeak, peak } rates in CNY per 1M tokens |
Prices are picked by Beijing hour: peak for 9:00–12:00 and 14:00–18:00,
offPeak otherwise.