Introduction

Running an agent in DSH presents a realistic issue: the demand for model capabilities varies significantly between different requests. Simple Q&A, minor code modifications, and complex multi-step tasks—if all bound to the same model, it is easy to lose the balance between cost and performance.

dsh-auto-model-router is a third-party model routing plugin written for DeepSeek Harness (DSH). It routes requests to four capability levels, L0L3, and offers three user modes: heuristic lock, fixed level, and fully-auto. It also supports cost control, failure fallback chains, and an optional LLM classifier.

The following introduces its capabilities, installation methods, and typical usage. DSH extensions are implemented via plugins; the community directory page mentioned in this article is an independent site and not the official DeepSeek or Hanxuan app store.

What is it

dsh-auto-model-router is maintained by ADVeRTs13 under the MIT license. The npm package name is @adverts13/dsh-auto-model-router, with version 0.1.1.

It registers a virtual auto provider and Auto Router group in the DSH model selector, allowing users to select Auto directly. If a real model is explicitly selected, the plugin passes the request as-is without interfering with routing.

Core Features

  • Four-level capability routing: L0L3
  • Three user modes: heuristic lock, fixed level, and fully-auto
  • Zero-latency heuristic locking based on text width thresholds
  • Keyword scoring in fully-auto mode, with configurable weights and intervals
  • LLM classifier can be used when score is 0
  • Failure fallback chain
  • Budget control, supporting cost-first, quality-first, and balanced
  • Browser settings page displays current routing strategy
  • Configuration can be adjusted by modifying cordis.patch.yml via AI
  • When explicitly selecting a real model, the request passes through based on the original selection

Installation and Enablement

The Node engine requirements for this plugin are:

^22.19.0 || >=24

Dependency requirements include:

@deepseek-ai/dsh-llm 0.1.0-rc.6
@deepseek-ai/dsh-tools 0.1.0-rc.6

Install using the npm package:

dsh plugin --profile web add @adverts13/dsh-auto-model-router

You can also install first and then add:

npm install @adverts13/dsh-auto-model-router
dsh plugin --profile web add @adverts13/dsh-auto-model-router

If using a local directory:

dsh plugin --profile web add ./dsh-auto-model-router

To enable it, select Auto under Auto Router in the DSH model selector. Selecting Auto takes effect immediately without a confirmation popup; selecting a real model will not go through this router.

Typical Usage

The usage as provided in the documentation is as follows:

  1. Select Auto to route the session through the L0L3 levels.
  2. Select any real model to pass the request as-is.
  3. Ask the AI to modify the configuration in the chat, for example:
    - change L2 to deepseek-v4-flash with max reasoning
    - switch cost mode to cost-first

The AI will edit cordis.patch.yml; the changes require a DSH restart to take effect.
4. You can also append configuration directly to the profile’s cordis.patch.yml. Related configuration items include levels, rules, heuristic, scoring, and costControl.

Several configuration behaviors require attention:

  • rules defaults to empty and only participates in routing in fully-auto mode.
  • Each configured level requires reasoningEffort; if omitted, it defaults to off.
  • Unconfigured levels can be left empty; the router falls back to the nearest configured level based on the cost mode.

Applicable Scenarios and Considerations

This plugin is suitable for users who wish to switch model capabilities based on task complexity, switch strategies between cost-first, quality-first, and balanced, and want to select Auto directly in the DSH model selector.

Before installation, it is recommended to check the source code and license. The plugin runs with the permissions of the current dsh process. When modifying model routing, budget strategies, and fallback behaviors, ensure you understand the meaning of these configuration items. After modifying cordis.patch.yml via AI, a DSH restart is required to apply the changes.

Additionally, client.js is a self-contained ModuleLoader bundle; the maintainer can regenerate it from client/ using pnpm run build:client.

Links

  • Plugin Directory Page: https://www.skillhub.cn/plugins/ADVeRTs13/dsh-auto-model-router
  • GitHub: https://github.com/ADVeRTs13/dsh-auto-model-router