AI Agent Hub
Back to plugins
🖥️

dsh-token-usage-observer

Client Updated 2026.08.25

Run the following command in DeepSeek Harness:

dsh plugin install RyzenWang/dsh-token-usage-observer

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install RyzenWang/dsh-token-usage-observer in your terminal to install this plugin; the source repository is at https://github.com/RyzenWang/dsh-token-usage-observer .

About this plugin

Running DeepSeek Harness, Codex, and OpenCode side by side means token usage is scattered across jsonl files and a SQLite database in separate directories. Knowing how much you burned this week, which requests cost the most, or whether your cache hit rate is improving used to mean hand-parsing logs and writing ad-hoc queries.

dsh-token-usage-observer unifies input (both cached and uncached), cache-write, and output token counts from all three sources, computes cache hit rates, and estimates costs with configurable per-million-token prices. It exposes a usage_stats agent tool that supports filtering by source, date range, category, and grouping dimension. In the WebUI, a Token Statistics sidebar dashboard provides stacked bar charts and a per-session detail list, with prices adjustable on the fly. The plugin only reads local logs and never mutates data.

Ideal for developers and teams that mix multiple LLM clients daily and need to track API spend, compare model or preset costs, and monitor cache efficiency. No local build step is required; install and restart the WebUI to start using it.

Use Cases

  • Using multiple LLM clients at once and needing a unified view of token spend and cost
  • Reviewing weekly or monthly API cost trends and cache-hit-rate changes
  • Quantifying actual token costs across models and agent presets to guide selection

Best For

  • Individual developers running Harness, Codex, and OpenCode in parallel
  • Small teams that need to keep LLM API spend within budget
  • Tech leads focused on cache efficiency and model cost-effectiveness