AI Agent Hub
Back to plugins
🖥️

dsh-api-cost

Client Updated 2026.08.25

Run the following command in DeepSeek Harness:

dsh plugin install CCCq-C/dsh-api-cost

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

Run the plugin install command in DeepSeek Harness to add this plugin; source code is available at https://github.com/CCCq-C/dsh-api-cost .

About this plugin

When you drive DeepSeek through dsh, the one thing you least see in the UI is the cost — how many tokens this turn actually consumed and what it costs in dollars is simply absent. dsh-api-cost closes that gap: a small chip sits above the composer that prices each provider-reported usage sample against a configurable per-model rate table (USD per one million tokens), ticking up live as tokens stream in, so you do not have to hunt through invoices to find out.

Under the hood the plugin works in two halves. The host side registers an apiCost session projection — a pure fold over the session log that prices every usage chunk exactly once, so streaming fragments accumulate without double-counting the final assistant message. The browser side renders the chip in the composer dock; hovering it reveals a four-bucket breakdown (cache-miss input, cache-hit input, cache write, output) alongside the active model id. All rates live in the profile configuration; unknown models fall back to a built-in default table. No changes to the host repository are needed.

Who is this for? If you run long multi-turn conversations in dsh, switch models mid-session, or share a single dsh instance with teammates and need a quick at-a-glance answer to how much this turn cost and how much of it was a cache hit before hitting send, this chip gives you that answer without leaving the window.

Use Cases

  • Check real-time token consumption and dollar cost during long multi-turn sessions
  • See which model rate applies at each step when switching models mid-conversation
  • Quickly identify cache-hit vs cache-miss usage for team cost attribution

Best For

  • Individual developers running high-token conversations in dsh daily
  • AI application teams that need to track and control API spending
  • Heavy dsh users who want at-a-glance usage details without leaving the window