During the use of DeepSeek Harness (DSH), accurately understanding the consumption composition of API tokens—especially cache-hit behavior—is important for prompt optimization and cost control. Existing interfaces typically show only total consumption and lack a breakdown view for cached input, uncached input, and output segments. This plugin reads DSH’s internal session projection to provide an intuitive usage bar.

This is a lightweight UI plugin for visualizing API token usage in the DSH Web UI. It is maintained by hurry060215-tech. It directly reads DSH’s tokenUsage projection and displays usage as three segments: cached input, uncached input, and output, without accessing the DeepSeek API or user credentials.

Core Features

  • Direct data source: Reads DSH’s existing tokenUsage session projection directly and does not request the DeepSeek API.
  • Privacy and security: Does not read API keys, query account balances, or modify session logs.
  • Visual distinction: Uses color to distinguish segments—green for cached reads, yellow for uncached input, and blue for output.
  • Interaction and accessibility: Supports reading the exact token counts of the three segments via mouse hover or assistive technology.
  • Responsive design: Works on desktop and narrow screens; text labels are hidden on narrow screens, but colors and values are retained.
  • No extra overhead: Pure UI plugin; does not introduce new model tools, system prompts, or token overhead.

Installation and Enablement

  1. Ensure your environment meets the requirements:

    • DeepSeek Harness >=0.1.5-alpha.1 <0.1.6-0
    • Web profile
    • Node.js ^22.19.0 or >=24
    • pnpm 10
  2. Run the installation command. The plugin has not been published to npm, so you need to install the prebuilt package directly from the GitHub Release:

npx --yes @deepseek-ai/dsh@0.1.5-rc.1 plugin --profile web add https://github.com/hurry060215-tech/dsh-api-usage-bar/releases/download/v0.2.0/dsh-api-usage-bar-0.2.0.tgz
  1. Start the Web interface:
npx --yes @deepseek-ai/dsh@0.1.5-rc.1 web
  1. Open the full launch URL printed in the terminal (or use the automatically opened browser). After completing one model request, the usage bar automatically appears below the input box.

Note: The installation package includes the prebuilt lib/, so users do not need to clone the repository or run a build.

Port conflict handling: If port 3080 is already in use, you can specify another port with the following command:

npx --yes @deepseek-ai/dsh@0.1.5-rc.1 web --port 3091

Statistical Basis

The plugin provides a normalized display based on DSH’s token projection. The three segments correspond to the following fields:

Segment DSH token projection field
Cached input cacheReadTokens
Uncached input uncachedInputTokens + cacheWriteTokens
Output outputTokens

The bar represents the composition of usage, not the progress of account balance.

Notes

  • Uninstall: To remove the plugin, run npx --yes @deepseek-ai/dsh@0.1.5-rc.1 plugin --profile web remove dsh-api-usage-bar.
  • npm limitation: Because the plugin has not been published to npm, do not try to install it using the add dsh-api-usage-bar command.
  • Privacy note: The plugin only reads the cumulative token projection already received by the browser, does not make network requests, does not hold credentials, and does not write session events.