Preface

The ecosystem design of DeepSeek Harness (DSH) emphasizes that everything is a plugin. In model inference scenarios, it is often necessary to dynamically switch models based on request type (code, vision, long-form text), or to balance models with different cost/performance profiles. The dsh-auto-router plugin provides a synthetic Provider that delegates requests to concrete models under an existing Provider route.

Plugin Introduction

  • Name: chaoyuzhang001/dsh-auto-router (package name: @chaoyuzhang/dsh-auto-router)
  • Maintainer: ChaoYuZhang001
  • Core Function: Registers a synthetic Provider that uses local text analysis to delegate requests to concrete models on a target route.

Feature Description

The plugin registers an “Auto Router” provider in the model selector, containing six options:
* Auto · Smart Routing: Uses the default classifier for smart routing.
* Auto · Fast: Forces use of the light tier.
* Auto · Balanced: Forces use of the medium tier.
* Auto · Deep: Forces use of the heavy tier.
* Auto · Code: Forces use of the code tier.
* Auto · Vision: Forces use of the vision tier.

The default classifier logic is as follows:
* Image requests -> vision
* Code-related requests -> code
* Longer or deeper tasks -> heavy or medium
* Short requests -> light

By configuring sticky: true, a session only escalates its tier during a task, avoiding frequent oscillation between different models.

Installation and Configuration

The plugin is installed via the DSH Community Market or controlled plugin commands. After installation, the inserted auto-router line must be overridden in the configuration file.

Prerequisites:
* The target Provider must already exist.
* Node.js version >= 22.13.0.
* DSH version must be rc.7-compatible.

Configuration Example:

- id: auto-router
  config:
    providerId: auto
    displayName: My Auto Router
    targetProvider: my-openai-gateway
    tiers:
      light: fast-model
      medium: balanced-model
      heavy: reasoning-model
      code: coding-model
      vision: vision-model
    sticky: true
    mediumThreshold: 300
    heavyThreshold: 1200
    contextWindow: 262144
    defaultMaxTokens: 32768

The default configuration expects a route named ciyuan2api to exist, containing the following model IDs:
gpt-5.6-luna, gpt-5.6-terra, gpt-5.6-sol, kimi-k2.7-code, gemini-3.5-flash.

Use Cases and Notes

  • Permissions and Security: The plugin checks recent user text locally to select the target model and does not store, read, or transmit API keys. Keys remain part of the target Provider’s normal DSH settings. There is no telemetry, lifecycle scripts, or external endpoints.
  • Dependencies: Requires @deepseek-ai/cordis ^4.0.1, @deepseek-ai/dsh-llm ^0.1.0-rc.7, @deepseek-ai/schemastery ^3.18.1.
  • License: MIT.

Conclusion

dsh-auto-router provides DSH with a standardized model routing solution. Through a synthetic Provider and local classification logic, it simplifies the configuration process for multi-model orchestration. More details are available in the GitHub repository.