DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
B

dsh-balance-meter

Balance Meter

适用于 DSH Web GUI 的官方、兼容代理或本地核算的余额和会话费用读数。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:Ghost011118/dsh-balance-meter#1a277e8eb9ee5ebbf8589e6bbb96bfe9ac282c11
README兼容性版本

兼容性与来源证明

Balance Meter 以 dsh-balance-meter 发布,当前版本为 0.1.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
github
Registry 更新时间
2026/8/20

版本

0.1.0stable
2026/8/20

相关插件

正在加载相关插件…

最新版
0.1.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
web
许可证
BSD-3-Clause
发布源
github
GitHub
★ 0
周下载
0
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 models-usage 分类下经过校验的插件。

Connect Workbuddydsh-connect-workbuddy把本机登录的 WorkBuddy 模型(国内版与国际版)接入 DeepSeek Harness:每次刷新按上游目录自动读取每个模型的积分倍率,支持逐模型图片输入开关、多账号切换与账号池自动换号,并提供每日签到、卡片与输入框里的胶囊积分读数等只读积分概览。Cost Meterdsh-cost-meterDeepSeek Harness 会话费用统计插件:本会话成本、当日费用、历史记录与官方价格同步,支持多厂商多模型价格计费(内置 170+ 模型 ID 价格目录与自动匹配)、主流 Coding Plan 订阅额度查询与显示(16 家,含 WorkBuddy 官方积分、OpenDesign 工作区查询、含小米 MiMo Token Plan 控制台 Cookie 查询、SCNet Token Plan 本地 Credits 计量与火山方舟 Volcano Ark Coding Plan AK/SK 签名查询Codex Subscriptiondsh-codex-subscription在 DeepSeek Harness 中通过 OAuth 使用 ChatGPT 和 Codex 订阅,支持配额、安全重置、网络搜索、图像和快速模式,并可通过 ChatGPT 移动应用(Beta)控制 DSHXdpooldsh-xdpool将你拥有的所有免费额度汇聚为一个 DSH 模型池:合并所有本地登录的 WorkBuddy 账户并自动故障转移,通过二维码/网页登录 13 个供应商,汇总 76 个供应商的免费层额度,此外还提供用量仪表盘、模型路由和本地 OpenAI 兼容网关

README

dsh-balance-meter

English | 中文

DeepSeek account balance and session-cost readout for the DeepSeek Harness (DSH) Web GUI.

  • Explicit balance sources: official API, proxy-compatible endpoint, or a manual balance accounted and persisted locally
  • Current session estimated spend (token usage x official pricing)
  • Per-model pricing: reads the model actually driving each session from its request header (flash vs pro), so the cost tracks the model you used instead of a fixed default
  • Auto-fetches the official pricing page every 6h, so price changes and the 2026-08-17 peak/off-peak pricing rollout never require a plugin update
  • Peak-hour band (Beijing 09:00-12:00 / 14:00-18:00) applied automatically once the peak pricing goes live

Features

The composer dock shows a chip with the account total balance and the current session's estimated cost:

Balance CNY 4.16 · This session CNY 2.57

Clicking the chip reveals the per-currency balance breakdown (granted + top-up) and the per-bucket cost breakdown (input / cache read / output). Clicking while an error is shown forces an immediate refresh.

Requirements

  • DeepSeek Harness 0.1.0-rc.6 or newer (web profile)
  • A DeepSeek API key stored through the DSH credentials seam (DEEPSEEK_API_KEY — the web Models page writes it)

Installation

From a git URL (no npm account needed):

dsh plugin --profile web add https://github.com/Ghost011118/dsh-balance-meter

Or from a local checkout:

git clone https://github.com/Ghost011118/dsh-balance-meter.git
dsh plugin --profile web add link:$(pwd)/dsh-balance-meter

Restart dsh web, then refresh the page. The balance chip appears in the composer dock next to the conversation stats line.

Configuration

The plugin is zero-config by default (uses DEEPSEEK_API_KEY and the official pricing page). Optional composition settings:

- insert:
    - id: balance
      name: 'dsh-balance-meter'
      config:
        source: official    # official (default) | proxy | manual
        model: auto         # 'auto' (default) | 'flash' | 'pro'
        pricingRefreshHours: 6
KeyTypeDefaultMeaning
source'official' | 'proxy' | 'manual'officialProvenance of the displayed balance. A legacy custom baseUrl with no source is automatically classified as proxy
balanceEndpointstring/user/balanceProxy balance path or absolute HTTP(S) URL
proxyBalancePathstringunsetDot path (for example data.balance) to a numeric balance when the proxy does not return DeepSeek-compatible balance_infos
proxyCurrencystringCNYCurrency paired with proxyBalancePath
manualBalancenumber >= 0unsetCurrent balance entered by the user; changing it creates a new local accounting baseline
manualCurrencystringCNYCurrency of the manual balance
model'auto' | 'flash' | 'pro'autoauto detects each session's model from its request header (flash/pro); flash/pro force that preset regardless of auto-detection
pricingRefreshHoursnumber6Hours between automatic official-pricing refreshes
apiKeyEnvstringDEEPSEEK_API_KEYCredential ref storing the DeepSeek API key
baseUrlstringhttps://api.deepseek.comAPI base URL (gateway/compat override)
refreshIntervalSecondsnumber30Minimum seconds between balance queries

Proxy and manual modes

proxy mode keeps the API key on the DSH host and sends it only as a Bearer credential to the configured endpoint. A DeepSeek-compatible relay may return balance_infos directly. Other relays must configure proxyBalancePath; a missing or non-numeric value is reported as a proxy error and is never labelled as an official balance.

manual mode requires a writable DSH settings provider. The hidden ledger is stored inside the existing balance settings namespace, not in a separate plaintext file and never in the browser response. It records a baseline, remaining amount, locally charged spend, and per-session cumulative-token checkpoints. Only positive token deltas after the last persisted checkpoint are charged, so polling or restarting DSH cannot deduct the same cumulative session usage twice. Changing manualBalance or manualCurrency intentionally creates a new baseline and checkpoints all currently live sessions.

How the cost is estimated

The plugin reads DSH's durable tokenUsage projection (the same accounting the built-in stats line uses) and converts the four buckets — uncached input, cache read, cache write, output — to money using prices parsed from the official pricing page. Cache-write tokens are not billed separately by DeepSeek and default to 0.

For the price set, in auto mode (the default) it uses the model actually driving the session: each session's request header records the provider/model of the most recent request, and the plugin maps that id (deepseek-v4-flash → flash, deepseek-v4-pro → pro) to the matching per-million prices. A session is therefore priced at whatever model produced its usage, not a hard-coded flash. When no header exists yet or the model id is unrecognized, auto falls back to flash. Setting model: flash or model: pro explicitly forces that preset and ignores auto-detection, so you can pin the estimate to one model when you want to.

Before the 2026-08-17 peak-pricing rollout the current single prices stay authoritative; after it, the peak/off-peak band for the current Beijing hour is applied. If the pricing page cannot be fetched, built-in presets (flash: 0.02 / 1 / 2 CNY per 1M) are used. Explicit cost.* overrides in the composition config take precedence over any preset. The cost JSON also reports pricingKey and model so the chip can show which model was priced.

Troubleshooting

"no API key for provider route `deepseek-official`"

The host reads your key from the DSH credentials store — the file <harness home>/.credentials.yaml (default ~/.dsh/.credentials.yaml), the same store the web Models page writes. This plugin's balance query and the LLM route resolve through that same seam.

  • If this error appears, make sure the document contains DEEPSEEK_API_KEY: sk-... (a strict mapping of reference to non-empty string). Editing it while DSH runs is fine — the provider hot-reloads and re-reads the file.
  • When a credentials seam is mounted, both the LLM route and this plugin read the key only from the credential store; a plain export DEEPSEEK_API_KEY is ignored in that case. Exporting still helps for the plugin's own fallback when no seam is present.
  • Prefer running dsh web through a single supervised instance (e.g. dsh-autostart) instead of launching several ad-hoc npx dsh web processes that can race on the same port and settle different credential snapshots. If you encounter this right after killing a manual instance, confirm the other (still-supervised) instance read the key — the balance chip recovering to a live total means the key resolved.
  • The error is transient-friendly: the balance chip auto-recovers, because an error state is never cached as fresh — the next poll re-queries the provider.

Balance stuck on "unavailable" and only updates on click

An error/unavailable snapshot used to be served from the cache until it aged out, so a transient failure could hold the chip on "unavailable" until you clicked to force a refresh. Now an erroneous view is never reused as a fresh cache: every poll re-queries the provider, so the chip recovers on its own as soon as the underlying condition clears (balance reachable, network back, key stored).

License

BSD-3-Clause. Copyright (c) 2026, Ghost011118.