The core idea of DeepSeek Harness (DSH) is “everything is a plugin.” In actual use, real-time session cost and quota status across different model providers are common pain points. The dsh-monitor plugin aims to solve these two problems by providing an accurate session cost badge and a usage query panel configured per model provider.
Core Features¶
- Session Cost Badge: Displays cost in real time in the session header, including Token details for input, cache hits, cache misses, and output. It remains accurate after refreshing.
- Per-Provider Usage Panel: Click the dashboard icon next to the model switcher to view the quota status for the current session provider.
- Three Preset Configurations:
- DeepSeek Official: Built-in. Directly queries the balance at
api.deepseek.com. - OpenCode: Queries usage percentage and reset time for 5-hour/weekly/monthly plans.
- Custom HTTP: Supports any HTTP usage endpoint. Configure the URL, Headers, and JSON path.
- DeepSeek Official: Built-in. Directly queries the balance at
- Official Pricing Sync: One-click synchronization of the price sheet and peak/off-peak time slots from DeepSeek’s official pricing page.
Installation and Activation¶
Add the plugin to the bundle layer of the web profile using the official installation command:
dsh plugin --profile web add https://github.com/Coco-king/dsh-monitor.git#v0.3.1
The plugin declares dsh.bundle.patch, so it will be automatically added to the bundle layer. After modifying the code, you must re-run the command above to apply the changes.
Usage¶
- Configure a Provider: Go to
Settings -> Usage -> Provider usage configand click Add Provider. The provider ID is a dropdown menu. Options include model providers configured underSettings -> Modelsas well as providers already configured here. Select a preset and fill in the fields. - View Usage: In the Composer, click the dashboard icon to the left of the model switcher. The panel displays the quota for the current session provider: provider name, preset badge, and the refresh icon in the top-right corner.
- Manage Pricing: Go to
Settings -> Usage -> Billing prices. You can edit prices manually or synchronize them from the official documentation. The price sheet automatically syncs the peak/off-peak time slot configuration. - First Launch: On first startup, the plugin backfills historical session data into the local SQLite ledger. This process may take a few seconds. A progress bar or logs will appear in the console, and the page remains available during this time.
Notes¶
- DeepSeek Official Balance: No extra configuration is required. The plugin automatically reuses the API Key under
Settings -> Modelsto query the official balance. - Code Updates: After modifying the code, you must re-run the installation command for changes to take effect.
- Data Backfill: A one-time data backfill occurs on the first run. Subsequent incremental syncs are very fast.
- License: The plugin is released under the MIT License.
Summary¶
dsh-monitor achieves precise cost calculation through a local SQLite ledger and event-sourced session projection. It is suitable for developers who need fine-grained control over DeepSeek and third-party API costs and quotas. For more information, please refer to the plugin directory or the GitHub repository.