dsh-default-model-lock: Pin the Default Model in DeepSeek Harness

Introduction

DeepSeek Harness (DSH) shares its default model across sessions: switching to a more expensive model within a conversation only affects that current session. New sessions, automation tasks, and other entry points still start from the configured default model. This leads to inconsistent behavior when you need a uniform default model. Below we introduce a plugin that keeps the default model fixed in DSH, preventing unintended cross-session switches.

What It Is

dsh-default-model-lock is a DSH plugin maintained by Panmax, categorized under model inference. Its core purpose is to “lock” the global default model: selecting a model within a session does not alter DSH’s default configuration. Only the model specified in the plugin’s settings page becomes the starting point for new sessions.

Core Features

  • Write Locking: Wraps ctx.agentDefaultModel.saveSelection() as a no-op. In-session model switching via agent.model.select() or the model selector remains unaffected; only the global default model is impacted.
  • Single Source of Truth: currentSelection() still reads from the official agent-default-model configuration. The plugin introduces no additional model routing and makes no model requests.
  • Visual Settings Page: Adds a “Default model lock” page in Settings, displaying the currently locked model and providing selectors for provider, model, and reasoning effort (reasoningEffort). Data is sourced from the live model catalog.
  • Explicit Disable Toggle: Disable the default-model-lock row in the “Plugins” list to restore official behavior: the model chosen in the selector becomes the default for new sessions.
  • Bounded Failure Handling: Catalog errors and partial provider failures are reported through retry operations; unsupported or stale saved values remain visible rather than being silently replaced.

Installation & Activation

Install via CLI:

# Install
dsh plugin --profile web add dsh-default-model-lock

# Enable
dsh plugin --profile web enable dsh-default-model-lock

# Disable
dsh plugin --profile web disable dsh-default-model-lock

# Uninstall
dsh plugin --profile web remove dsh-default-model-lock

You can also do this from the Web UI: open “Plugins” from the left sidebar, click “Add plugin”, type dsh-default-model-lock and install, then go to “Settings → Default model lock” to configure.

Typical Usage

On the “Settings → Default model lock” page, select the provider, model, and reasoning effort. The plugin writes these values into the official agent-default-model configuration entry. Example:

- id: agent-default-model
  config:
    provider: magpie
    model: auto/deepseek-v4.1-flash
    reasoningEffort: max
Field Meaning
provider The registered provider route used as the shared default
model The provider model ID used as the shared default
reasoningEffort Optional effort ID; leave empty to use the adapter’s default effort

Existing sessions retain their respective recorded models. Only sessions created after the lock is applied will read the locked default model.

Use Cases & Notes

  • Suited for scenarios requiring a uniform default model and avoiding unintended cross-session switches, such as automation tasks or Agent entry points that need a stable starting point.
  • The plugin runs under DSH process privileges. Review the source code and license before installing.
  • While the lock is active, all saveSelection() calls are ignored, including the initializeDefaultModel() fallback logic for DeepSeek accounts. If you have not yet configured other provider keys, it is recommended to disable the lock before running account setup for the first time.
  • DSH version must satisfy >=0.2.2-rc.1 <0.3.0-0, and the Node version must be ^22.19.0 || >=24.0.0.

Summary

dsh-default-model-lock locks the default model to the configuration page by wrapping saveSelection(), keeping in-session model switches local while ensuring new sessions start from a fixed default model. It introduces no additional model routing, maintains a single source of truth, and provides a visual settings page along with an explicit disable toggle.

Catalog: https://www.skillhub.cn/plugins/Panmax/dsh-default-model-lock
GitHub: https://github.com/Panmax/dsh-default-model-lock

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

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

Xiaoye