rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Bruvis625/dsh-peakshift
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
给 DeepSeek Harness 的错峰插件。 A peak-shift plugin for DeepSeek Harness.
DeepSeek API 自 2026-08-17 起实行峰谷计价:每天 09:00–12:00、14:00–18:00(北京时间)为高峰,价格约为低谷的 2 倍;其余为低谷。
本插件不接入任何新供应商——完全复用 DSH 原生的多供应商能力。你在「设置 → 模型」里像平时一样添加供应商、填 API Key(端点与模型目录自动),本插件只把「手动切换供应商」变成「按峰谷自动切换」:
deepseek-v4-pro)自动切到你选的便宜备用供应商;deepseek-v4-flash)即使高峰也不切,避免负优化。把本目录放进 DSH 的 node_modules:
Copy-Item -Recurse <本目录> "$env:USERPROFILE\.dsh\profiles\node_modules\dsh-peakshift"
或 npm install dsh-peakshift(已发布后)。
编辑 ~/.dsh/profiles/web/cordis.patch.yml,加入:
- insert:
- id: dsh-peakshift
name: dsh-peakshift
重启 DSH。
⚠️ 重要:DSH 要求
cordis.patch.yml的顶层必须是数组。删除挂载行后,文件末尾必须保留一个空数组[],否则 DSH 会启动失败(报must be a top-level YAML array)。
编辑 ~/.dsh/profiles/web/cordis.patch.yml,只删除下面两行(其余内容保留):
- insert:
- id: dsh-peakshift
name: dsh-peakshift
确认文件末尾保留着 [](没有的话手动补上),最终应类似:
# Your patch layer for this dsh profile, applied after every bundle layer:
# a top-level YAML array of loader patch entries (id-targeted config
# overrides, disables, and insert lists; `!!js` expressions allowed).
[]
删除 ~/.dsh/profiles/node_modules/dsh-peakshift 目录;
重启 DSH。
deepseek-v4-pro;price-router: 分节)| 字段 | 默认 | 说明 |
|---|---|---|
enabled |
false |
错峰总开关 |
primaryProvider |
deepseek-official |
主供应商(低谷时段使用) |
fallbackProvider |
空 | 备用供应商(留空 = 自动选第一个已接入的) |
fallbackModel |
空 | 备用模型(留空 = 该供应商第一个模型) |
peakWindows |
09:00–12:00、14:00–18:00 |
高峰时段窗口(北京时间) |
expensiveModels |
["deepseek-v4-pro"] |
贵模型列表(高峰才切走的模型) |
remindEnabled / remindMinutes |
true / 5 |
交界前提醒开关与提前分钟数 |
dsh-peakshift/
├── lib/
│ ├── index.js # Host 半:路由改写 + 设置分节 + 模型页状态卡片
│ └── client.js # 浏览器半:设置页 + 交界前弹窗(ModuleLoader bundle)
├── package.json # dsh.client 声明(platform: web)
├── LICENSE
└── README.md
Host 与浏览器半各自内置一份相同的计价算法,改动时请两边同步。
Since 2026-08-17 DeepSeek uses peak/off-peak pricing: 09:00–12:00 and 14:00–18:00 (Beijing time) are peak hours (about 2× the off-peak price); the rest is off-peak.
This plugin does not add any new provider — it reuses DSH's native multi-provider support. You add providers and API keys in Settings → Models as usual; this plugin only turns "manually switching providers" into "switching automatically by peak/off-peak":
deepseek-v4-pro) to the cheaper backup provider you chose;deepseek-v4-flash) are never shifted, even at peak.Put this folder into DSH's node_modules:
Copy-Item -Recurse <this-folder> "$env:USERPROFILE\.dsh\profiles\node_modules\dsh-peakshift"
Or npm install dsh-peakshift (once published).
Edit ~/.dsh/profiles/web/cordis.patch.yml and add:
- insert:
- id: dsh-peakshift
name: dsh-peakshift
Restart DSH.
⚠️ Important: DSH requires
cordis.patch.ymlto have a top-level array. After removing the mount lines, keep an empty array[]at the end of the file — otherwise DSH fails to start (must be a top-level YAML array).
Edit ~/.dsh/profiles/web/cordis.patch.yml and remove only these lines:
- insert:
- id: dsh-peakshift
name: dsh-peakshift
Make sure the file still ends with [] (add it if missing). It should look like:
# Your patch layer for this dsh profile, applied after every bundle layer:
# a top-level YAML array of loader patch entries (id-targeted config
# overrides, disables, and insert lists; `!!js` expressions allowed).
[]
Delete ~/.dsh/profiles/node_modules/dsh-peakshift;
Restart DSH.
deepseek-v4-pro);price-router: section in settings.yaml)| Field | Default | Meaning |
|---|---|---|
enabled |
false |
Master toggle |
primaryProvider |
deepseek-official |
Primary provider (off-peak) |
fallbackProvider |
empty | Backup provider (empty = first connected one) |
fallbackModel |
empty | Backup model (empty = that provider's first model) |
peakWindows |
09:00–12:00, 14:00–18:00 |
Peak windows (Beijing time) |
expensiveModels |
["deepseek-v4-pro"] |
Models to shift away from at peak |
remindEnabled / remindMinutes |
true / 5 |
Transition reminder toggle / lead minutes |
dsh-peakshift/
├── lib/
│ ├── index.js # Host half: routing rewrite + settings section + Models-page status card
│ └── client.js # Browser half: settings page + transition popup (ModuleLoader bundle)
├── package.json # dsh.client declaration (platform: web)
├── LICENSE
└── README.md
Host and browser halves each embed the same pricing algorithm — keep them in sync when editing.
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek。