dshbase

Plugin directory / Developer / dsh-cost-display

dsh-cost-display

Verified · install-tested on dsh misakimiku2

✓ Actively maintained Builds on 2 official DSH packages

View on GitHub ↗ ← Back to plugin directory

1Stars
0Forks
0Open issues
JavaScriptLanguage
2026-08-15Last push
Cross-platformPlatform

What it does

dsh-cost-display — DSH plugin (llm)

✅
Our take
Works — verified, early-stage project

dsh-cost-display — DSH plugin (llm) It installs cleanly and boots without issues in our testing. It's early-stage but functional.

“Verified” means our automated CI actually ran dsh plugin add in a clean profile and it booted — nothing more. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.

README

dsh-cost-display

DeepSeek Harness 成本显示插件:在会话状态栏实时显示累计费用,按模型与峰谷时段精确计费。

功能特性

  • 状态栏费用显示:在 token 统计后追加当前会话累计费用(费用 ¥X.XX),悬停可查看费用明细
  • 费用明细弹窗:按模型拆分 token 用量与费用,单独展示思维链(reasoning)token 数
  • 峰谷定价:默认高峰时段为北京时间 09:00-12:00 与 14:00-18:00,低谷时段自动按低谷价计费
  • 可配置价格表:每个模型支持多档价格,按生效日期自动切换,用于应对官方调价
  • 模型列表自动同步:在「模型设置」页新增或修改模型后,自动补进价格表,无需手动操作
  • 未知模型兜底价:未在价格表中列出的模型按兜底价计费,费用显示带 ? 前缀
  • 每模型峰谷开关:可单独关闭某模型的峰谷定价,使其始终按正常价计费

安装

通过 dsh 命令安装

dsh plugin --profile web add <插件目录路径>

手动配置 profile

在 ~/.dsh/profiles/web/package.json 的 dependencies 中加入:

"dsh-cost-display": "link:<插件目录绝对路径>"

同时在 dsh.profile.bundles 数组中加入 "dsh-cost-display",然后重启 Harness。

使用

安装并重启后,在设置页的「费用设置」中可查看和修改:

  • 价格表:每个模型的各价格档,包含命中、未命中、输出三档单价(单位:元/百万 tokens)
  • 生效日期:每档价格的生效日期(北京时间),用于在官方调价时新增价格档
  • 峰谷窗口:高峰时段配置,默认 09:00-12:00 与 14:00-18:00
  • 兜底价:未在价格表中列出的模型按此价计费
  • 峰谷开关:每模型是否启用峰谷定价

修改保存后,新请求立即按新价格计费,历史会话费用不受影响。

计费模型

费用按以下公式估算:

费用 = (未命中输入 tokens + 缓存写入 tokens) × 未命中单价
     + 缓存命中 tokens × 命中单价
     + 输出 tokens × 输出单价

单价按请求时刻选择:先按模型生效日期取最近一档价格,再按北京时间是否处于高峰时段选择高峰价或低谷价。

默认价格表

模型 时段 命中 未命中 输出
deepseek-v4-flash 8/17 前 0.02 1 2
deepseek-v4-flash 8/17 后 · 高峰 0.1 3 9
deepseek-v4-flash 8/17 后 · 低谷 0.05 1.5 4.5
deepseek-v4-pro 8/17 前 0.025 3 6
deepseek-v4-pro 8/17 后 · 高峰 0.3 9 27
deepseek-v4-pro 8/17 后 · 低谷 0.15 4.5 13.5

单位:元/百万 tokens。8/17 前无峰谷区分,高峰价与低谷价相同。

模型自动同步

插件启动后及任何设置变更时,会自动从各 provider 命名空间收集模型 ID,把价格表中缺失的模型以兜底价补入。已配置定价的模型不会被覆盖,也不会删除任何模型。

开发

npm install     # 安装依赖
npm test        # 运行单元测试
npm run build   # 构建到 lib/

免责声明

费用为按 token 用量与单价估算,可能与 DeepSeek 官网实际扣费存在出入(未记录的请求、tokenizer 差异等)。

Install

🧩 Let your agent install it (recommended)

Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:

dsh plugin add dshbase-catalog

Then say "install dsh-cost-display for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.

This plugin is GitHub source (not published to npm) — install it straight from the repo:

Web profile:

dsh plugin --profile web add github:misakimiku2/dsh-cost-display

Headless (CLI) profile:

dsh plugin --profile headless add github:misakimiku2/dsh-cost-display

Test report

Verified: L1 install + L2 load + L3 runtime from GitHub source on dsh 0.1.0-rc.6.

When to use it

Extend the agent's coding surface — give it a new tool, workflow, or integration so it handles a dev task it couldn't before.

Who it's for

Developers who want dsh to behave like a teammate on real codebases — editing, running, and verifying changes rather than just answering.

For developers — extending it

The tool/command surface is the seam: expose more of the SDK, add smarter context wiring, or tighten the loop between code changes and verification.

Security: not yet scanned — our daily static scan will cover it shortly.

Share this badge

More in Developer

Browse all 7797 plugins →