dsh-balanceDeepSeek Harness plugin
DeepSeek Harness balance plugin for the Settings page
- Stars
- 26
- Forks
- 2
- License
- MIT
- Last commit
- Aug 28, 2026
- Latest release
- 0.5.0
Overview
DeepSeek Harness balance plugin for the Settings page
Original README
Cached from the project repository on Sep 3, 2026. This is source content, separate from the Agents.md review above.
dsh-balance
DeepSeek Harness 插件,用于查询 API 余额、当前可用模型和多维消费统计。API Key 仅由本机 Host 使用,不会发送到浏览器。


功能
- 查看总余额、充值余额和赠送余额
- 在聊天框下方持续显示余额摘要
- 查看当前 API Key 可用的模型
- 在设置页按模型、会话和日期查看实际 usage 消费,并在当前会话的“消费”Tab 查看请求明细
- 缺少 provider usage、未知 provider 或未知模型时标记为“未计费”,不进行 token 估算
- 日期按浏览器 IANA 时区分组;DeepSeek 峰谷价格始终按北京时间计算
- 默认显示 USD;配置
usdToCny后额外显示固定汇率换算的 CNY - 缓存查询结果并支持手动刷新
- 依据 DeepSeek 峰谷定价,在高峰时段(北京时间 9:00–12:00、14:00–18:00)将聊天框下方的余额指示灯变为橙色
- 原生支持简体中文和英文,并跟随 Harness 系统语言切换
- 支持 Harness 已保存的
DEEPSEEK_API_KEY
安装
bashdsh plugin --profile web add @pinkbanana/dsh-balance@latest dsh --profile web
打开 http://127.0.0.1:3080/,进入“设置 → DeepSeek 余额”。该入口位于“Agent 预设”下方,余额摘要也会显示在已有会话的聊天框下方。API Key 可在“设置 → 模型”中保存,或通过 DEEPSEEK_API_KEY 环境变量提供。
消费统计从已保存会话和当前运行中的 live session 读取,不展示 prompt 内容。可在插件配置中增加固定汇率,例如:
yamlusdToCny: 7.2
开发
bashpnpm install pnpm check
