DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

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

@guojinpeng/dsh-cost-meter

Cost Meter

DSH 会话和每轮费用估算插件,支持 models.dev、OpenRouter 和 DeepInfra 价格同步与自定义模型单价。配置位于 ~/.dsh/guojinpeng/dsh-cost-meter/config.json。

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

npx -y @deepseek-ai/dsh plugin --profile web add github:guojinpeng/dsh-cost-meter#f205bcbce74de22affb3182b02f91994c674813c
README兼容性版本
Model price settings on desktop

兼容性与来源证明

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

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

版本

0.3.2stable
2026/10/16
0.3.1stable
2026/10/16
0.3.0stable
2026/10/15
查看其余 2 个版本收起版本
0.2.0stable
2026/10/14
0.1.5stable
2026/10/13

相关插件

正在加载相关插件…

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

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

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

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

认领这个 Plugin →
报告问题

相关插件

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

Whale Widgetdsh-whale-widgetDSH Web 界面右下角的 DeepSeek 余额小鲸鱼挂件:余额/今日已用/峰谷定价、自定义泡泡点击序列(文本/余额/今日/峰谷/图片/随机语句与并列加权选择)、逐行样式与字体、悬浮快捷编辑、音效与每轮消耗、自定义角色/动图/音效、吸附与翻转自定义Usage@linxin666/dsh-usage用于 dsh Web GUI 的使用统计插件:检测各提供商的余额和编程套餐配额,并实时记录令牌使用情况;侧边栏 Settings 行上方显示紧凑的价格概览卡片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

README

@guojinpeng/dsh-cost-meter

English | 简体中文

This plugin shows estimated session and turn costs in DSH. Use DSH 0.2.0-rc.2 or later. Tests use DSH 0.2.0-rc.2.

Install

  1. Install the npm package:
dsh plugin --profile web add -w @guojinpeng/dsh-cost-meter
  1. Restart DSH.
  2. Open Plugins.
  3. Select @guojinpeng/dsh-cost-meter to change prices.

Replace web with your profile name. If you used the old unscoped package, disable it before you install this package.

Install published versions from npm. npm provides the built package. GitHub contains the source code and release notes.

Features

  • Shows session and completed-turn cost estimates.
  • Shows a short initialization message when model prices are not ready.
  • Groups the details by peak price, off-peak price and fixed price. Hides price rows that cost zero and shows no peak or off-peak token counts.
  • The session panel groups the four prices by peak, off-peak and fixed price, then lists each model's group sums. The turn panel lists the four prices of every group for each model.
  • Each price has an info button: hover it to see the calculation formula for that price. The popover closes when the pointer leaves.
  • Groups used models by provider. The list comes from DSH session history and models declared in the configuration.
  • Supports separate prices for each full provider/model name.
  • Selects models.dev, openrouter.ai or api.deepinfra.com as the price source.
  • Initializes new model prices from the selected source's local cache. Uses zero if there is no matching price.
  • Downloads model prices only when you select Sync prices. The source controls, the Sync prices button and the sync report stay above the model rates table.
  • Syncs only configured models. The sync result is staged in the draft and written to the configuration when you select Save.
  • Matches source prices by model ID. models.dev prefers manufacturer prices; OpenRouter and DeepInfra supply their own platform prices. Keeps existing prices if matching is unclear.
  • Keeps existing prices when the source cannot supply a supported rate.
  • Supports USD or CNY for each model. Converts all four rates when you change its currency.
  • Shows separate USD and CNY totals when a session or turn uses both currencies.
  • Keeps edits in a page draft. The Save button at the end of the page writes the configuration. Leaving the page discards unsaved edits. A failed save shows the error and keeps the draft.
  • Shows two flat sections, Model rates and General, with all content visible. General contains the exchange rate and the session/turn visibility controls.
  • Expands More rates on each model row to show its cache-write price and the automatic off-peak switch. The switch reveals that model's peak rule selector, and the info icon shows the windows of the selected rule.
  • Adds a model by entering provider/model next to the Model rates title and selecting Add model. Declared models are saved with the configuration; models that history has not discovered can be removed.
  • Marks invalid rates and exchange rates with a red border and a message, and disables Save and Sync prices.
  • Reuses the DSH host controls (settings form, value field, switch, button and tag), so sizes, borders and colors match the host settings pages.
  • Applies half the peak rate in each off-peak window. Each model selects one peak rule:
  • DeepSeek peak rule (default): peak on Beijing weekday 09:00–12:00 and 14:00–18:00; off-peak on weekends, Chinese public holidays and all other windows.
  • Alibaba Cloud peak rule: off-peak 22:00–08:00 Beijing time; peak at all other times.
  • Zhipu GLM peak rule: peak on Beijing Monday to Friday 14:00–18:00; off-peak at all other times, including the whole weekend.
  • Uses holiday-cn annual calendars, cached under data/holidays/. Fetches a missing year in the background.
  • Stores configuration at ~/.dsh/guojinpeng/dsh-cost-meter/config.json. Uses DSH_HOME when set.
  • Copies the old ~/.dsh/dsh-cost-meter/config.json on first start if the new file does not exist. Keeps the old file.
  • Uses isolated plugin, client, API, projection, style and configuration identifiers.

These screenshots use example model prices. They do not show a billing statement.

Existing model prices without a currency remain USD. Existing entries without an off-peak setting keep fixed rates until you switch it on. The switch is off by default for every new entry. Confirmed original-vendor DeepSeek off-peak rates from models.dev are multiplied by two to store peak rates. Every model applies its own selected rule; the default is the DeepSeek peak rule.

The configuration file stays at the same path. No configuration migration is required. Historical usage is replayed to restore dates and seven Beijing clock windows under projection state version 4. Requests that cross a price boundary are estimated from the recorded usage settlement time. Only the DeepSeek peak rule reads the holiday calendar; the Alibaba Cloud and GLM rules never need it. If a holiday calendar is unavailable, uncertain weekday windows use the peak rate until the calendar is loaded.

priceSource selects the cache for new models. Existing configuration without this field uses models.dev. Each model's source records its last price import; edits to rates on the configuration page set it to manual. Changing the selected source does not change existing rates or fetch prices. Cost calculation uses only the saved rates.

Caches are separate: data/models.dev.json, data/openrouter.ai.json and data/api.deepinfra.com.json. OpenRouter and DeepInfra prices are not multiplied by two. DeepSeek entries with automatic off-peak pricing keep their rates when the source cannot confirm an official peak rate. Sync reports show skipped models and cache-write rates that were kept because the cache duration is unclear. Conditional prices and non-token charges are outside this fixed-rate estimate.

Session cost details:

Session cost card

Turn cost details:

Turn cost card

Model price settings:

Model price settings on desktop

Develop From Source

Install Node.js, pnpm 9 and Git. Install DSH globally before you run the tests:

npm install -g @deepseek-ai/dsh@0.2.0-rc.2
git clone https://github.com/guojinpeng/dsh-cost-meter.git
cd dsh-cost-meter
pnpm install --frozen-lockfile

Edit files in src/. Run tests and create a package:

npm test
npm run build
npm pack

npm pack also runs the build. It creates guojinpeng-dsh-cost-meter-<version>.tgz. Install the generated file in your DSH profile. For version 0.3.2:

dsh plugin --profile web add -w ./guojinpeng-dsh-cost-meter-0.3.2.tgz

Restart DSH and check the plugin. Repeat the build, package and install steps after changes. Tests use the global DSH installation. Set DSH_RUNTIME_ROOT to the DSH package directory if its location is different. Commit source files and pnpm-lock.yaml. Do not commit generated files or local configuration. See the module guide for source boundaries and verification commands.

Publish To npm

Use an npm account with publish access to @guojinpeng/dsh-cost-meter. Run these commands in the project directory:

npm login --registry=https://registry.npmjs.org/
npm whoami --registry=https://registry.npmjs.org/
npm view @guojinpeng/dsh-cost-meter version --registry=https://registry.npmjs.org/

An unpublished package can return E404 from npm view. For an update, choose a version that is newer than the published version. Update package.json. You can use this command to increase the patch version without creating a Git tag:

npm version patch --no-git-tag-version
pnpm install --lockfile-only
npm test
npm run pack:release

Check the package file list. pack:release runs npm pack and creates the versioned npm tarball. Commit and push the version change. Then publish that tarball. For example, replace <version> with the new version number:

npm publish ./guojinpeng-dsh-cost-meter-<version>.tgz --access public --registry=https://registry.npmjs.org/
npm view @guojinpeng/dsh-cost-meter version --registry=https://registry.npmjs.org/

Complete npm's authentication steps when prompted. Each package version can be published only once. After npm publication succeeds, create the matching Git tag and GitHub Release:

git tag v<version>
git push origin v<version>
gh release create v<version> --verify-tag --title "<version>" --generate-notes --latest

Replace <version> before you run these commands. GitHub Releases contain release notes; uploading a tarball is optional. npm hosts the installation package. The plugin catalog links the npm package through its repository field.

Users can then install the package:

dsh plugin --profile web add -w @guojinpeng/dsh-cost-meter