DeepSeek Harness Plugin

AKS1st/model-usage-plugin

Stars ★ 1 Category UI Enhancements Added 2026-08-15

Per-model token usage and cost estimation with DeepSeek account balance, shown in a Settings panel tab.

Install

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:AKS1st/model-usage-plugin

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time. Only install sources you trust, and pin a commit (github:owner/repo#sha).

README

DeepSeek Harness(DSH)Web 插件:统计各模型 tokens 消耗并估算费用,显示 API 账户余额。

设置面板"模型消耗"页签效果

功能

  • 按模型统计 tokens(区分缓存命中 / 未命中 / 写入)、调用与失败次数,估算费用
  • 内置主流模型默认价格(国产模型按人民币、海外模型按美元),首次使用自动套用,可随时修改
  • 汇率换算:费用统一按目标货币展示(默认人民币),点击"更新汇率"手动刷新
  • 查询 DeepSeek 账户余额,页面顶部大字展示总 Token 与账户余额
  • 设置面板"模型消耗"页签;"仅显示已调用模型"可隐藏未使用过的模型

安装

从 GitHub 仓库安装(纯 JS,零构建,即装即用):

dsh plugin --profile web add github:AKS1st/model-usage-plugin
dsh web   # 重启 web 服务使 profile 生效

本地安装(clone 后直接指向仓库目录):

git clone https://github.com/AKS1st/model-usage-plugin.git
dsh plugin --profile web add /path/to/model-usage-plugin
dsh web

通过 dsh plugin(pnpm 转发)安装到 profile,并自动登记为 bundle 层。卸载:

dsh plugin --profile web remove musage-stats

使用

打开 设置 → 模型消耗:

  • 顶部:总 Token、账户余额、目标货币与汇率状态
  • 每模型卡片:token 明细与费用;点"配置价格"可修改单价与计价货币,或点"重置"恢复默认价
  • 勾选"仅显示已调用模型"时只展示实际使用过的模型

数据与隐私

  • 统计与价格保存在 $DSH_HOME/musage-stats.json
  • 页面填写的余额 API Key 仅保存在内存,不会写入磁盘;需持久化时请配置 DEEPSEEK_API_KEY 环境变量或凭证

License

MIT

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →