Preface¶
In DeepSeek Harness (DSH), each session maintains its own model selection. The official “default model” only applies to sessions where a model hasn’t been individually selected yet, and /model only modifies the current session. If you have already found a suitable provider and model in a specific session but want to apply the same configuration to every historical session, you would typically have to open each one and select it manually—a process that is slow and prone to omissions.
The community plugin dsh-apply-model-all (Maintainer: SYXliuliuliu, Category: Client) adds a compact control next to the Composer’s built-in model selector. With a single confirmation, it writes the “currently active model” to all sessions capable of holding independent model selections. Below, we outline its functionality, installation, usage, boundaries, and caveats.
What is this¶
dsh-apply-model-all is a client-side plugin for DSH: it does not alter the official model dropdown but adds an “Apply to all sessions” control next to it. Upon clicking and confirming the target model, the host batch-writes the per-session model selections, displaying a live count during execution.
It does not patch the official bundle or rewrite session logs/projection caches. Instead, it utilizes the same public host API used by the built-in /model dialog:
sessionController.list({}) → List all sessions and current models
sessionController.selectModel({ sessionId, … }) → Set model for a single session
Consequently, session state remains in the official format, and no extraneous dirty data is left upon plugin uninstallation. The batch logic executes on the host side, meaning closing the browser tab will not interrupt it; the client is solely responsible for initiating the task and polling for progress.
Interface and Operation¶
After installation and restart, a layout similar to the following will appear to the left of the Composer model selector (the official picker remains unchanged):
[⇉ Apply to all sessions] [ deepseek-v4.1-flash ▾ ]
^ Official selector, unmodified
Typical Usage:
- In any session, select the target provider/model via the existing picker or
/model(the control will use the “model currently in use by this session” as the batch target). - Click Apply to all sessions and verify the target model in the confirmation dialog.
- Wait for the batch to complete; the interface will update the count according to progress. If some sessions fail, the response will group failures by reason (failure details capped at 50).
Upon repeated clicking, the plugin first reads the current model of each session via list() and skips writing only for sessions where the provider and model already match (the comparison deliberately omits reasoning effort: this field belongs to the settings layer, not the session’s stored model selection; including it would invalidate deduplication and force a full rewrite every time). Sessions already on the target model will not trigger the expensive selectModel resolution and restoration path again.
Installation and Activation¶
Installation command (from the repository README):
dsh plugin --profile <your-profile> add dsh-apply-model-all
A DSH app restart is required after installation: bundle patch layers and client bundles are loaded at startup, so installing while running will not take effect.
Environment Requirements (verifiable via README and package.json):
- DeepSeek Harness 0.1.0-rc.6 or newer.
- Using the Web UI (the control is injected into the Composer slot).
- Node >= 18 (based on the plugin package engines field).
The plugin has no configuration options: the host exposes two routes, with no settings interface:
POST /apply-model-all/start {provider, model, reasoningEffort?} → {runId}
GET /apply-model-all/status → {run: {…}}
Only one batch task is allowed at a time; initiating another will return a 409 accompanied by the ongoing progress.
Scope and Limitations¶
| Situation | Behavior |
|---|---|
| Sessions capable of holding independent models | Will be updated |
| Subagent sessions | Untouched; they follow parent session routing, and the host rejects per-session selection for them (owned by subagent routing). Modify the parent session instead. |
| Already on the target model | Skipped, no write |
| Sessions locked by other processes | Failed, with a reason provided |
If a session is occupied by a live write handle in another process, external writes are impossible; the common error is already owned by an active write handle. Clicking the control within the currently running DSH app typically avoids this issue, as the lock holder and the host are consistent.
One additional note: the underlying selectModel also saves the selected model as the default in the background. Therefore, newly created sessions will also start with that model.
Applicable Scenarios and Pre-installation Notes¶
Suitable for DSH users who need to align a “currently tested model” to a large number of historical sessions in one go. For example, after switching the default reasoning model, users may want old sessions to follow the same provider/model without manually running /model on each.
The DSH ecosystem emphasizes “everything is a plugin.” The SkillHub directory page is a community listing site and has no official affiliation with DeepSeek or High-Flyer. Before installation, it is recommended to review the GitHub source code and the MIT license. The plugin runs with the permissions of the current DSH process. Batch-writing session models is equivalent to changing the model multiple times in the UI; please ensure this aligns with your security and compliance expectations.
Summary¶
dsh-apply-model-all fills the gap of “unifying models across all historical sessions” using the official sessionController write path: one-click confirmation, host-side batching, deduplication, and failure visibility. For details or issues, please refer to the repository README (including the Chinese version README.zh.md) and GitHub Issues.
- Directory Page: https://www.skillhub.cn/plugins/SYXliuliuliu/dsh-apply-model-all
- GitHub: https://github.com/SYXliuliuliu/dsh-apply-model-all