DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

Deepseek Cost Usage Status Plugin — DeepSeek Harness 插件(DSH…
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
D

deepseek-cost-usage-status-plugin

Deepseek Cost Usage Status Plugin

面向 DeepSeek Harness (DSH) Web UI 的 DeepSeek API 实时费用、用量与余额仪表板:在输入区增加第二行统计信息,并跟踪每个会话的费用;显示按北京时间划分的高峰/非高峰时段、会话费用(官方人民币定价)、约每分钟消耗费用、账户余额和当前模型。

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

npx -y @deepseek-ai/dsh plugin --profile web add github:Zenjibad/deepseek-cost-usage-status-plugin#4b198161599557076f3127f77a544004b5affe75
README兼容性版本

说明

在 DSH 内实时展示 DeepSeek API 用量与费用:输入区常驻统计行,显示按北京时间划分的高峰/非高峰时段、会话费用、约每分钟消耗费用、账户余额与当前模型。

兼容性与来源证明

Deepseek Cost Usage Status Plugin 以 deepseek-cost-usage-status-plugin 发布,当前版本为 1.0.3。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

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

版本

1.0.3stable
2026/8/23
1.0.1stable
2026/8/21

相关插件

正在加载相关插件…

最新版
1.0.3
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
web
许可证
MIT
发布源
github
GitHub
★ 2
周下载
0
最近提交
2026/8/28
查看源码 ↗
README Badge

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

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

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

认领这个 Plugin →
报告问题

相关插件

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

Usage@linxin666/dsh-usage用于 dsh Web GUI 的使用统计插件:检测各提供商的余额和编码计划配额,并提供实时令牌使用记录,同时在侧边栏条目中显示当前会话提供商今日的使用量Usage Stats@ychris12138/dsh-usage-statsdsh Web GUI 的令牌使用热力图、提供商余额和订阅配额Codex Connectdsh-codex-connect用于 DeepSeek Harness 的 ChatGPT OAuth 和 Codex 模型。Ui Usage Billing@kenz1117/dsh-ui-usage-billingDeepSeek Harness 的用量计费仪表板:侧边栏成本指标和完整的仪表板模态窗口,依据当前多提供商目录定价,并汇总会话日志中的实际用量。

README

DeepSeek Cost / Usage / Status Plugin for DeepSeek Harness

A packaged Cordis plugin for DeepSeek Harness (DSH) that adds a second, colored status line under the shipped conversation stats line, showing live DeepSeek API cost, usage, and account balance.

● Off-peak 00:47 · −50%  ·  Cost ¥0.0412  ·  ~¥1.23/min  ·  Balance ¥12.42  ·  Model deepseek-v4-flash   ← CNY account
● Off-peak 00:47 · −50%  ·  Cost $0.0057  ·  ~$0.17/min  ·  Balance $1.73  ·  Model deepseek-v4-flash   ← USD account (cost auto-converted from CNY)

Features

  • On / off-peak indicator — green when off-peak (idle), red when peak, using DeepSeek's official Beijing-time peak windows (09:00–12:00, 14:00–18:00). The clock shows your local timezone; the decision is Beijing-time so the color matches what DeepSeek actually bills.
  • Session cost — real per-session token usage accumulated from the llm/stream waterfall, priced with official CNY rates including the 50% off-peak discount, then converted into your account's currency (from the balance API) so cost and balance are directly comparable.
  • Burn rate — ~/min in the same display currency, i.e. session cost ÷ elapsed minutes since the session's first model call.
  • Account balance — polled from DeepSeek's /user/balance every 60s using DSH's own DEEPSEEK_API_KEY; degrades to Balance — if the key is unavailable/network fails.
  • Current model + reasoning effort.
  • Font-matched to the shipped stats line (12px/20px, muted tertiary color, centered) so it reads as the same family.

Quick start

This is a packaged profile plugin — install once with the official CLI, it loads on every DSH boot and survives restarts (no cordis_define):

dsh plugin --profile web add deepseek-cost-usage-status-plugin
# or from a local checkout:
dsh plugin --profile web add ./deepseek-cost-usage-status-plugin

Then restart DSH. The plugin renders its line in the conversation.composer.dock slot (a new cell beside the shipped stats cell), fed by GET /deepseek-cost/api.

Requirements

  • DSH 0.1.0-rc.6+ with the web UI and a configured DeepSeek provider.
  • A DeepSeek API key stored as DEEPSEEK_API_KEY in ~/.dsh/.credentials.yaml (reused for the balance read). Without it, balance shows —; the rest still works.

How it works

  • Host half (source of truth): wraps the llm/stream waterfall, forwards every chunk untouched, reads the terminal usage chunk per completed call, accumulates per-session token/model/timing, computes cost from the PRICING table (official CNY, peak-class; idle = 50%) with the Beijing-time peak decision, and polls balance via curl.exe + subprocess. Serves the snapshot over GET /deepseek-cost/api (a webServer route — the packaged-plugin replacement for the dynamic harness.handle RPC seam).
  • Client half: registers in conversation.composer.dock, polls /deepseek-cost/api every 2s, and renders the font-matched line with a green/red peak chip.

User-currency cost display

Cost and burn rate are computed in CNY (the pricing table's basis) and then displayed in your account's currency — the one returned by GET /user/balance (usually USD). That way Cost and Balance share the same unit. The conversion uses a hybrid FX rate:

  1. Live — fetched from open.er-api.com (/v6/latest/CNY, free, no key) through the same curl.exe + subprocess path as the balance poll, refreshed hourly by default (fxRefreshMs).
  2. Fallback — a configured fixed rate (fallbackFxRate, CNY per 1 unit of the display currency, e.g. 7.2 for USD), used only when the live fetch fails.

If neither a live rate nor a fallback is available — or the balance is unknown (no API key / network failure) — cost simply stays in CNY. No wrong numbers are ever shown.

Configuration

Set from a patch layer, e.g. $DSH_HOME/cordis.patch.yml:

deepseek-cost-usage-status-plugin:
  config:
    fallbackFxRate: 7.2   # CNY per 1 USD — used when the live FX fetch fails
    fxRefreshMs: 3600000  # live FX refresh interval (default 1 h)
optiondefaultmeaning
fallbackFxRateunsetFixed CNY→display-currency rate used when the live FX fetch fails
fxRefreshMs3600000How often to refresh the live FX rate (min 60 000)

The currency symbol follows the account currency (¥, $, €, £, …); unmapped ISO codes render as their 3-letter code.

Pricing table (official DeepSeek CNY, per 1M tokens, effective 2026-08-17)

modelcache-hit incache-miss inoutput
deepseek-v4-flashidle¥0.05¥1.5¥4.5
peak¥0.10¥3.0¥9.0
deepseek-v4-proidle¥0.15¥4.5¥13.5
peak¥0.30¥9.0¥27.0

Update PRICING in src/index.ts (single place) when rates change.

FAQ

  • The line shows Cost … / Balance —? The host route is unreachable, the balance key is missing (~/.dsh/.credentials.yaml → DEEPSEEK_API_KEY), or the balance call failed (network / non-200). Cost/peak still work without balance; the line self-recovers on the next poll.
  • Why does the balance read put the API key on a curl command line? The key travels as an Authorization header argument to curl.exe (visible to other processes on this machine) — an accepted tradeoff for this readout tool. No key is stored or logged by the plugin itself.
  • Why is cost shown in my account's currency? The plugin converts the CNY price into the currency your balance API returns (usually USD), so cost and balance are comparable. The rate is fetched live (hourly) and falls back to your configured fallbackFxRate when the fetch fails; without any rate, cost stays in CNY.

Layout

  • src/index.ts — the host half (waterfall wrap, pricing, balance poll, /deepseek-cost/api route).
  • src/client/index.tsx — the client bundle (2s poller, dock line).
  • cordis.patch.yml — dsh.bundle.patch: mounts the plugin row at boot.
  • tsdown.config.ts — builds host (node ESM) + client (CJS ModuleLoader closure).
  • tests/fixtures/balance.json — real-shape /user/balance response sample.
  • AGENTS.md — guide for AI agents / maintainers.
  • README.zh.md — 中文文档.

License

MIT — see LICENSE.