Introduction¶
DeepSeek Harness (DSH) uses an “everything-as-plugins” architecture and extends core capabilities through extension plugins. For developers, monitoring token usage, estimating model costs, and analyzing call trends are critical parts of day-to-day work. The DeepSeek Harness Usage plugin is designed to address this need. It is a local-first plugin that reads data directly from DSH session logs and provides cost analysis, trend charts, and an activity heatmap, without relying on external telemetry services or creating a parallel database.
What Is This¶
The plugin is developed by maintainer syncended and is currently at the MVP (minimum viable product) stage. It supports DSH 0.1.5-rc.2 main panel API and retains fallback navigation support for older 0.1.1-rc.2. As a local tool, it strictly follows the “read-only” principle, with session logs serving as the single source of truth.
Core Features¶
The plugin provides a complete set of usage analytics tools, including the following:
- Full-featured workspace: Click Usage in the sidebar to open the full workspace interface.
- Time-range filtering: Supports viewing data over 30 days, 90 days, 1 year, and all time.
- Cost analysis:
- API estimation: Provides token rate estimates for providers other than Codex.
- Codex API equivalent: Provides hypothetical cost estimates for the
openai-codexprovider. - Actual costs: Currently unavailable. The plugin does not import invoices or payment records.
- Interactive charts:
- Trend chart: Interactive charts with pointer and keyboard tooltips for viewing tokens, estimated cost, or call counts.
- Token mix visualization: Uses a donut chart to show the proportion of input/output/cached tokens.
- Activity heatmap: An interactive 365-day heatmap with multiple color modes and quartile intensity settings.
- Data breakdown: Supports breaking down usage by provider and by model, and sorting by session, call count, token volume, and estimated cost.
- Smart processing:
- Timezone awareness: Browser-timezone-aware date grouping.
- Background scanning: Automatically performs background scans after Host startup and refreshes periodically without interfering with main UI rendering.
- Caching mechanism: Revision-aware caching skips unchanged sessions and supports disk checkpoint reuse.
Installation and Enablement¶
After installing or upgrading, restart the dsh web process to activate the plugin.
dsh plugin --profile web add @syncended/dsh-usage
After restarting, refresh the page and open Usage in the sidebar to view the data.
Configuration and Usage¶
The plugin supports overriding pricing or scanning behavior through a configuration file.
Edit the usage line in the $DSH_HOME/profiles/web/cordis.patch.yml file:
- id: usage
config:
scanConcurrency: 2
scanBatchSize: 32
refreshIntervalSeconds: 60
cachePath: /absolute/path/to/usage-checkpoint.json
Pricing Notes¶
- Token rate estimates are not payment records: The dashboard distinguishes between API estimates and Codex equivalents. Both are estimates and do not constitute actual billing.
- Classification rules: Classification uses provider routing (case-insensitive) rather than model names. This means that GPT models accessed through an enterprise gateway are not automatically classified as subscription usage.
- Language setting: The interface language follows the
<html lang>setting of the DSH Web UI (i.e., the built-in DSH language), not the browser locale.
Cautions¶
- Read-only mode: The plugin does not modify data; it only reads logs.
- Host dependency: Host support for the
appReadysignal is required for the best background scanning experience (older Host versions are still usable). - Open-source license: The plugin follows the MIT license. Review the source code and license before installing.
Ecosystem and Links¶
This plugin is part of the DSH plugin ecosystem and is not directly affiliated with official DeepSeek. For more details, visit:
* GitHub repository
* SkillHub community plugin catalog