model-usage-plugin
A DeepSeek Harness (DSH) web plugin that tracks token usage per model, estimates costs, and displays API account balance. It adds a Model Usage settings tab with per-model token details, configurable pricing, peak/off-peak pricing, currency conversion, and balance display. Stats, pricing, and exchange-rate cache are stored in $DSH_HOME/musage-stats.json; the balance API key is kept in memory only. Licensed under MIT.
Installation
dsh plugin --profile web add github:AKS1st/model-usage-pluginOverview
A DeepSeek Harness (DSH) web plugin that tracks token usage per model, estimates costs, and displays API account balance. It adds a Model Usage settings tab with per-model token details, configurable pricing, peak/off-peak pricing, currency conversion, and balance display. Stats, pricing, and exchange-rate cache are stored in $DSH_HOME/musage-stats.json; the balance API key is kept in memory only. Licensed under MIT.
- Tracks tokens per model, distinguishing cache hit/miss/write, plus call and failure counts, and estimates costs.
- Includes default pricing for mainstream models (CNY for domestic, USD for overseas), auto-applied on first use and editable.
- Supports peak/off-peak pricing per model with configurable peak time ranges (HH:MM, crossing midnight) and peak price.
- Displays costs in a target currency (default CNY); caches exchange rate with timestamp and refreshes when needed.
- Queries DeepSeek account balance and shows total tokens and balance prominently at the top of the page.
- Adds a Model Usage tab in the settings panel; can hide models that have not been called.
- Installs via dsh plugin --profile web add github:AKS1st/model-usage-plugin or a local path; uninstalls with dsh plugin --profile web remove model-usage-plugin.
- Stores stats, pricing, and exchange-rate cache (with timestamps) in $DSH_HOME/musage-stats.json; balance API key is memory-only.