DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

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

@stuchenxj/dshcost

Cost

DeepSeek Harness Web GUI 的会话成本显示:按照 DeepSeek 官方高峰/非高峰费率为每次模型调用计价,并在编辑器下方显示累计会话成本。

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

npx -y @deepseek-ai/dsh plugin --profile web add @stuchenxj/dshcost@1.0.5
README兼容性版本

兼容性与来源证明

Cost 以 @stuchenxj/dshcost 发布,当前版本为 1.0.5。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

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

版本

1.0.5stable
2026/8/17
1.0.4stable
2026/8/15
1.0.3stable
2026/8/15
查看其余 2 个版本收起版本
1.0.2stable
2026/8/15
1.0.1stable
2026/8/15

相关插件

正在加载相关插件…

最新版
1.0.5
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
23 kB
文件数
6
Surface
web
许可证
MIT
发布源
npm
GitHub
★ 0
周下载
40
最近提交
2026/8/15
查看源码 ↗项目主页 ↗
README Badge

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

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

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

认领这个 Plugin →
报告问题

相关插件

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

Whale Widgetdsh-whale-widgetDSH Web 界面右下角的 DeepSeek 余额小鲸鱼挂件:余额/今日已用/峰谷定价、自定义泡泡点击序列(文本/余额/今日/峰谷/图片/随机语句与并列加权选择)、逐行样式与字体、悬浮快捷编辑、音效与每轮消耗、自定义角色/动图/音效、吸附与翻转自定义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

dshcost

A publishable Cordis plugin for the DeepSeek Harness Web GUI that records and displays the current session's model consumption and estimated cost in real time, right under the composer.

It prices every model call at DeepSeek's official peak/off-peak rates and shows a compact readout like:

💰 本会话费用 ¥0.0123 · 模型 deepseek-v4-flash · 输入 12.3K · 缓存 20.1K · 输出 1.2K · 6 次调用

With the UI set to English the readout reads:

💰 Session cost:¥0.0123 model:deepseek-v4-flash input:12.3K cache:20.1K output:1.2K 6 calls

Hovering the readout shows the per-model breakdown and the full token usage.

Localization

The readout follows the DSH UI language through the client locale service (@deepseek-ai/dsh-client-locale): zh → 中文, en → English, and only those two are shipped — any other locale falls back to Chinese. Switching DSH's language (Settings → General → Language) updates the readout instantly without a reload. If the locale service is absent from the composition, the client falls back to the Chinese dictionary.

How it works

  • Host half (lib/index.js) registers a session projection unit sessionCost with ctx.sessionProjections. It replays the session log's provider-usage records (assistant/chunk usage samples plus the final assistant/message usage per step), tracks the model from request/header / message source, and estimates cost from:
    • token buckets (input + cache-write billed as input, cache-read, output),
    • the model's price table,
    • the call time in Beijing to pick peak vs. off-peak pricing.
  • Client half (lib/client.js) is a web module that registers a read-only cell in the conversation.composer.dock slot and reads the projection reactively via the slot's standard useProjection('sessionCost') prop — no polling, no Client→Host RPC.

Because the data lives in a durable session projection, the readout survives process restarts: after a restart the projection refolds from the session log (or a checkpoint), so history is not lost.

Pricing

Prices in CNY per million tokens (DeepSeek official peak/off-peak pricing, effective 2026-08-17):

Modelinput peak / offcache read peak / offoutput peak / off
deepseek-v4-flash3.0 / 1.50.1 / 0.059.0 / 4.5
deepseek-v4-pro9.0 / 4.50.3 / 0.1527.0 / 13.5

Peak hours = Beijing 09:00–12:00 and 14:00–18:00; the rest is off-peak (half price). Cache writes are billed as input. Model ids with a version suffix (deepseek-v4-flash-0731) resolve to the base model price. Calls from models not in the table are counted as unknownCalls and shown as "价格未知".

These are estimates for display, not billing records.

Install & mount

The package is published on npm as @stuchenxj/dshcost and is also a profile bundle (its manifest declares dsh.bundle.patch).

[!WARNING] Do NOT run npm install directly inside $DSH_HOME/profiles/node_modules — that directory has no package.json/lockfile, so npm treats the whole runtime dependency tree as extraneous and prunes it (this has wiped 500+ packages in practice). Install into a temp dir and copy the package in:

tmp=$(mktemp -d) && cd "$tmp" && npm i @stuchenxj/dshcost
# then copy "$tmp/node_modules/@stuchenxj/dshcost" into $DSH_HOME/profiles/node_modules/

Option A — as a bundle (add to a profile's dsh.profile.bundles):

// $DSH_HOME/profiles/web/package.json
{
  "dsh": {
    "profile": {
      "bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "@stuchenxj/dshcost"]
    }
  }
}

Option B — as a plugin row in the profile patch:

# $DSH_HOME/profiles/web/cordis.patch.yml
- insert:
    - id: dshcost
      name: '@stuchenxj/dshcost'

[!IMPORTANT] The client bundle registers via __ModuleLoader__.load({ id: "dshcost" }). That string must equal the composition row id (the boot-graph entry name) exactly — no @scope. The row name is only the npm package name used to resolve the package; the loader does NOT key off it. A mismatch (e.g. an old client.js registering @stuchenxj/dshcost) fails the whole plugin tree with client-modules: bundle ... loaded without registering "dshcost". Keep the row as id: dshcost + name: '@stuchenxj/dshcost' and never rename the id.

Install the package where the profile can resolve it (its node_modules, or the flat $DSH_HOME/profiles/node_modules fallback), then restart (bundle) or let patch HMR apply it (row) and reload the page. Requires ctx.sessionProjections (present in the standard Web profile via @deepseek-ai/dsh-session-projection).

Development

  • lib/index.js — Host half: the sessionCost projection unit (pure fold, plain ESM, depends only on zod).
  • lib/client.js — Client half: the conversation.composer.dock readout (plain JS, window.__ModuleLoader__ format, requires only react).

Edit lib/index.js / lib/client.js, no build step. Bump stateVersion in the projection unit if you change the fold state shape (stale checkpoints then refold).

License

MIT