DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Compaction Route — DeepSeek Harness 插件(DSH Plugin)
← Plugins
C

dsh-compaction-route

Compaction Route

在 DeepSeek Harness Web 设置页面中选择对话压缩摘要模型,并为主模型无法处理重放历史记录时指定备用模型。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:643048695/dsh-compaction-route#e05c339f6a91eeb4aefc7b7d52625204add584e5
README兼容性版本

兼容性与来源证明

Compaction Route 以 dsh-compaction-route 发布,当前版本为 0.1.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
github
Registry 更新时间
2026/9/27

版本

0.1.0stable
2026/9/27

相关插件

正在加载相关插件…

最新版
0.1.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
web
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/9/27
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

相关插件

继续浏览 memory-context 分类下经过校验的插件。

Memory Plugin@openviking/dsh-memory-plugin适用于 DeepSeek Harness 的 OpenViking 记忆与上下文套件Contextdsh-context用于上下文洞察和管理的 DeepSeek Harness 插件,提供上下文仪表板和上下文命令,帮助了解上下文的构成及其演变过程。Weknora@wxg-prc-cpg/dsh-weknora适用于 DeepSeek Harness (dsh) 的 WeKnora 知识检索工具:通过自有知识库进行语义搜索、文档阅读以及 RAG/代理回答。Mnemondsh-mnemon适用于 DeepSeek Harness 的可组合、基于视图的记忆。支持可插拔的数据源和策略,并开箱即用地提供分层记忆。

README

dsh-compaction-route

English | 中文

Pick the conversation-compaction summarizer from the Web settings page, and give it a fallback model.

A DeepSeek Harness plugin.


Why this exists

DSH's compaction engine resolves one summarizer from its own composition config and has no failover. When the summarization call is rejected it throws, /compact reports "Compaction could not produce a useful summary", and nothing else is ever tried.

That matters because the replayed history is sized by DSH's fixed chars/4 estimate, while every provider tokenizes the same bytes differently and enforces its own input ceiling. A history that comfortably fits the model you are chatting with can be too large for the summarizer you picked — and the whole compaction fails with nothing to catch it.

Measured on a real 950k-window session:

DSH estimate for the replay743,536 tokens
What the chat model actually read744,184 tokens
What the chosen summarizer neededover its input ceiling → HTTP 400

The meter was calibrated on the chat model's tokenizer (0.1% off), so it reported "fits" while the summarizer was already over. Three routes measured against one identical payload:

RouteTokens for the same bytes
gemini-3.8-flash1,027,843
opencode-go/deepseek-v4.1-flash939,469
surplan/deepseek-v4.1-flash939,003

The tokenizers differ by ~10%; the ceilings are the same (1,048,576). So "just pick a different model" is not enough on its own: a fallback only rescues an oversized replay when its window is larger than the primary's. The settings card says so when your pick cannot help.

What it does

Listens on the llm/stream waterfall — the single seam every model call passes through — and for purpose === "compaction" requests only:

  1. rewrites the target to the configured primary;
  2. if that attempt ends in a terminal error chunk, retries the same request on the fallback;
  3. yields the first attempt that succeeds, or the last attempt's outcome.

Every other request — chat turns, subagents, session titles, web search — falls straight through untouched.

Install

Web UI: Settings → Plugins → Add plugin, and enter the spec:

github:643048695/dsh-compaction-route

CLI (ordinary profiles; the desktop profile is managed by the Electron app and refuses the CLI):

dsh plugin --profile <profile> add github:643048695/dsh-compaction-route

Then enable the bundle when the installer asks. There is no build step, and the plugin mounts without restarting the app. The row it inserts is id compaction-route, which is also the settings namespace.

Configure

Settings → Plugins → dsh-compaction-route → Configuration.

FieldMeaning
Enable routingOff leaves the engine exactly as it was.
Primary modelThe summarizer used first.
Fallback modelTried when the primary ends in an error. Empty disables the fallback.
Reasoning effortEffort for compaction calls; empty keeps the provider's default.

Both dropdowns are built from the models actually installed in your profile — read from the llm-pi-ai settings namespace, so whatever you have is what you can pick — and each option shows its context window.

A fresh install ships with both models empty and changes nothing. Nothing is guessed: until you pick a primary, compaction behaves exactly as it did before. Naming a route in shipping code would be a guess that silently redirects someone else's profile at a provider it may not have — and a fallback without a primary is meaningless, so it does not start routing on its own.

Every field is volatile, so a change applies to the next compaction with no restart.

Choosing a fallback

A fallback rescues an oversized replay only when its window is larger than the primary's. Two same-size routes just repeat the same rejection.

The card raises a warning when the fallback's window is ≤ the primary's, and when both are the same model.

How it works

compaction call ──▶ llm/stream waterfall
                       │
                       ├─ purpose !== "compaction"?  ──▶ pass through untouched
                       │
                       ├─ primary ──success──▶ yield its chunks
                       │        └──terminal error──▶ fallback ──▶ yield whatever it returns
                       └─ (a call this plugin created is never re-intercepted)

Why it re-enters ctx.llm.stream() instead of calling next(newOptions). cordis builds a waterfall's next as a closure over the original argument array:

const next = () => (cbs.shift() ?? inner)(...args)

so next(modifiedOptions) silently ignores its argument and dispatches the original options again. Changing provider/model therefore has to re-enter ctx.llm.stream() from the top of the chain; a WeakSet of the call objects this plugin created keeps that re-entry from intercepting itself.

Notes and limits

  • Retry is on terminal error chunks only. A thrown middleware or consumer failure is surfaced exactly as the unpatched runtime would — this seam does not swallow it.
  • Cancellation wins. An aborted call is never retried.
  • Only compaction is touched. purpose is the discriminator, so nothing else is rerouted.
  • The engine's own event still records its configured target. compaction/summary reports the engine's summarizationProvider / summarizationModel, not this plugin's override; a fallback win shows up as this plugin's log line instead. Point the engine's own row at the same primary if you want the session log to agree.
  • Not a substitute for a smaller history. If the replay exceeds every window you have, no fallback helps; that is a compaction-policy problem, not a routing one.

Compatibility

Works on @deepseek-ai/dsh 0.1.7-rc.2 (verified against it) and the same-node 0.1.7 line.

Development

Neither half needs a build step.

lib/index.js        host half — the llm/stream route + the settings schema
client/client.js    browser half — the configuration card
cordis.patch.yml    the bundle patch: one row, id "compaction-route"

License

MIT — see LICENSE.