DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

Plugin Cost Meter — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

dsh-plugin-cost-meter

Plugin Cost Meter

DeepSeek Harness 对话标题栏右上角显示每次会话的实时费用徽章,支持峰谷分时计价。

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

npx -y @deepseek-ai/dsh plugin --profile web add dsh-plugin-cost-meter@0.6.0
README兼容性版本

兼容性与来源证明

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

DSH 兼容范围
*
运行环境
web
发布来源
npm
Registry 更新时间
2026/10/18

版本

0.6.0stable
2026/10/18
0.5.2stable
2026/10/17

相关插件

正在加载相关插件…

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

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

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

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

认领这个 Plugin →
报告问题

相关插件

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

Whale Widgetdsh-whale-widgetDSH Web 界面右下角的 DeepSeek 余额小鲸鱼挂件:余额/今日已用/峰谷定价、自定义泡泡点击序列(文本/余额/今日/峰谷/图片/随机语句与并列加权选择)、逐行样式与字体、悬浮快捷编辑、音效与每轮消耗、自定义角色/动图/音效、吸附与翻转自定义Client Ui Model Capabilities@linxin666/dsh-client-ui-model-capabilities为自定义 pi-ai 提供商声明每个模型的能力(图像输入和推理力度),可直接在 Models 设置卡片中编辑;写入官方 llm-pi-ai 设置命名空间,不更改 DSH 源代码。Cost Meterdsh-cost-meterDeepSeek Harness 会话费用统计插件:本会话成本、当日费用、历史记录与官方价格同步,支持多厂商多模型价格计费(内置 170+ 模型 ID 价格目录与自动匹配)、主流 Coding Plan 订阅额度查询与显示(14 家,含 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)控制 DSH

README

dsh-plugin-cost-meter

A DeepSeek Harness plugin that puts a live cost badge in the conversation header (top-right) and prices every request with peak / off-peak (time-of-day) tiers.

┌──────────────────────────────────────────────────────────────┐
│  Session title                                [¥0.0042]      │   ← badge here
├──────────────────────────────────────────────────────────────┤
│  … conversation …                                            │
└──────────────────────────────────────────────────────────────┘

Features

  • Live — the badge updates as the host reports provider usage; no polling, no timers.
  • Historically correct — each request is priced by its own wall-clock timestamp, so a session that spans peak and off-peak stays accurate even if the page sits open overnight.
  • Weekday-aware peak tiers — DeepSeek bills peak only Monday–Friday; weekends are off-peak all day. The schedule is configurable (windows, weekdays, multiplier, time zone).
  • Silent price sync — a bundled price catalog plus an out-of-band remote catalog refreshed on an interval. Push a new catalog/prices.json and every installed copy picks it up without a plugin release; a failed refresh keeps the last good rates.
  • Explicit peak/off-peak rates — models may carry an explicit discounted pair (cacheMiss + cacheMissOffPeak), not just a multiplier.
  • Route-aware matching — provider/model, provider/*, *-model wildcards, and case/space/punctuation-insensitive model ids.
  • Never fakes a number — an unpriced route renders 未配置 (unpriced) instead of a made-up fallback rate.

Install

From npm (recommended)

dsh plugin --profile web add dsh-plugin-cost-meter

The package declares dsh.bundle, so dsh plugin add activates it as a profile layer automatically — no manual cordis.patch.yml row is required.

From a local checkout

dsh plugin --profile web add "link:E:/path/to/dsh-plugin-cost-meter"

link: keeps the checkout live, so edits apply after a dsh web restart without reinstalling.

Restart the server afterwards:

dsh web

Configure

The bundled cordis.patch.yml inserts the plugin row with defaults. Override it by adding a cost-meter row with the same id in your profile's cordis.patch.yml (~/.dsh/profiles/web/cordis.patch.yml):

- insert:
    - id: cost-meter
      name: dsh-plugin-cost-meter
      config:
        currency: CNY                 # display currency; empty = catalog currency
        fx:
          cnyPerUsd: 7.1              # used when the catalog is USD and you display CNY
        catalogUrl: ""                # "" = this package's own catalog (derived from repository)
        refreshMinutes: 360           # silent refresh interval; 0 disables it
        pricingTimeoutMs: 4000
        pricingUrl: ""                # optional legacy { models, default } document
        models:                       # manual overrides (highest priority, display currency)
          deepseek-official/deepseek-flash:
            inputPerM: 1.06           # off-peak base
            cacheReadPerM: 0.021
            cacheWritePerM: 1.06
            outputPerM: 4.26
        default:                      # optional fallback; omit to report unknown routes as unpriced
          inputPerM: 1
          outputPerM: 4
        peak:
          enabled: true
          multiplier: 2               # used only when a rate has no explicit off-peak value
          timezoneOffsetMinutes: 480  # UTC+8
          days: [1, 2, 3, 4, 5]       # ISO weekdays; weekends are off-peak
          windows: [[9, 12], [14, 18]]

Two rate styles are accepted everywhere:

  • Catalog style (peak base + optional off-peak): cacheMiss, cacheHit, cacheWrite, output, and cacheMissOffPeak, cacheHitOffPeak, cacheWriteOffPeak, outputOffPeak.
  • Legacy style (off-peak base): inputPerM, cacheReadPerM, cacheWritePerM, outputPerM (with optional *Peak fields).

Automatic price updates

Prices resolve in this order (highest wins):

  1. config.models / config.default
  2. config.pricingUrl (legacy document)
  3. the remote catalog at config.catalogUrl — default: this package's own catalog/prices.json on GitHub, derived from package.json.repository
  4. the bundled catalog/prices.json (offline fallback)

A timer re-reads the remote catalog and pricingUrl every refreshMinutes (default 6 hours) and swaps the live table in place:

  • a failed refresh keeps the last successful data;
  • a source that never loaded does not clear anything;
  • historical amounts are frozen: a sample is priced when it is folded and the amount is stored, so a price change applies only to samples folded after it — a past session's total is never rewritten;
  • the frozen amounts ride the persisted projection cache, so they survive restarts; only a cold replay without a checkpoint prices the log at the then-current table.

This makes the catalog the single place to maintain rates: edit and push catalog/prices.json, and installed copies update themselves — no new plugin release. Forks get their own update channel automatically because the default URL is derived from package.json.repository.

To point at a private mirror or a local file, set catalogUrl (https://…, a path, or file:///…). Set it to "" to disable remote syncing.

Peak / off-peak

  • Tiering uses the request's own event.time, never "now".
  • Peak applies only on the configured weekdays (days, default Monday–Friday); weekends are off-peak all day.
  • The schedule comes from the catalog's peakSchedule (time zone, days, windows, off-peak ratio) and can be overridden field by field in config.peak.
  • peak.enabled: false bills one flat rate; peak.timezoneOffsetMinutes shifts the wall clock for the window check.

The hover tooltip shows the current tier, the multiplier, the route, and the token breakdown.

Pricing model

cost = Σ_routes [ cost_off(route) + cost_peak(route) ]

cost_tier(route) = (uncachedInput × miss
                  + cacheRead     × hit
                  + cacheWrite    × write
                  + output        × out) / 1_000_000

Totals are accumulated per { provider, model } route and per tier, so switching models mid-session keeps each route on its own price. A repeated usage sample for the same (turn, step) replaces the earlier one instead of double-counting.

Compatibility

SurfaceDSH ≤ 0.1.0-rc.6DSH ≥ 0.1.5
Projection contractschema + viewstateSchema + wire: { viewSchema, view }
Client deps@deepseek-ai/dsh-client-runtime@deepseek-ai/dsh-client-ui-renderer, @deepseek-ai/dsh-client-ui-session
Compatibility gate—engines.dsh / peerDependencies must satisfy the running version

The badge uses the additive conversation.session.header.utilities slot; …header.corner is a single slot already occupied by a shipped plugin.

Development

npm install
npm test

test/contract.test.mjs covers the projection contract, weekday peak, catalog parsing, explicit dual rates, currency conversion, normalization/wildcards, unpriced routes, and manual overrides. It runs offline (catalogUrl: "").

Notes

  • Costs are estimates: they depend on the provider-reported usage and on the price table.
  • The badge is per session; it does not aggregate sub-sessions or the whole account.
  • The bundled catalog is a dated snapshot — verify it against the official pricing page and update catalog/prices.json when rates change.
  • The plugin is a Web surface plugin; compositions without sessionProjections (e.g. headless) skip registration.

License

MIT