rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:debug-null/dsh-spend-pill
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
DeepSeek Harness(DSH)Web 插件:在输入框下方显示本次会话已花费的人民币金额,点击查看明细。
界面示意:输入框下方的费用 pill(高亮)与点击后弹出的明细面板。
≈ ¥1.05,就在系统自带的「轮次/步数」
「缓存命中 / Token 用量」旁边。request/header 或
llm/retry-started(紧挨着真正发出);同系列后面的步骤不再重写 header 时,用该次响应流的
起始时间戳,没有流再用 step/start。一轮生成跨过 12:00 / 14:00 / 18:00 时,不会按结算时刻
把高峰请求算成空闲。同一 Turn/Step 的后一次结算仍沿用这一次的发出时刻。compaction/summary 若带了 provider 用量,按该次摘要自己的模型另计,不并进
同一 Turn/Step 的替换。目前尚未发布到 npm,直接安装 GitHub Release 里的预构建包:
dsh plugin --profile desktop add \
https://github.com/debug-null/dsh-spend-pill/releases/latest/download/dsh-spend-pill.tgz
Web 界面也可以在 设置 → 插件 → 安装 bundle 里粘贴同一个 URL。安装后刷新 Web 页面即可。
官方价目(人民币 / 百万 tokens,见 DeepSeek API 文档):
| 模型 | 时段 | 缓存命中 | 未命中 | 输出 |
|---|---|---|---|---|
deepseek-flash |
高峰 | ¥0.04 | ¥2 | ¥8 |
deepseek-flash |
空闲 | ¥0.02 | ¥1 | ¥4 |
deepseek-v4-pro |
高峰 | ¥0.30 | ¥9 | ¥27 |
deepseek-v4-pro |
空闲 | ¥0.15 | ¥4.5 | ¥13.5 |
高峰时段为北京时间工作日 9:00–12:00、14:00–18:00,其余时间(含周末与法定节假日)按空闲价
(高峰价的一半)计费。内置的 2026 年节假日来自
国务院办公厅通知;2027 年的安排
公布后,用下面的 holidays 配置补上即可。旧模型 id deepseek-v4-flash、
deepseek-v4-flash-vision-exp 按 deepseek-flash 计价。
模型没有内置价格时(第三方 provider、未来新模型),按 fallbackModel(默认 deepseek-flash)
估算,并在弹层里标注按该回退模型估算(默认 deepseek-flash)。别名会沿着链条解析,
所以指向 deepseek-v4-flash 的旧 id 仍按 Flash 计价,而不是掉进回退模型。
在 profile 的 cordis.patch.yml 里覆盖价格、别名、回退模型或节假日表:
- id: cost-pill
name: dsh-spend-pill
config:
prices:
my-model:
peak: { cacheHit: 0.04, cacheMiss: 2, output: 8 }
offPeak: { cacheHit: 0.02, cacheMiss: 1, output: 4 }
aliases:
my-legacy-model: my-model
fallbackModel: deepseek-flash
# 整表替换内置日历,日期为北京时间(YYYY-MM-DD)
holidays: ['2027-01-01', '2027-02-05', '2027-02-06']
prices 与 aliases 是在内置表上的增量覆盖;holidays 是整表替换。配置变化会改变投影的
stateVersion,已缓存的历史费用会按新配置重新计算。
cache_creation_input_tokens
也恒为 0。node --check index.js && node --check client.js
node --test
lib/cost.js 是纯函数计价折叠(不依赖 DSH),test/cost.test.mjs 覆盖峰谷边界、节假日、
请求时间判段、同 Turn/Step 替换、重试、旧模型别名、第三方模型回退与配置覆盖;GitHub Actions
在每次 push / PR 时运行同样的检查。
A DeepSeek Harness (DSH) Web GUI plugin that shows what the current session has cost so far, in CNY, in the composer dock row — and opens a click-through breakdown dialog.
request/header or llm/retry-started when one was logged, otherwise the first timestamp in
that attempt's stream (later steps reuse the header and do not write another), then step/start,
and only then the settlement time. The 2026 public-holiday calendar is built in. A
compaction/summary that carries provider usage is added on its own model and is not folded into
the surrounding turn/step.dsh plugin --profile desktop add \
https://github.com/debug-null/dsh-spend-pill/releases/latest/download/dsh-spend-pill.tgz
Official list prices in CNY per 1,000,000 tokens
(DeepSeek API docs): deepseek-flash
peak ¥0.04 cache-hit / ¥2 cache-miss / ¥8 output, off-peak half; deepseek-v4-pro peak ¥0.30 / ¥9 /
¥27, off-peak half. Peak is Beijing time, weekdays 09:00–12:00 and 14:00–18:00, excluding the
built-in 2026 public holidays; everything else bills off-peak.
Models without a built-in price are estimated at the fallbackModel price and the dialog names
that model. Alias chains are resolved, so an alias of deepseek-v4-flash still bills as Flash.
Cache-write tokens are ¥0 (DeepSeek publishes no write rate). Weekend makeup workdays stay
off-peak: the official window is Monday–Friday, excluding public holidays, not the statutory
workday calendar.
Prices, aliases, the fallback model and the holiday list can be overridden through the plugin
config in cordis.patch.yml.
node --check index.js && node --check client.js
node --test
MIT — see LICENSE.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。