christophersmith2737-commits/OffPeak

针对 DeepSeek V4‑Flash / V4‑Pro 高峰涨价时段的成本管控 Agent 插件。高峰时段自动弹窗提醒计费上涨,支持立即执行 / 定时调度,定时面板自动屏蔽高价时段,自动过滤已过期时间,到达预约时间自动重放用户指令,规避跨时段涨价损耗。

Project Overview项目介绍

OffPeak is a native plugin built exclusively for DeepSeek Harness, designed to help users manage API costs after DeepSeek implements tidal peak/off-peak pricing starting August 17, 2026. It only works with DSH's web profile, and can be installed either via the official DSH plugin CLI command, or manually by adding the package to your DSH plugin directory and updating the cordis patch config. After installation, you just need to restart the dsh web service to activate the plugin, and it will lie dormant until the official pricing start date by default. You can also set the effectiveFrom date to an earlier date to test the plugin functionality before the official pricing rollout.

When you attempt to send a prompt during peak hours when using a V4 Flash or V4 Pro model, OffPeak intercepts the request before it leaves your composer, shows a dialog with current peak vs off-peak pricing, and gives you multiple clear action options. You can choose to continue sending immediately, schedule the prompt to send automatically during the next available off-peak window, or opt to disable all reminders for the rest of the current day. Already running tasks are never interrupted mid-execution; the plugin will only trigger a reminder when you go to send your next prompt during peak hours. All scheduling logic uses Shanghai time regardless of your local machine's timezone setting.

All request interception happens locally in your browser, so your prompt never gets sent to any third-party service, and no telemetry data is collected or shared. Scheduled prompts are stored locally on your DSH server, and will automatically submit to your original session when the scheduled time arrives, even if your browser is closed. OffPeak is released under the open source MIT license, and supports configuration options to adjust peak windows, enable debug mode, and change the activation date. It is IME-safe, so it will not interfere with Chinese or Japanese text composition when you press Enter to complete a character.

OffPeak 是专为 DeepSeek Harness 开发的原生插件,用于应对 DeepSeek API 从 2026 年 8 月 17 日开始实行的峰谷潮汐定价机制,帮助用户控制 API 调用成本。该插件仅适配 DSH 的 web 配置文件,可通过 DSH 官方插件命令一键安装,也支持手动配置安装,安装完成后需要重启 DSH web 服务才能生效。

当用户在高峰时段发送请求使用 DeepSeek V4 Flash/Pro 模型时,插件会在发送前拦截请求,弹出对话框展示当前峰谷价格对比,提供继续立即发送、预约非高峰时段发送、当日不再提醒等选项。已经在执行中的任务不会被中途打断,仅会在下次高峰时段发送新请求时发出提醒。

所有请求拦截都在浏览器本地完成,不会发送额外网络请求,也不会收集用户隐私数据,预约任务存储在本地,到期后会自动在原会话提交,无需保持浏览器开启。插件遵循 MIT 开源许可,默认从定价生效日 2026-08-17 开始激活,用户可修改配置提前进行测试。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-offpeak

把 christophersmith2737-commits/OffPeak 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

OffPeak · dsh-offpeak

Peak-hour price guard for DeepSeek API tidal pricing

Intercept your message before it's sent during peak hours — schedule it to run when it's cheaper.

npm version License Platform

Read this in 中文


Why

DeepSeek moved to peak/off-peak (tidal) API pricing effective 2026-08-17 (Beijing time):

Period Hours (Beijing) Output price vs. before
Peak 09:00–12:00, 14:00–18:00 up to 4.5×
Off-peak everything else half of peak

New per-million-token rates (¥):

Model Item Peak Off-peak
V4 Flash input (cache miss) 3 1.5
output 9 4.5
input (cache hit) 0.1 0.05
V4 Pro input (cache miss) 9 4.5
output 27 13.5
input (cache hit) 0.3 0.15

If you mostly run long tasks with DeepSeek V4 Flash, sending them at 10:00 costs 3× more than sending them at 19:00. OffPeak makes sure you notice that before you press send — not after.

What it does

While your current model is DeepSeek V4 Flash / Pro and the Beijing clock is inside a peak window, pressing Enter (or clicking send) in the composer intercepts the message before it is sent. The text stays in the input box and a dialog appears:

  • Current price card — peak vs. off-peak per-million-token rates for the model in use
  • Continue — sends the message now, through the normal composer path (draft clearing, queue, notices all intact)
  • Schedule — opens a time wheel with only off-peak hours (0–8, 18–23); past times are removed, and after 23:00 the wheel rolls into the next day's 0–8; minutes run 00–59. The command text and time are recorded, and the local server automatically submits the command to the original session when the time arrives — no browser needed at that moment
  • Don't remind me today — no more popups until the next Beijing midnight
  • ✕ — close without sending; the draft stays in the input box

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-everything-oauth 下一个 Next dsh-skillopt →