AI Agent Hub
Back to plugins
🖥️

dsh-cost-tracker

Client Updated 2026.08.22

Run the following command in DeepSeek Harness:

dsh plugin install az790871109/dsh-cost-tracker

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

Install this plugin in DeepSeek Harness by running dsh plugin install az790871109/dsh-cost-tracker, with the source available at https://github.com/az790871109/dsh-cost-tracker; restart DSH after installation to see the cost panel in the bottom-right corner.

About this plugin

After dozens of conversation rounds and model calls in a day, the least satisfying part is usually the API bill that arrives at month-end. You cannot remember which chats consumed the most tokens, how well cache hits actually performed, or whether the budget is quietly bleeding. dsh-cost-tracker closes that gap: it hooks into DSH's llm/stream event, and the moment each model call lands it tallies input (cache-hit vs. cache-miss) and output tokens separately, pricing them against the official DeepSeek V4 rate card. A draggable floating panel in the bottom-right corner keeps balance, cycle spend, and per-conversation line items one glance away.

The pricing model mirrors real billing as closely as a local estimate can. Peak and off-peak tiers switch automatically based on Beijing time (or you can lock a tier manually). All V4 model prices are built in with sensible fallbacks for unknown names. Internally everything accrues in USD and is converted to CNY at an adjustable exchange rate, so the panel you see is entirely in yuan. Top up a budget, and the panel tracks balance, consumed, and remaining in real time, flashing red when the limit is hit. You can also register the deepseek_cost tool so the agent itself answers questions like How much have I spent? without you leaving the chat window.

State lives in a local JSON file; restart DSH and the counters simply continue where they left off. No database, no backend, no manual activation. The plugin loads with the profile automatically and follows the light/dark theme. It is built for developers and small teams who call the DeepSeek API daily and want an always-on dashboard that answers one question — how much have I spent, and how much is left — the instant you hit send.

Use Cases

  • Track real-time token usage and cost during high-frequency DeepSeek API calls
  • Monitor balance and remaining quota after top-up to avoid overspending
  • Aggregate spend by conversation and project to identify high-cost scenarios

Best For

  • Independent developers making high-frequency DeepSeek API calls daily
  • Small teams that need to keep API spend within budget
  • DSH workflow engineers who want a zero-config cost dashboard