Introduction¶
DeepSeek Harness (DSH) uses a plugin architecture to extend model inference capabilities. Pure text models cannot directly process image inputs. The dsh-image-router plugin addresses this pain point: before the prompt is admitted, it uses the visual model you specify to convert images into text, enabling pure text models to receive image-aware context. The entire process does not change the session model selector, and the history only retains textual analysis results.
Installation and Prerequisites¶
The following conditions must be met before installation:
* DeepSeek Harness (DSH) 0.1.5-rc.1 or later must be installed
* The system environment must have Node.js ≥ 20
Run the following command to install and start it:
dsh plugin --profile web add dsh-image-router && dsh web
After installation, the dsh web process automatically loads the plugin. Configuration changes usually do not require a restart, but code-level updates do require restarting the process.
Core Features¶
- Automatic image-to-text conversion for prompt images: The plugin intercepts pasted or uploaded images, performs bypass analysis before the prompt is admitted, and replaces the image with a text description.
- Session model remains unchanged: The plugin does not modify the
modelorselectionfields. The model selector does not jump, and no[model changed]notice appears in the UI. - describe_image tool: Provides the
describe_image(file_path, question?)tool, allowing any model to analyze image files on the local disk. - Two ways to specify a visual model:
- Select an existing model: Choose an already configured image-capable model from “Settings → Model”.
- Custom endpoint: Fill in a custom API URL, model name, and API Key.
- GUI configuration, effective after saving: Configure it via “Settings → Plugins → Plugin Configuration → image-router”. Changes take effect immediately after saving.
- API Key not persisted to disk: The key is only written as a credential store reference. It is not echoed back, not written to configuration files, and not included in audit logs.
- Fail open: If the visual model call fails (for example, due to a timeout or error), the plugin preserves the original request and does not suppress the error.
- Audit file logging: Records mount status, the route used for each analysis, retry details, and failure reasons to facilitate troubleshooting.
- Test coverage: Includes 68 unit tests.
Typical Usage¶
- Configure the visual model: Open “Settings → Plugins → Plugin Configuration → image-router”. In the “Visual Model” dropdown, select an image-capable model (such as GPT-4o, Claude 3.5 Sonnet, etc.). If one is not already configured, switch to “Custom Endpoint”, fill in the relevant information, and click Save.
- Use the tool: In a conversation with any model, use the
describe_image(file_path, question?)tool. For example, enterdescribe_image('/path/to/image.png', 'What is this?')to have the current model analyze a local image. - Paste an image: Paste an image in the conversation, and the plugin automatically converts it into a textual analysis result.
Notes¶
- Version compatibility: The plugin requires DSH 0.1.5-rc.1+. Older versions (such as 0.1.0) may cause the “Settings → Model” page to fail to load.
- Node.js version: Node.js ≥ 20 is required.
- pnpm 11-specific issue: When using pnpm 11,
dsh-image-router@latestmay fail to install because of theminimumReleaseAgesetting. In this case, you must explicitly specify a version number, for exampledsh plugin --profile web add dsh-image-router@0.4.4.
Conclusion¶
By performing bypass processing on images before the prompt is admitted, this plugin makes pure text models compatible with visual capabilities. It supports command-line installation and provides comprehensive audit and tooling support, making it suitable for developers who need to handle image-related use cases with pure text models.