v1.0.1
Token usage statistics for the DeepSeek Harness Web UI — v1.0.1.
Added
- Estimated cost card (USD): per-model prices (input / output / cache read / cache write, USD per 1M tokens) configured in the in-panel pricing dialog, persisted to
~/.dsh/storages/token-stats/prices.json. - Automatic price sync from modelradar.cn: fetched on boot with backoff retries, refreshed daily, cached to
prices-auto.json; manual prices always override.
Changed
- USD-correct auto prices — modelradar prices 183 of 294 models natively in CNY; auto prices now always use the dataset's per-field
*PriceUsdPer1Mconversions (native CNY used to be treated as USD, overstating DeepSeek costs ~7x). CNY-sourced rows are taggedauto·CNYin the pricing dialog. - Async batched persistence (was one blocking
appendFileSyncper model call); history loading reads only the tail ofusage.jsonl; cache-only rows survive a restart. - Cache read/write stat cards removed (DeepSeek and most providers report no cache-write metric); the stat grid spans the 6 remaining cards.
- Pricing dialog: cache-write price column, model search box, inline errors when the prices API is unreachable or a refresh fails, and basename matching for provider-prefixed model ids.
- Total-tokens card shows a Chinese-unit approximation (≈万 / ≈亿).
Full changelog: https://github.com/zerro-223/dsh-token-usage/blob/main/CHANGELOG.md