yflmq001/dsh-cost-tracker 预览 preview

yflmq001/dsh-cost-tracker

Plugin插件 Native原生 ⭐ 2 MIT Usage & Cost用量与计费

DeepSeek Harness 的令牌成本追踪

Project Overview项目介绍

dsh-cost-tracker is a DSH plugin for token cost tracking. It prices every LLM call against a configurable per-model table covering cache-hit/miss input, output, and optional peak-window rates, and publishes a session cost projection (total, peak, off-peak, per-model) for the Web UI. Use it to monitor LLM spend per session. Caveat: pricing must be entered manually, missing models surface as "unconfigured", and overrides must target the row by its id, not its name.

dsh-cost-tracker 是 DSH 的 Token 成本追踪插件。它按可配置的每模型定价表核算每次 LLM 调用的费用,支持缓存命中/未命中输入、输出及峰时加价,并在会话中发布成本投影供 Web UI 实时展示。适用于需要监控 LLM 调用开销的场景。注意:定价需手动填写,缺失条目会显示为“未配置”,且必须通过 id 而非 name 覆盖配置层。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:yflmq001/dsh-cost-tracker

把 yflmq001/dsh-cost-tracker 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-cost-tracker

🇨🇳 中文说明

awesome · DSH plugin

Token cost tracking for DeepSeek Harness, with per-model configurable pricing and peak/off-peak rates.

dsh-cost-tracker: per-session cost bar and the /cost command

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:

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.

⚠️ When overriding, address the row by its id (cost-tracker), not by name. Cordis non-insert patches locate the target line by id; a name-keyed override row is silently dropped, leaving prices at models: {}.

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).

- id: 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

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-custom-fonts 下一个 Next dsh-github-mcp →