Preface

When performing complex development or debugging with DeepSeek Harness, tracking a single session’s token consumption, model call frequency, and actual costs incurred is essential. The native interface usually only displays basic statistics, making it difficult to meet the need for fine-grained analysis of cost control and model distribution. The dsh-receipt plugin adds a “Receipt” entry in the session header, providing supermarket-receipt-style overview and itemized views to help developers intuitively grasp session costs.

Plugin Overview

Plugin name: dsh-receipt
Maintainer: bluechips-zhao
Core value: locally calculates and displays usage and cost for the current session (including sub-agents), with breakdown support by model and by hierarchy.

Core Features

The plugin mainly provides the following views and operations:

  1. Session usage overview: Displays total cost, subtotal, model call count, total tokens, cache hit rate, and average cost per call.
  2. Cost and usage distribution: Displays a color-coded token structure and supports switching to view the top five models by amount or token proportion. It also displays model latency and session span.
  3. Per-model details: Expand to view specific call counts, token counts by type, and calculated cost. Reasoning tokens are already included in output token calculation.
  4. Sub-agent costs: Supports expanding by hierarchy to separately view the cost of this agent and branch cost including all descendants. Supports searching by name or session ID, and loads 20 same-level agents at a time.
  5. Practical operations: Supports copying text summaries, keyboard shortcuts, narrow-screen adaptation, light/dark theme switching, and reduced animation settings.

Installation and Enablement

After installing the plugin, restart the GUI to load the new features.

# 在 DeepSeek Harness web profile 目录下执行
pnpm dsh plugin --profile web add github:bluechips-zhao/dsh-receipt

Enablement steps:
1. After installation, quit and restart the GUI.
2. Open any session.
3. Click the “Receipt” button on the right side of the session header.
4. Click “View All Model Details” to switch to the per-model view.

Configuration and Pricing

The plugin has built-in DeepSeek official pricing verified as of 2026-09-27 (off-peak periods), and supports time-of-day pricing (peak/off-peak).

Pricing Configuration

Configure overridden pricing in the profile’s cordis.patch.yml:

- id: dsh-receipt
  config:
    currency: ¥
    pricing:
      # 覆盖示例,单位为 ¥/1M tokens
      deepseek-flash: { input: 1, cacheRead: 0.02, output: 4 }
      deepseek-v4-pro: { input: 4.5, cacheRead: 0.15, output: 13.5 }
    # 补充非内置的法定节假日日期
    offPeakDates: ['2026-10-01']
  • Pricing logic: Costs are estimated locally based on the configured pricing table. Models without a configured unit price display as “Unpriced”. Peak/off-peak periods are determined by sample time, and the built-in default multiplier is 2.
  • Reasoning tokens: Part of output tokens and not added again when totaling.
  • Currency: Default is CNY (¥), and can be changed in the configuration.

Permissions and Security

The plugin runs within a strict read-only permission scope:
* No external dependencies: Does not rely on external services, makes no network requests, and performs no command execution.
* Data permissions: Only reads the host-side receipt projection and useSessions row data.
* Isolation: Does not access the file system, does not read credentials, and does not spawn subprocesses.

Compatibility

  • Node.js: ^22.19.0 || >=24
  • DSH version: Verified compatibility with 0.1.7-rc.2.

Conclusion

dsh-receipt provides DeepSeek Harness users with localized, real-time session cost tracking, suitable for development scenarios that require fine-grained control of model calls and budget.