AI Agent Hub
Back to plugins
🤖

dsh-api-usage-monitor

Model Inference Updated 2026.08.25

Run the following command in DeepSeek Harness:

dsh plugin install DrFaithinT/dsh-api-usage-monitor

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

Run dsh plugin install DrFaithinT/dsh-api-usage-monitor to install from https://github.com/DrFaithinT/dsh-api-usage-monitor, then add the package name to the dsh.profile.bundles array in your profile and restart DSH.

About this plugin

When you wire multiple LLM routes into DSH, figuring out exactly which model and which session consumed the most tokens usually means digging through logs after the fact. dsh-api-usage-monitor turns that into a live panel on the settings page: it embeds as a permanent bundle, observes every llm/stream event above the adapter layer, and is provider-agnostic, so DeepSeek, Pi AI, or any registered route is identified and grouped by provider and model.

The panel is laid out in four card sections: real-time cumulative usage grouped by model with input, output, cache-read, cache-write, reasoning token counts and call totals, auto-refreshing every two seconds; a per-session view aggregating calls, token spend, and the API used (by sessionId); token fields that are mutually exclusive and aligned with the TokenUsage spec; and a one-click history scanner that reads persisted session logs to surface pre-plugin usage, conversation titles, and models previously used. Colors follow DSW theme variables and adapt to light or dark mode automatically.

All live data lives only in plugin memory, never written to disk, never uploaded. The history scan is an explicit, user-initiated action with no background collection. Failed retry attempts are flagged and excluded from token totals, keeping the numbers honest.

Ideal for users running conversations across multiple routes who want at-a-glance cost visibility, model-switching insights, and a privacy-first design (in-memory only, no external services). Install the bundle, restart DSH, and open the API Usage page under Settings to get started.

Use Cases

  • Running multiple LLM routes and needing per-model token spend at a glance
  • Tracking input, output, cache, and reasoning tokens live during a session
  • Keeping a persistent usage dashboard across DSH restarts and auditing pre-install history

Best For

  • Developers wiring several provider routes into DSH simultaneously
  • Heavy session users who track token cost and model-switching impact
  • Privacy-sensitive users who require in-memory-only data handling