
Miyazawai/dsh-client-pricing
80Last commit Aug 14, 2026
dsh-client-pricing DSH plugin
This plugin shows the current DeepSeek API price (input, output, cache hit) directly in the DSH web client header. It automatically detects the model (flash or pro) and the peak/off-peak time window, updating every 30 seconds. A hover tooltip provides the full price table and time rules.
How to install the dsh-client-pricing DSH plugin
dsh plugin --profile web add dsh-client-pricingCopying does not run this command. Review the repository and version before installing the dsh-client-pricing DSH plugin.
dsh-client-pricing DSH plugin data source
dsh-client-pricing DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-client-pricing DSH plugin can do
- Inline display of current pricing state (flat rate, peak, or off-peak) with color-coded badge
- Hover overlay showing full price table for the active model, including peak/off-peak rates and time rules
- Automatic model detection and price switching when switching between flash and pro
- Auto-switch between peak and off-peak pricing every 30 seconds based on Beijing time
- Supports both legacy flat-rate pricing and the new peak/off-peak pricing schedule (effective from 2026-08-17)
Where the dsh-client-pricing DSH plugin fits
- Monitor DeepSeek API costs in real time while using the DSH client to avoid unexpected charges during peak hours
- Compare prices across flash and pro models easily without leaving the chat interface
- Check the exact time when peak pricing starts or ends via the hover tooltip
- Stay informed about upcoming price changes when the new pricing schedule becomes active
- Quickly verify cache hit pricing to optimize request strategies
Who the dsh-client-pricing DSH plugin is for
- DeepSeek API users who use the DSH web client
- Developers and operators who want to keep API costs under control
dsh-client-pricing DSH plugin limitations
- Only works with the DSH web profile (browser loader); not available on other DSH profiles
- Only supports deepseek-v4-flash and deepseek-v4-pro models; other models are hidden
- Prices are hardcoded in the source code and must be manually updated when DeepSeek changes pricing (no API integration)
- In very narrow windows, the hover tooltip may overlap with other elements (visual only, no interaction blocking)
dsh-client-pricing DSH plugin: from the repository README
Quoted from the Miyazawai/dsh-client-pricing README, the upstream source of the dsh-client-pricing DSH plugin. Copyright remains with the original authors.
**DeepSeek Harness 客户端插件,以免你在高峰时刻不小心享受到梁子的两倍价格**:在会话顶栏顶部显示 **DeepSeek API 当前生效价格**,随当前模型(flash/pro)与峰谷时段自动切换。 ## 功能 - **顶栏内联显示**(整行水平居中,单行不换行): - 三态徽标:峰谷定价生效前显示 `现行一口价`(中性灰);生效后显示 `高峰`(橙)/ `空闲`(绿) - 当前生效三价:输入(缓存未命中)/ 输出 / 缓存命中,单位 元/1M tokens - **hover 浮层**:当前模型完整价目表(高峰/空闲两档 × 缓存命中/未命中/输出)+ 时段规则说明;峰谷生效前额外预告两档价格并注明生效时间 - **自动跟随模型**:订阅 `modelDirectories`,flash ↔ pro 切换即时换价;非 flash/pro 模型自动隐藏 - **自动切换峰谷**:每 30s 重算档位,跨时段边界自动更新 - **双价目表**:官方 2026-08-17 00:00(北京时间)峰谷新价生效前显示现行一口价,生效后自动切换峰谷价 ## 官方价目表 来源:[DeepSeek API Docs · 模型 & 价格](https://api-docs.deepseek.com/zh-cn/quick_start/pricing),单位 元/1M tokens。原始抓取存档见 [`docs/sources/`](docs/sources/)。 | 生效区间 | 模型 | 缓存命中 | 缓存未命中 | 输出 | |---|---|---|---|---| | 现在 → 2026-08-17 00:00 北京 | flash | 0.02 | 1 | 2 | | 同上 | pro | 0.025 | 3 | 6 | | 2026-08-17 起 · 空闲 | flash | 0.05 | 1.5 | 4.5 | | 2026-08-17 起 · 高峰 | flash | 0.10 | 3.0 | 9.0 | | 2026-08-17 起 · 空闲 | pro | 0.15 | 4.5 | 13.5 | | 2026-08-17 起 · 高峰 | pro | 0.30 | 9.0 | 27.0 | - **高峰时段**(北京时间):9:00–12:00、14:00–18:00(左闭右开),其余为**空闲**时段 - **空闲价 = 高峰价 × 0.5** - 时段按 Asia/Shanghai(UTC+8,无夏令时)计算 ## 安装 ### 方式一:npm 包(推荐) ```powershell # 1. 安装到 dsh web profile(自动追加 loader 行) ./install.ps1 # 或用
Read the full READMERepository license: MIT
dsh-client-pricing DSH plugin questions
How do I install dsh-client-pricing?
You can install it using the npm package method: run `./install.ps1` in the plugin directory, or use the DSH command `dsh plugin --profile web add dsh-client-pricing`. After installation, restart the DSH web client by stopping and restarting `dsh web`, then refresh the browser.
Which models does this plugin support?
The plugin supports two models: deepseek-v4-flash (displayed as 'flash') and deepseek-v4-pro (displayed as 'pro'). For any other model, the plugin automatically hides itself and does not show any pricing information.
How often does the price update?
The plugin recalculates the peak/off-peak tier every 30 seconds. When the time crosses a peak/off-peak boundary, the display updates automatically. Switching between flash and pro models triggers an immediate price update.
Where does the pricing data come from?
The pricing data is hardcoded in the source file `src/pricing.ts` based on the official DeepSeek API pricing page (https://api-docs.deepseek.com/zh-cn/quick_start/pricing). The plugin does not fetch prices from an API; manual updates are required when DeepSeek changes pricing.
Does this plugin affect DSH performance?
The plugin is lightweight and only runs in the browser. It adds a small overhead for the 30-second timer and hover tooltip rendering. No significant impact on DSH performance should be expected.