dsh-unified-model: Apply model and thinking intensity to all DSH sessions at once

Foreword

DeepSeek Harness (DSH) stores model selection within a single session. The built-in default model settings only affect sessions where no model has been selected yet, and /model only changes the current session. There is no built-in entry point when you have a large block of historical sessions and want to switch them all to the same model and thinking intensity at once. The elfgzp/dsh-unified-model introduced below fills this gap: it adds a control to the composer bar to batch-write all writable sessions, taking reasoningEffort along with it.

The plugin is positioned as a model reasoning assistant, maintained by elfgzp. Current stars: 0, version: 0.1.0, license: MIT.

Where is the control and how to use it

The control is attached to the composer bar, side-by-side with the official model selector, not replacing it:

[⇉ All sessions]  [ deepseek-v4.1-flash ▾ ]
                   ^ Official model selector, kept as-is

When the window is narrow, the button shrinks to an icon:

[⇉]  [ deepseek-v4.1-flash ▾ ]

The full name is still written in the button’s title and aria-label, so the control remains labeled even if it turns into an icon.

After opening the panel, sequentially select provider, model, thinking effort, and scope:

Option Effect
Every session Writes to every session that allows saving independent choices
Every other session Same as above, but does not touch the session currently being viewed
Also make this the default Additionally writes to deployment default; subsequent new sessions will start from this setting

During the batch execution, there is a real-time done/total counter. Upon completion, it reports which were changed, which were already consistent, and which failed.

Why handle effort together

Most attempts to “switch models for all sessions” stop at the model level because thinking intensity looks like another layer. In reality, it is not:

  1. sessionController.selectModel() accepts { provider, model, reasoningEffort? }.
  2. The submitted selection is appended to the session log via a model/selection event; the schema of this event includes reasoningEffort.
  3. The modelSelection projection re-reads it, and selectionFor() restores it after restarts; therefore, effort survives.

Example log snippet from actual testing in the README:

{"type":"model/selection","seq":4,"data":{"provider":"tencent-intranet","model":"deepseek-v4.1-flash-ioa","reasoningEffort":"max"}}

Therefore, when the plugin determines whether a session matches, it compares the provider, model, and reasoningEffort. An implementation that compares only the first two will show success but silently fail to write the effort.

Scope and Failure Handling

Situation Behavior
Normal session Update; this is the target of the control
Sub-agent session Do not touch; they follow the parent route, and the host refuses to let them choose independently; counted separately in the results, not treated as a failure
Session already carrying the target selection Skip, do not write; clicking on already-unified history repeatedly completes in milliseconds
Log corrupted or locked by another process Reported as a failure, attaching the reason given by the host; the rest of the batch continues

The batch task runs on the Host, not inside the browser; closing the tab will not interrupt it. The client is only responsible for starting and polling for progress.

Implementation and Interfaces

The plugin does not patch built-in plugins, does not edit session logs, and does not modify projection caches; it directly calls the public host API used by the built-in /model dialog:

sessionController.list({})                  → All sessions and their current selection
sessionController.selectModel({ sessionId, provider, model, reasoningEffort })
sessionController.modelCatalog()            → Provider grouping and publicly available effort for each model
agentDefaultModel.saveSelection({ … })      → Writes deployment default when needed

The write operation follows the official path, session state remains in the official format, and uninstallation leaves no changes. In the future, if Harness renames these methods, this plugin will be the only thing lost.

There are three routes, all after the composition’s connection trust fence:

GET  /unified-model/state    → catalog, default, session selections, current run
POST /unified-model/apply    → { provider, model, reasoningEffort?, scope, excludeSessionId? } → { runId }
GET  /unified-model/status   → Current or most recent run
POST /unified-model/default  → Write deployment default

Two Performance and Security Handling

Read before write. selectModel will restore each cold session, which is the most expensive part of the process. Therefore, the plugin uses list() to read the selection of all sessions first, skipping those already consistent. The README measured this on a 55-session profile: the first run wrote 36 sessions in 2.7s; the immediately subsequent repeat run skipped 53 and completed in 56ms.

Validate before writing. If the model name or effort is not publicly available for that model, the adapter will reject the request. Both items are checked against modelCatalog() before touching the first session; typos will cause the entire request to fail rather than 60 individual session failures:

400 model-unknown       catalog did not list this p/m
400 effort-unsupported  p/m exposes low/medium/high/xhigh/max, ultra999 is not one of them

The client also only provides effort levels actually exposed by the model, so there will be no mismatch between the two sides.

Installation and Enablement

The official installation command is as follows; replace <your-profile> with your own:

dsh plugin --profile <your-profile> add dsh-unified-model

If you already have a checkout, you can also install from a local link:

dsh plugin --profile <your-profile> add link:/path/to/dsh-unified-model

After installation, you must restart the application: both the bundle patch layer and client bundle are loaded at startup.

The configuration is empty; the control appears directly on the composer bar, and there is nothing to set.

Suitable Scenarios and Notes

Suitable for DSH users who need to unify a large block of historical sessions to the same model and effort tier, especially in scenarios with a high number of sessions where manually switching them one by one is costly. Note that sub-agent sessions are passive and will not be updated.

A few reminders:

  • The plugin runs with the permissions of the current dsh process; you should check the source code and license (MIT) before installing.
  • Requires DeepSeek Harness 0.2.0 or a later version, and requires the Web UI (the control is in the composer slot).
  • The directory page https://www.skillhub.cn/plugins/elfgzp/dsh-unified-model is a community site and has no official affiliation with DeepSeek / Huansuan.

Source code and documentation can be found at https://github.com/elfgzp/dsh-unified-model.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye