DeepSeek API uses a peak/off-peak time-based pricing strategy. Manually managing fees and time periods is prone to omissions or errors. This plugin uses a persistent capsule indicator to display the current rate tier and today’s costs in real time, and automatically syncs the official pricing policy.
Core Features¶
- Peak/Off-Peak Indicator and Fee Tracking: During peak hours, it displays “Liang Wenfeng” (orange-red dot); during off-peak hours, it displays “Liang Wengu” (teal-green dot), with a countdown to the next switch. The capsule displays the amount already used today, including hit/miss counts, per-model amounts, USD equivalents, and historical backfill.
- Automatic Sync of the Official Pricing Page: Automatically fetches and parses the official pricing page (supports Chinese and English), and archives results by Beijing-time calendar day. If fetching fails, it retains the previous result or uses a built-in fallback.
- Dual Mount Points and Hover Tooltips: Mounted in the session title bar utilities slot and the bottom action slot of the sidebar. Hovering shows the current rate schedule, countdown, pricing source, and cost details.
- Rate-Tier Switch Popup: When the rate tier switches, a portrait and glow effect appear. Manual triggering is supported with
Ctrl+Shift+Alt+T.
Installation¶
dsh plugin --profile web add github:ZiqiaoFang/dsh-liangwen-tide
Configuration¶
Override configuration items in the profile’s cordis.patch.yml:
- id: liangwen-tide
config:
autoUpdate: false # 关闭自动抓取
trackUsage: false # 关闭费用追踪
refreshHours: 12 # 抓取间隔(小时)
timeoutMs: 15000 # 单次抓取超时(毫秒)
urls: # 自定义定价页地址
en: https://api-docs.deepseek.com/quick_start/pricing
zh: https://api-docs.deepseek.com/zh-cn/quick_start/pricing
Usage¶
- Manual trigger for the rate-tier switch popup:
Ctrl+Shift+Alt+T(on macOS:⌘+Shift+Option+T). - Console preview:
__liangwenTide.preview('peak')or__liangwenTide.preview('valley').
Privacy and Dependencies¶
- Privacy: Reads only token counts and model names. All data remains in process memory and is not written to disk or sent externally.
- Dependencies: Requires Node >= 20. The Web profile requires
dsh.client. Compatibility requiresdsh >= 0.1.5-rc.1. If thesessionQueryservice is missing, it degrades to real-time tracking only.
Use Cases¶
Suitable for developers who need to monitor API costs and peak/off-peak time periods in real time in the DeepSeek Harness Web UI.
Project source and documentation: GitHub