Introduction

The default behavior of DeepSeek Harness (DSH) usually relies on the Provider’s default settings. When precise control is needed over which model different components (such as subagents, web search, and image generation) use, manual configuration is error-prone. The dsh-model-switch plugin provides an explicit routing mechanism that enforces the model and reasoning level for scenarios such as the main model, subagents, and plan execution.

Core Features

  1. Explicit Multi-Scenario Routing
    - Main Model: Specifies the default Provider and model for new sessions; existing sessions are not affected.
    - Subagents: Can follow the parent route, or a fixed route can be injected before creating a Subagent.
    - Web Search: Preserves the official web_search behavior, and after deployment routes through the selected dynamic Provider Search Adapter.
    - Image Generation: Provides stable routing for the generate_image tool, executed through the selected Codex or Grok Adapter.
    - Plan Review: Selects the execution model before plan approval.

  2. Interactive Selectors
    - Composer Picker: Used to select the model for the current session and submits an exact Catalog Model ID.
    - Plan Review Picker: Selects the execution model before submitting the approval response.

  3. Context Protection on Send
    - Checks whether the target model/context exceeds the budget before sending a message.
    - Automatically compresses history when the limit is exceeded (only for DSH-compressible history).
    - This behavior can be controlled with a settings toggle (enabled by default).

  4. Model Variant Grouping
    - Supports grouping by Provider and model ID suffix (such as -fast or -128k).
    - Supports reasoning levels.

Typical Usage

  1. Configure the Main Model and Subagents
    Open Settings → Model Switch. Changing Main affects only new sessions. When configuring Subagents, you can choose “Follow Parent” or specify a fixed Provider and model.

  2. Use the Composer Picker
    In a session, select a model using the Composer Picker. The selector submits model IDs that exist in the official DSH Model Catalog.

  3. Use the Plan Review Picker
    In the plan approval interface, use the Picker to select the execution model, then confirm and submit.

  4. Enable Context Protection
    In Settings → Model Switch, find and enable the Check and compact context on send option.

Notes

  • Browser Compatibility: In DSH 0.1.7-alpha.2, ConfigForms for non-Loopback browsers are stored only in memory. In non-Loopback environments, open Settings through the Host’s Loopback URL to avoid losing configuration.
  • Model Publication Requirement: The plugin does not convert arbitrary strings into models. A model must be published to the official DSH Model Catalog through a Provider plugin before the plugin can recognize and route to it.
  • No Silent Fallback: Invalid, unavailable, or unsupported routes produce an error directly. The plugin does not try to switch to another model or Provider.
  • What It Does Not Affect: This plugin does not modify web_fetch, Vision routing, Provider login credentials, official Agent presets, or the runtime history of Native External Agents.

Summary

By providing explicit routing rules and interactive selectors, this plugin helps developers precisely control model invocations in DSH. It does not intervene at the Core layer or credential management, focusing instead on routing strategy at the inference level.

  • GitHub: https://github.com/NOirBRight/dsh-model-switch
  • Catalog Page: https://www.skillhub.cn/plugins/NOirBRight/dsh-model-switch