Introduction

In the agent loop of DeepSeek Harness (DSH), when an agent sends a request containing images to a model that does not support images, a mechanism is needed to route such requests to an image-capable model. The dsh-ds-vision-auto-route plugin handles this process through the agent/request waterfall in the agent loop, ensuring that image-bearing requests are correctly dispatched.

Plugin Positioning

Name: dsh-ds-vision-auto-route
Maintainer: litianshuo110
Core value: Routes image-bearing requests to a configurable image model in DeepSeek Harness.

Core Features

The plugin operates inside the agent loop and uses the llm-vision-route service to determine whether routing is required. It primarily handles the following:

  1. Smart routing: The request is routed to an image model only when the request contains images and the currently selected model does not support image input. The selected model itself remains unchanged; only text-only requests are replaced.
  2. Logging: Records the replacement operation in the request headers and appends an llm-vision-route/route record containing turn, step, policy, and routing information.
  3. Policy support: Provides the routePolicy configuration option, supporting three modes: turn-image (route only when the current turn contains images), any-image (route as long as images are present in the logs), and off (disable routing).
  4. Parameter cleanup: When routing a request, the reasoningEffort parameter is dropped because the backend model may not support it, while sampling values remain unchanged.

Installation and Configuration

Installing the plugin requires using DSH’s plugin management commands.

Installation

dsh plugin --profile web add github:litianshuo110/dsh-ds-vision-auto-route

Configuration

The plugin is enabled through a YAML configuration file and mainly contains three optional keys:

  • visionProvider: Specifies the provider route for the image model.
  • visionModel: Specifies the exact image model name.
  • routePolicy: Specifies the routing policy; the default is turn-image.

Configuration example:

- name: 'dsh-ds-vision-auto-route'
  config:
    visionProvider: deepseek-official
    visionModel: deepseek-v4-flash-vision-exp
    routePolicy: turn-image

Status and Compatibility

Important note: This plugin is marked as deprecated. Starting with DeepSeek V4.1 Flash, released on September 10, 2026, the model natively supports multimodality (inputModalities: ['text', 'image']). DeepSeek Harness 0.1.5-rc.2 and later have this feature built in, so this plugin is no longer required. The GitHub repository has been archived.

In terms of compatibility, the plugin’s effective behavior depends on the runtime environment:

  • Source Harness: When running pnpm dsh web directly, the image admission step consults the plugin’s llm-vision-route service, automatically routing image requests.
  • Release Harness: When using the globally installed @deepseek-ai/dsh (dsh web), host-level image admission may reject image prompts for text-only models before the plugin intervenes. Therefore, in a release environment, installing this plugin alone may not be sufficient to automatically route images; manually switching models may still be required.

Known Limitations

  1. Model selection does not change: Whether or not routing occurs, the model selector in the Web interface always displays the model initially selected by the user.
  2. Historical image projection: Under the turn-image policy, after an image-bearing turn, subsequent text-only turns replace historical images with placeholder text until images are attached again.
  3. No provider failover: The configured fallback route must be a registered and image-capable route. If the configuration is incorrect, the request directly reports an INVALID_REQUEST error instead of silently dropping images.
  4. Catalog metadata determines capability: Whether routing applies to a model depends on its catalog metadata (inputModalities). Models that do not declare image input capability are treated as text-only models and are therefore routed.

Summary

dsh-ds-vision-auto-route provides an early solution for handling multimodal requests in DeepSeek Harness, supporting flexible image processing logic through logging and routing policies. However, due to the native multimodal support of DeepSeek V4.1 Flash, the plugin is no longer necessary. In older versions or specific source-code development environments, it can still be used as routing middleware.