Preface¶
In the plugin-based architecture of DeepSeek Harness (DSH), when you need to integrate multiple model providers or implement automatic switching for specific scenarios, manual configuration is often inefficient. The following section introduces a plugin designed to simplify this process through automatic classification and routing.
Plugin Purpose¶
dreamzhongju/dsh-smart-model-router is a DSH plugin package maintained by DreamZhongJu, intended to provide intelligent model routing. It can classify requests and route them to configured provider/model combinations, and also supports ordered technical failover.
Core Features¶
- Intelligent Routing and Classification: Distributes requests to predefined model configuration pairs based on request characteristics.
- Ordered Failover: Automatically tries backup models in sequence when the primary model is unavailable or returns an error, until it succeeds or all options are exhausted.
- Local Directory Reading: The plugin directly reads DSH’s local provider/model directory and does not perform network-based model discovery.
- Mode Control: When enabled in non-manual mode, DSH’s model selector is locked, and control is taken over by the configured routing rules.
- Credential Isolation: Credentials for all providers are stored in DSH’s credential service; the plugin itself does not hold or store any credential information.
Installation and Enabling¶
- Run the installation command:
dsh plugin --profile web add github:DreamZhongJu/dsh-smart-model-router
- Start DSH:
dsh --profile web
- Find Plugins in DSH’s settings interface and enable Smart model router.
- Refer to the
config.example.yamlfile for complete router configuration.
Typical Usage¶
The configuration file defines how requests are classified and which model they are routed to. After enabling the plugin, the system automatically handles request distribution according to the configuration, requiring no manual model selection (in non-manual mode).
Applicable Scenarios and Notes¶
- Intended Users: Enterprise-level and developer users who need to manage multiple model providers uniformly or want to automatically match models for specific tasks.
- Permissions and Security: The plugin runs within the permissions of the DSH process. Please inspect the source code and license (MIT) before installation.
- Network Limitations: Since it depends on the local directory, ensure DSH has been properly configured and has loaded the required model provider information.
Conclusion¶
By integrating into the DSH ecosystem, this plugin provides a standardized solution for model routing, suitable for scenarios requiring fine-grained control over model invocation strategies.