dsh-usage-ledger: DeepSeek Harness Token Usage and Cost Statistics Plugin
dsh-usage-ledger is a DeepSeek Harness (DSH) plugin maintained by beijingwahw, designed to provide token usage statistics, cost calculation, and budget control features. By monitoring session events, the plugin aggregates and persists model call inputs, outputs, and cache consumption across three dimensions: session, Beijing time, and lifecycle. Its core features include dynamically fetching and hot-reloading official pricing, supporting DeepSeek peak-valley time-of-use pricing, and covering price catalogs of multiple vendors such as DeepSeek, Zhipu, and Kimi, while allowing users to perform highest-priority price overrides via customPrices. In terms of cost control, the plugin supports daily, total, and per-session budget limits, issues alerts when thresholds are reached, and intercepts model calls when exceeding the budget through hooks. Additionally, it is built-in...
Read More