
yflmq001/dsh-cost-tracker
30Last commit Aug 14, 2026
dsh-cost-tracker DSH plugin
dsh-cost-tracker prices every finalized LLM call against a per-model pricing table you configure. It publishes a per-session cost projection consumed by the Web UI and flags calls in a configured peak window.
How to install the dsh-cost-tracker DSH plugin
dsh plugin --profile web add github:yflmq001/dsh-cost-trackerCopying does not run this command. Review the repository and version before installing the dsh-cost-tracker DSH plugin.
dsh-cost-tracker DSH plugin data source
dsh-cost-tracker DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-cost-tracker DSH plugin can do
- Pricing per model with cache-hit/miss input, output, and optional peak-window rates
- Per-session cost projection (total, peak, off-peak, per-model) exposed to Web UI
- Flags calls within a configured peak window and shows peak/off-peak breakdown
- Surfaces models without pricing as 'unconfigured' with placeholder to avoid silent undercounting
- Bills cache writes at the miss rate (not the hit rate) for accurate accounting
Where the dsh-cost-tracker DSH plugin fits
- Track and visualize token costs per session in a DeepSeek Harness Web UI
- Configure different pricing for peak and off-peak hours to match provider billing
- Identify which models are missing pricing entries to add them manually
- Monitor total cost across sessions via the `/cost` command
- Ensure accurate cost accounting by billing cache writes at the correct miss rate
Who the dsh-cost-tracker DSH plugin is for
- DeepSeek Harness users who need detailed cost tracking per session
- Developers who want to configure custom pricing for multiple models and peak hours
dsh-cost-tracker DSH plugin limitations
- Per-session cost is a projection replayed from the durable log; cross-session bill is available only via `/cost` command
- Non-DeepSeek models require manual pricing entry; no automatic price lookup
- Developer preview: `assistant/message.usage` may be absent when the adapter reports no accounting
- Session format has no compatibility promise; may break with future harness updates
dsh-cost-tracker DSH plugin: from the repository README
Quoted from the yflmq001/dsh-cost-tracker README, the upstream source of the dsh-cost-tracker DSH plugin. Copyright remains with the original authors.
> 🇨🇳 [中文说明](README.zh.md) [](https://awesome-dsh-plugin.com) Token cost tracking for DeepSeek Harness, with per-model configurable pricing and peak/off-peak rates.  ## 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
Read the full READMERepository license: MIT
dsh-cost-tracker DSH plugin questions
How do I install dsh-cost-tracker?
Run `dsh plugin --profile web add github:yflmq001/dsh-cost-tracker` in your terminal. The plugin ships a `dsh.bundle` layer, so it is enabled automatically after installation. You need to configure pricing under the plugin's config before it starts tracking costs.
Do I need to manually enter prices for every model?
Yes, you must configure pricing for each model you want to track under the plugin's `config.models` section. There is no automatic price scraping. Models without a pricing entry will be shown as 'unconfigured' so you know to add them.
How does the plugin handle peak and off-peak pricing?
You can define peak hours (e.g., 09:00-12:00, 14:00-18:00 Beijing time) and set separate input/output rates for those periods. Calls during peak time are billed at the peak rates; off-peak calls use the base rates. You can also disable the peak tier entirely by setting `enabled: false`.
Does the plugin track costs across multiple sessions?
Yes, the cross-session bill persists through dsh's storage domain. You can view the global bill with the `/cost` command. However, if your profile has no storage backend, the bill is kept in memory only and will be lost when the session ends.
What if the LLM adapter doesn't report usage data?
The plugin relies on `assistant/message.usage` from the adapter. If that field is absent, the plugin may not be able to calculate costs for that call. The README notes this as a developer preview limitation.