Preface¶
When running long conversations or repeatedly debugging agents in DeepSeek Harness (DSH), token usage can quietly accumulate. However, the interface often only displays counts or token statistics, making it difficult to immediately map them to “how much this specific chat cost.” Official billing is only available at settlement, leaving a gap for a rough estimate based on DeepSeek’s official pricing, distinguishing between peak/off-peak hours and cache hits.
The following introduces the community plugin dsh-deepseek-cny-cost (Maintainer: zhiciyishuyicheng-dev, Category: Model Inference): It attaches a small badge next to the Web GUI input box, displaying the cumulative estimated cost of the chat you are currently viewing in RMB (CNY), updating as the conversation progresses.
What is this¶
dsh-deepseek-cny-cost is a browser-side plugin for DSH (MIT licensed, current package version 0.1.0). It does not initiate additional requests; it only reads the existing tokenUsage and modelSelection of the current session, converts them to CNY based on DeepSeek’s official Models & Pricing (data notes verification time as 2026-10), and distinguishes between peak and off-peak hourly rates.
The plugin appears in the community directory at the SkillHub entry, with source code on GitHub. The DSH ecosystem emphasizes “Everything is a plugin”; SkillHub is an independent community site with no official affiliation with DeepSeek or Higgsfield.
What you will see on the interface¶
After installation and activation, a small badge similar to the one below will appear below the input area near the session statistics (example from README):
≈¥0.0123
Key meanings are as follows:
- The number corresponds to the rolling total of the currently selected chat; switching sessions switches the number, and the number grows as the conversation continues.
- Hovering the mouse (or using a screen reader) reveals a breakdown: costs corresponding to uncached input, cache-hit input, and output tokens respectively.
- Displayed only when the selected provider is a DeepSeek official line (see “Applicable Conditions” below). Third-party relays do not bill according to DeepSeek’s peak/off-peak prices, so the plugin does not display for them.
Pricing Logic (Source Material)¶
The plugin uses two types of projections already exposed by the session and does not pull APIs itself:
| Data | Source |
|---|---|
| Token Usage | tokenUsage (uncachedInputTokens, cacheReadTokens, cacheWriteTokens, outputTokens) |
| Current Model | modelSelection |
The official price list is in RMB per million tokens (Peak); off-peak is half the peak price. Peak hours are defined as Beijing Time Monday to Friday (excluding statutory holidays) 09:00–12:00 and 14:00–18:00; other periods (including weekends and holidays) are off-peak.
| Model | Cache hit | Cache miss | Output |
|---|---|---|---|
deepseek-flash |
0.04 | 2 | 8 |
deepseek-v4-pro |
0.30 | 9 | 27 |
Supplementary rules (README):
- Cache writes are billed at the cache miss input price (consistent with the official “no separate write fee”).
- Old names
deepseek-v4-flashanddeepseek-v4-flash-vision-expare processed according to Flash pricing. - Unrecognized model names will hide the badge rather than fabricate a unit price.
Installation and Activation¶
The plugin is installed as a local directory (the installer records link: dependencies). Please read the repository source code and MIT license yourself before installing; the plugin runs under the current DSH process permissions and, like any DSH plugin, should only be installed from sources you trust.
Desktop Version: Open Plugins → Add plugin, enter the absolute path of this plugin directory, then install and enable. If prompted that a full DSH restart is required, restart and refresh the page.
Command Line (Non-desktop profile):
dsh plugin --profile web add /absolute/path/to/dsh-deepseek-cny-cost
Replace /absolute/path/to/dsh-deepseek-cny-cost with the actual absolute path after cloning or downloading on your machine. The material does not provide remote one-click installation commands like github:owner/repo; do not construct them based solely on the plugin name.
Typical Usage¶
No additional configuration or APIs are needed: enable the plugin, select a DeepSeek official provider and a supported model in DSH Web, and chat normally. Observe the ≈¥… next to the input box and the hover details to compare cost trends under different prompts, context lengths, or cache hit conditions.
For the development side, if modifying client.js, the README suggests performing a syntax check first and running pricing-related tests:
node --check client.js
node tools/test-cny-cost.mjs
After modifying the browser side, you need to reinstall from the same source according to the README instructions (otherwise you may encounter ambiguous-install).
Applicable Scenarios and Known Limitations¶
Suitable for: Daily use of DeepSeek official lines in DSH Web for conversation or agent debugging, where you want to see a rough RMB estimate on the spot and distinguish between input caching and output, rather than waiting for the bill.
Display Conditions: DeepSeek official providers, including deepseek-official, deepseek-account, or new official lines with IDs starting with deepseek.
Must be treated as an estimate, not an invoice:
- Excludes additional billing for single Search / Fetch operations; official bills prevail.
- If the model was switched during the session,
tokenUsageis the total for the whole session without breakdown by model; the plugin estimates the entire process using the unit price of the currently selected model. - Built-in statutory holiday table for 2026; if there is no table entry for a certain year, off-peak is determined solely by weekends, meaning statutory holidays falling on workdays in that year might be calculated as peak hours.
- The badge is not displayed for third-party relays.
Conclusion¶
dsh-deepseek-cny-cost converts the current chat’s token projections into an RMB estimate featuring peak/off-peak and cache breakdowns, placing it next to the Web input area. It is suitable for DSH users who need to “keep a running tally while chatting.” Directory and Source Code:
- Directory Page: https://www.skillhub.cn/plugins/zhiciyishuyicheng-dev/dsh-deepseek-cny-cost
- GitHub: https://github.com/zhiciyishuyicheng-dev/dsh-deepseek-cny-cost