Introduction¶
The DSH plugin ecosystem emphasizes “everything is a plugin.” For those who use DSH Web for long-running sessions, two specific issues arise: first, DeepSeek models have different pricing during peak and off-peak hours, but the session header lacks an intuitive marker; second, the longer the context, the higher the input cost for subsequent requests repeatedly re-reading old conversation history.
dsh-peak-indicator offers two capabilities for DSH Web: it displays the current peak/off-peak period and session cost in the session header, and configures DSH’s built-in compaction-basic when the context reaches a threshold to fold earlier conversations into summaries, retaining recent content.
Below is an introduction to its positioning, features, installation methods, typical configuration, and precautions.
Plugin Positioning¶
dsh-peak-indicator is a DSH client plugin targeting the web Profile. The one-sentence positioning from the documentation is: DeepSeek API Peak/Off-Peak (Peak-Valley) Pricing Indicator for DSH Web: The session header displays whether it is currently in a Peak or Off-Peak (half-price) period.
The repository URL is https://github.com/future007s/dsh-peak-indicator, and the directory page is https://www.skillhub.cn/plugins/future007s/dsh-peak-indicator. The license is MIT. The documentation does not separately declare a maintainer; the account in the directory page and repository path is future007s.
Core Features¶
Peak/Off-Peak Badge and Session Cost¶
When using DeepSeek flash/pro models in the current session, the session header displays a Peak/Off-Peak badge and the actual session cost incurred, rounded to two decimal places. The badge is automatically hidden when using other models.
The badge continuously displays a countdown until the next peak/off-peak switch and refreshes automatically every 30 seconds. Hovering over it allows you to view detailed token pricing for the current model during the current period, including input, output, and cache hits.
At the end of each chat turn, the actual token cost for that turn is also displayed.
The documentation states that the price list is sourced from DeepSeek’s official pricing page. After DeepSeek adjusts prices, please update MODEL_PRICES in lib/client.js.
Automatic Compression of Long Sessions¶
Automatic compression is enabled by default. When the session context reaches 100,000 tokens, the plugin configures DSH’s built-in compaction-basic to fold earlier conversations into summaries, retaining approximately the most recent 15,000 tokens.
Automatic compression is not limited to DeepSeek models. As long as the current DSH profile provides compaction-basic, long sessions using DeepSeek, OpenAI, Claude, Gemini, etc., can all benefit.
The plugin records estimated savings for each step for models known in the built-in price list or custom models in config.prices. Unknown models will still be compressed, but the monetary estimation is unreliable.
Compression saves the context input cost for subsequent requests, not the total cost of the entire request. Output tokens, retained recent context, and newly generated summaries will still be charged.
Installation and Activation¶
The plugin requires Node.js >=22.13.0, DSH >=0.1.0-rc.7, and a Profile of web.
It is recommended to use a temporary Profile for isolated verification first. The commands provided in the documentation contain placeholders that need to be replaced with the actual temporary profile and version number:
dsh plugin --profile <temporary-profile> add dsh-peak-indicator@<version>
dsh --profile <temporary-profile> --dump-config
dsh --profile <temporary-profile> --port 0
dsh plugin --profile <temporary-profile> remove dsh-peak-indicator
If you need to activate the web Profile formally, the documentation suggests placing the plugin package in ~/.dsh/profiles/web/node_modules/dsh-peak-indicator/ (as well as node_modules/ in the DSH installation directory), and then adding the following to ~/.dsh/profiles/web/cordis.patch.yml:
- insert:
- id: peak-indicator
name: 'dsh-peak-indicator'
After refreshing the browser, the badge can be viewed in the session header.
Compatibility¶
- Node.js:
>=22.13.0 - DSH:
>=0.1.0-rc.7 - Verified compatible:
rc.7,rc.8,0.1.1-rc.1,0.1.1-rc.2 - Profile:
web
The package.json snippet in the documentation is truncated and the peerDependencies list is incomplete; for actual integration, please refer to the complete repository files and DSH runtime output.
Typical Usage¶
Auto-Compaction Levels¶
It is recommended to start with the Balanced level:
- Conservative: 150,000 tokens
- Balanced: 100,000 tokens (default, recommended)
- Saver: 60,000 tokens
In DSH settings, open “Plugins → Cost and Context” to adjust the switch, trigger budget, retain tokens, and reference window in real-time.
If you need to fix the auto-compaction parameters in the profile, you can set enabled, contextBudget, retainTokens, and referenceWindow in the config.autoCompact of the patch entry. In the default recommended values, contextBudget is 100,000 tokens and retainTokens is approximately 15,000 tokens.
Adjusting Peak/Off-Peak Pricing Parameters¶
The badge calculation on the browser side uses built-in periods. Host configuration is mainly used for programmatic calls to ctx.peakIndicator.current().
If adjustments are needed, you can pass the following in the config of the patch entry:
peakWindowsbeijingOffsetMinutesoffPeakDiscountpolicyEffectiveDateweekendOffPeakEffectiveDate
Use Cases and Precautions¶
Suitable for scenarios where DeepSeek flash/pro is frequently used in DSH Web for long sessions, and there is a desire to view peak/off-peak periods, session costs, and current turn costs. Also suitable for uniformly enabling auto-compaction in the profile to reduce the input cost of repeatedly re-reading old context in subsequent requests.
Notes:
- The plugin runs with the current DSH process permissions. Before installation, check the source code, dependencies, and license.
- Automatic compression will replace early original text with summaries. For tasks involving precise historical details, consider increasing
contextBudgetor increasingretainTokens. - The badge is only displayed when using DeepSeek flash/pro models in the current session.
- The price list may change with official price adjustments. After DeepSeek adjusts prices, please update
MODEL_PRICESinlib/client.js. - The peak/off-peak periods and price list in the documentation are excerpts; please verify with the latest official information before use.
- The community directory is an independent site, not an official app store, and has no official affiliation with DeepSeek/FutureWave.
Get¶
- Directory Page:
https://www.skillhub.cn/plugins/future007s/dsh-peak-indicator - GitHub:
https://github.com/future007s/dsh-peak-indicator