AI Agent Hub
Back to plugins
🖥️

dsh-turn-cost

Client Updated 2026.08.25

Run the following command in DeepSeek Harness:

dsh plugin install WFMinerva/dsh-turn-cost

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

Run dsh plugin install WFMinerva/dsh-turn-cost to install this plugin in DeepSeek Harness, source repository: https://github.com/WFMinerva/dsh-turn-cost

About this plugin

When you are juggling multiple model routes inside DeepSeek Harness (dsh)—pay-as-you-go DeepSeek, Kimi subscription, Alibaba Token Plan—the most immediate question is usually: how much did this turn actually cost, and how much quota is left? Each route bills differently, mixing CNY-per-token, weekly credit counts, and a 7-day quota window. dsh-turn-cost turns all of that into a single grey line beneath every AI reply and a session-level total bar beside the composer, visible even when you scroll back into old conversations.

Three layers of capability make it useful. First, real-usage bucketed pricing: it reads the four token buckets (uncached input, cache read, cache write, output) reported by the provider and applies built-in DeepSeek official peak/off-peak CNY rates (Beijing time) or a user-supplied rate table, computing amounts to the cent; subscription models are registered at zero price and simply display token counts. Second, live subscription quota readings: the Kimi route pulls the 7-day weekly remaining count and booster-wallet balance from the local loopback OAuth service (auto-starting it if needed), while the Alibaba route reads the Credits window share via the official bl CLI—all data stays on the local machine. Third, session-level accumulation: a user message and every intermediate tool step collapse into one turn, deduplicated, and the total covers the current session plus all historical ones.

Best suited for individual developers who run a mix of DeepSeek official, Kimi, Alibaba, or self-hosted models and want at-a-glance per-turn cost and remaining quota right in the local UI. It is also handy as a lightweight internal cost reference, since every read and write stays local and no API keys or third-party endpoints are involved.

Use Cases

  • See CNY cost and token usage per AI reply at a glance
  • Check Kimi weekly remaining calls and booster-wallet balance in real time
  • Distinguish billing method and quota per route when mixing multiple models

Best For

  • Individual developers running a mix of DeepSeek pay-as-you-go and Kimi/Alibaba subscription routes
  • Small teams wanting a lightweight local cost reference in the DSH web UI
  • Privacy-conscious users who keep all reads and writes on the local machine