精选
为什么选中它
待人工精选——以下事实来自源码仓库。
它能做什么
Token cost tracking for DeepSeek Harness
适合谁
想用 DSH 获得这项能力的用户;装前建议先看源码和文档。
风险提示
- 未发现明显风险信号;安装前仍建议查看源码。
Token cost tracking for DeepSeek Harness
待人工精选——以下事实来自源码仓库。
Token cost tracking for DeepSeek Harness
想用 DSH 获得这项能力的用户;装前建议先看源码和文档。
dsh plugin --profile web add github:yflmq001/dsh-cost-tracker 作者没有声明支持的平台。
## What it does - Prices every finalized LLM call (assistant/message usage) against a per-model pricing table you configure — cache-hit / cache-miss input, output, and optional peak-window rates. - Publishes a per-session cost projection (total / peak / off-peak / per-model), consumed by the Web UI to show a live session cost readout. - Flags calls that land in a configured peak window. - Models without a pricing entry are surfaced as "unconfigured" with a placeholder, so you know to add them. ## Installation Install into a dsh profile straight from GitHub — the plugin ships a dsh.bundle layer, so dsh plugin add enables it automatically: sh dsh plugin --profile web add github:yflmq001/dsh-cost-tracker Pricing starts empty (models: {}); fill in your models under the plugin's config (see below). To override defaults, add a cost-tracker row to the profile's own cordis.patch.yml — later layers win by row id. The cross-session bill persists through dsh's storage domain; a profile without a storage backend keeps the bill in memory only. ## Configuration Pricing lives under the plugin's config (Schemastery-validated). All prices are currency units per million tokens; you fill them in manually (no scraping). yaml - name: 'dsh-cost-tracker' config: models: deepseek-v4-flash: inputMiss: 1.0 # cache-miss input inputHit: 0.02 # cache-hit input (omit if no cache tier) output: 2.0 peak: # peak tier: hours + toggle + prices hours: ["09:00-12:00", "14:00-18:00"] # Beijing time enabled: true # false = peak off (base rates always); omit = on inputMiss: 3.0 inputHit: 0.10 output: 9.0 gpt-4o: # any model the harness can reach inputMiss: 2.5 output: 10.0 ## Session projection The plugin registers the cost projection: ts { totalCost, peakCost, offpeakCost, callCount, unconfiguredCalls, unconfiguredModels, byModel: { [model]: { inputHit, inputMiss, output, total } }, } Cache writes are priced at the miss rate (providers bill the write at the miss tier; the written tokens become cache hits on a later call). ## Billing correctness Two choices keep the numbers honest: - Cache writes are billed at the miss rate, not the hit rate. Providers charge cache writes at the cache-miss input tier (e.g. DeepSeek $0.14/M vs $0.0028/M hit) — pricing a write as a hit undercounts by ~50x whenever a session writes fresh context. Some cost plugins fold cache writes into the hit bucket; this plugin does not. - Unknown models are never silently priced. A model with no pricing entry is surfaced as "unconfigured" with a placeholder in the projection and UI, so a guessed default can't hide in your bill. You add the price, or you see the gap. ## Known Limitations and Deferred Work - Per-session cost is a projection over the durable log (replayed); the cross-session global bill and /cost command are available. - Non-DeepSeek models need their pricing filled in manually; there is no automatic price lookup. - Developer preview: assistant/message.usage is absent when the adapter reports no accounting, and the session format has no compatibility promise.不看 Star,人工一条条挑的。
把 DSH 的 settings.yaml 做成可视化看板:所有已注册的 settings namespace——包括官方界面从未覆盖的第三方插件配置——都渲染成可编辑表单。项目还早,但方向很对:告别手改 YAML。
给 DSH 的 DIY 轨迹可视化:把 agent 的计划与执行画成图,不用翻原始日志也能看清它在干嘛。项目还早,但补上了「一眼看懂 agent 在做什么」这个真实缺口。
从 Claude Code / Codex 把活派给 DSH:在宿主内拉起带分级预设的 DSH agent 会话,看原生子代理进度,还能借它的多模态桥给纯文本的 DSH 补上视觉和生图。编排型插件,把 DSH 变成其他编码 agent 的后端。