DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

Plugin Session Cost Pill — DeepSeek Harness 插件(DSH Plugin)
← Plugins

dsh-plugin-session-cost-pill

Plugin Session Cost Pill

在 DeepSeek Harness 编写器停靠栏中实时显示会话支出,并根据每个助手步骤对应时间戳的 DeepSeek 高峰期或非高峰期费率计价。

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

npx -y @deepseek-ai/dsh plugin --profile web add dsh-plugin-session-cost-pill@1.1.2
README兼容性版本

兼容性与来源证明

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

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

版本

1.1.2stable
2026/10/13

相关插件

正在加载相关插件…

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

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

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

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

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

相关插件

继续浏览 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 订阅额度查询与显示(13 家,含 OpenDesign 工作区查询、含小米 MiMo Token Plan 控制台 Cookie 查询、SCNet Token Plan 本地 Credits 计量与火山方舟 Volcano Ark Coding Plan AK/SK 签名查询)、自定义 Provider Codex Subscriptiondsh-codex-subscription通过 OAuth 在 DeepSeek Harness 中使用 ChatGPT 和 Codex 订阅,支持配额管理、安全重置、网页搜索、图像和快速模式

README

💸 Session Cost Pill — DeepSeek Harness

Live session spend, right in the composer dock.

Session cost pill in the DeepSeek Harness composer dock

DeepSeek tells you how many tokens you burned. It does not tell you what that cost. This plugin does — live, per session, without a single line of patched harness source.


What you get

The composer dock already tracks turns, speed, tokens, and context. The cost pill joins that row:

PillShows
⏱ activityturns · steps · decode speed
💾 usagetotal tokens · cache-hit rate
💸 costestimated spend for this session
🪫 contextcontext-window pressure

The glyph climbs with the session total, so the row reads at a glance before the number does:

💸💵💰🔥🚨
under $1under $5under $20under $100$100 and up

Click it and the breakdown opens: uncached input, cache reads, and output, each priced separately, plus how much of the total was charged at peak rates and how many steps that covered. It closes on Escape, on a click outside, or on a second click — the browser's own popover behaviour, so the plugin ships no dialog state, listeners, or positioning code of its own.

The cost pill The cost breakdown panel open above the pill

Full window with the pill running


Install

dsh plugin --profile web     add ~/code/github.com/vegerot/deepseek-harness-session-cost-pill
dsh plugin --profile desktop add ~/code/github.com/vegerot/deepseek-harness-session-cost-pill

That is the whole install. No build, no bundler, no dependencies. Restart the profile and refresh.


Why the number is right

Most cost trackers multiply a session's tokens by one flat rate. That is wrong for DeepSeek twice over.

1. DeepSeek has peak pricing

Prices double during peak hours, so a single rate per model cannot price a session.

ModelTierCache hit inputCache miss inputOutput
deepseek-flashoff-peak0.0030.150.60
deepseek-flashpeak0.0060.301.20
deepseek-v4-prooff-peak0.0220.661.98
deepseek-v4-propeak0.0441.323.96

USD per 1M tokens, transcribed from Models & Pricing.

Peak is 01:00–04:00 and 06:00–10:00 UTC, Monday–Friday. Everything else — all weekend — is off-peak.

So this plugin prices every assistant step at the rate in effect for that step's own timestamp. A session that crosses a peak boundary gets a correctly blended total instead of a guess.

2. Cache hits dominate, and they are ~50× cheaper

A cache hit costs a fraction of a cache miss. A tracker that folds all prompt tokens into one bucket will miss the mark badly on a long agent session — exactly the kind that reads 96% cache-hit.

Verified against real billing

DeepSeek publishes no pricing API, but its Platform console reports authoritative cost. Checking this plugin's table against one real account's October deepseek-flash usage:

tokens:  hit 140.56512M   miss 2.828971M   out 0.758458M
published all-off-peak total   = $1.301116
platform's own billed total    = $0.453778 + ¥6.0056894
                               = $1.301116 at FX 7.0877 CNY/USD

A 0.11% match. The table is right, and that month's usage was effectively all off-peak — assuming peak would have doubled the estimate.


How it works

It is an ordinary Cordis client plugin. Nothing in the harness is patched, forked, or monkey-patched.

ctx.slots.inject('conversation.composer.dock', () => ctx.slots.register({
  name: 'conversation.composer.dock',
  id: 'cost-pill',
  order: 2,            // joins the activity (0) and usage (1) pills
}, CostPill));

The pill reads the chat snapshot through the session standard kit and folds it:

  • useChat → every settled assistant step, each carrying its own time and provider usage
  • useProjection('modelSelection') → the session's model
total = Σ over steps  costOfUsage(step.usage, model, isPeak(step.time))

isPeak classifies one request from its UTC weekday and hour, so pricing is per-request rather than per-session.


Known limits

Honest ones, not footnotes:

  • Chinese public holidays are off-peak in full, and this is not modelled. That needs a PRC holiday calendar, so weekday windows falling inside a holiday week are priced as peak — slightly overstating those days.
  • The model is priced at session level. Chat assistant nodes carry time and usage but not the model, so a session that switched models mid-way prices every step at the most recently used model's rates.
  • Account-level spend is not shown. DeepSeek's Platform console does expose real billed cost through private endpoints that authenticate with x-dsh-auth-token (not Authorization: Bearer), and DSH already holds that grant via getPlatformSession(). It is deferred here because the browser half of a Remote needs generated zod codecs.

Development

pnpm test        # tsc --noEmit && node --test test.ts
pnpm typecheck   # the type check alone

Types without a build step. client.js ships as plain JavaScript on purpose: the harness injects plugin bundles into the page as a classic script (<script src>, no type="module"), so the file reaches the JS engine verbatim. There is no build step and no runtime type stripping on the browser side.

Types therefore live in JSDoc annotations, verified by tsc --checkJs. Real, CI-visible checking with no toolchain. test.ts is different — Node strips its types natively.

The suite pins the behaviour that matters:

  • peak windows, both edges, the mid-day gap, and weekends
  • published rates for both models, off-peak and peak
  • one off-peak plus one peak step in a single session, asserting the summed per-step rates — the case a session-wide total provably cannot produce
  • an unpriced model renders no pill rather than a wrong number

License

MIT — see LICENSE.