Introduction

The core design philosophy of DeepSeek Harness is plug-ins. When using the tool, switching between presets such as Standard, PTC, Minimal, or Cordis usually requires manual intervention. The dsh-auto-preset-router plugin addresses this pain point by introducing an “Auto” Agent Preset. It uses a classifier to automatically identify the user’s first intent and route it to the most suitable preset.

Plugin Positioning

This is a DeepSeek Harness plugin maintained by yhfgyyf. It classifies the user’s first prompt using the DeepSeek V4 Flash model, then automatically loads the corresponding preset based on the classification result. After installation, it does not modify settings.yaml; instead, it overrides the default behavior through its own plugin configuration.

Core Capabilities

  • Automatic classification: The plugin sends the user’s first prompt text and attachment metadata to the deepseek-v4-flash model for intent recognition.
  • Intelligent routing: Based on the classification result, it automatically switches to the Standard, PTC, Minimal, or Cordis preset.
  • Tool and skill selection: After routing is complete, the plugin makes a separate V4 Flash call to select potentially needed tool and skill names from a restricted catalog and appends them to the session. It does not load the specific contents of a Skill, nor does it modify the target preset’s tool prefix.

Routing Strategy

The classifier uses fixed parameters (no tools, reasoning effort disabled, temperature 0, output limited to 16 tokens) to make its decision. Its routing logic is as follows:

Target Preset Applicable Scenarios
standard Web/current information lookup, mixed non-programming work, general assistance, full tool ecosystem, or ambiguous classification results.
code Any code repository analysis, programming tasks, and broad batch/parallel tool orchestration.
minimal High-demand self-contained reasoning, mathematical or algorithmic analysis, without involving repositories or programming work.
cordis Non-programming DSH presets, Cordis concepts, or runtime work.

Note: In some versions, the code preset may be called ptc. In that case, the classifier’s code result will automatically mount the ptc preset.

Installation and Enablement

This plugin requires DeepSeek Harness 0.1.1-rc.1 or a compatible version. Before installing, make sure that @deepseek-ai/dsh-agent-presets and @deepseek-ai/dsh-skill-filesystem (as optional dependencies) are installed.

Web-side installation:

dsh plugin --profile web add github:yhfgyyf/dsh-auto-preset-router
dsh web

TUI-side installation:

dsh plugin --profile tui add github:yhfgyyf/dsh-auto-preset-router
dsh --profile tui

After installation, the default preset is set to auto. If you need to manually override it, you can explicitly specify the following in settings.yaml:

agent-presets:
  default: auto

Notes

  • Privacy and data: The classifier only receives prompt text and attachment metadata (name, size, media type); it never sends image byte data.
  • Long-text handling: If the prompt exceeds 24,000 characters, the system only takes the beginning and ending parts for classification.
  • Fault tolerance: If classification fails or the result is ambiguous, the system automatically falls back to the standard preset.
  • Session locking: The classification process generates diagnostic logs but does not modify settings.yaml. Existing sessions record the routing result and lock to the selected preset before the first real turn.

Summary

dsh-auto-preset-router reduces the configuration overhead for users in daily DSH usage by automating the classification process. It does not change the underlying logic of DeepSeek Harness; it exists only as a routing layer.