Introduction¶
In DeepSeek Harness (DSH), as conversations get longer and context usage increases, cache read costs often make up the majority of the bill. When deciding whether to keep context or how to optimize prompts, developers often lack precise real-time data.
Plugin Introduction¶
dsh-axia-cachebilling (Axia Billing) is a DSH Web plugin maintained by Animal2404. It mounts billing and cache monitoring directly into DSH’s built-in “Context Usage popover,” requiring no extra page and not covering the main chat interface.
Core Features¶
The plugin provides the following capabilities:
-
Three-Tier Billing Statistics
- Provides billing for the current step, current turn, and current session.
- Each tier’s breakdown includes costs and statistics for cache hits, cache misses, and output.
- At the bottom, it displays the current model pill (including provider/model, off-peak/on-peak pricing, and currency). -
Context Statistics (8 metrics)
- Based on actual counts from session log events, rather than estimates or percentage-based inference.
- Metrics include turns, steps, tool calls, images, pruning, injection, compression, etc., and include estimated costs. -
Token Statistics
- Displays total tokens, cached input tokens, uncached input tokens, and output tokens.
- Provides both absolute values and percentages. -
Billing and Exchange Rates
- Automatic multi-currency normalization: Supports CNY and USD, converts them using real-time exchange rates fromopen.er-api.com; if the rates are unavailable, falls back to side-by-side display.
- Peak and off-peak pricing support: Supports separate pricing for peak and off-peak periods.
- Automatic price catalog fill: Built-in model prices for Open Code / Command Code / GLM / Kimi / MiniMax / MiMo, etc.; prices are automatically filled in when adding or modifying models, and can also be refreshed manually. -
Configuration Integration
- The provider and model lists are pulled directly from DSH’s configured lists.
- The settings page supports custom entries (fixed price, peak/off-peak pricing, currency); changes take effect immediately without restarting DSH.
Install and Enable¶
Run the following command to install the plugin:
dsh plugin --profile web add github:Animal2404/dsh-axia-cachebilling
After installation, restart DSH. Opening the “Context Usage popover” of any session shows the real-time bill.
Notes¶
- Source and build: The plugin’s build process runs only in GitHub Actions; no local build environment is required.
- Exchange rate source: Real-time exchange rate data is obtained from
open.er-api.com. - Permissions and license: The plugin runs with the permissions of the current DSH process; it is recommended to review the source code and license (MIT) before installation.