Introduction¶
The plugin architecture of DeepSeek Harness mounts different capabilities onto agents. For agents that can only process text, content within screenshots, charts, or photos cannot directly become reasoning input. dsh-image-reader provides a read_image tool visible to the model, allowing the agent to read images via an OpenAI-compatible vision endpoint and answer questions based on the image content.
Plugin Overview¶
dsh-image-reader is an MIT-licensed DSH plugin, repository owner is zcXie777, repository address is:
https://github.com/zcXie777/dsh-image-reader
Its core capability is exposing a read_image tool to DeepSeek Harness agents. The tool receives an image path within the workspace and optionally carries a question; subsequently, the plugin calls the configured vision interface to return the answer to the model.
Core Capabilities¶
dsh-image-reader provides the following verified capabilities:
- Provides a model-side
read_imagetool for DeepSeek Harness agents to call. - Reads images via any OpenAI-compatible vision endpoint.
read_imagesupports passing an image path and an optionalquery.- Supports the following configuration options:
provider.baseUrl,provider.model,provider.apiKeyEnv,lang,timeoutMs,maxImageBytes,allowedDirs. - The API key is read from environment variables on every call, not written to configuration.
- The input path is resolved via
realpathcombining the workspace andallowedDirsto prevent bypassing allowed directories via symbolic links. - Size limits and extension checks are performed before uploading images.
- Local verification passed:
npm run typecheck,npm run build,npm test(with 16 test cases).
Installation and Enablement¶
The runtime environment needs to meet:
Node engines: ^22.19.0 || >=24.0.0
Peer dependencies: @deepseek-ai/cordis ^4.0.1 and @deepseek-ai/dsh-tools ^0.0.1-rc.1
First, clone the repository and build once. The lib/ directory is not committed to the repository, so you need to execute npm run build after cloning.
git clone https://github.com/zcXie777/dsh-image-reader.git
cd dsh-image-reader
npm install
npm run build # lib/ is not committed; build once after cloning
cd ..
dsh plugin --profile web add "$PWD/dsh-image-reader"
dsh plugin --profile headless add "$PWD/dsh-image-reader"
dsh --profile web --dump-config | grep image-reader
After installation, if the Web profile is running, you need to restart that profile.
Configuration Description¶
provider.baseUrl and provider.model are required fields. The plugin does not preset specific vendors; users need to fill in the corresponding vision service base URL and model name in the profile patch row.
Below is a configuration example:
- id: image-reader
config:
provider:
baseUrl: "https://vision.example.com/v1"
model: "your-multimodal-model"
apiKeyEnv: "VISION_API_KEY"
lang: "zh"
timeoutMs: 60000
maxImageBytes: 10485760
allowedDirs: []
Before starting the profile, you need to put the API key into an environment variable first:
export VISION_API_KEY=sk-...
The meaning of each configuration item is as follows:
provider.baseUrl: Base URL of the OpenAI-compatible vision endpoint, required.provider.model: Multimodal model name, required.provider.apiKeyEnv: Environment variable name storing the API key,VISION_API_KEYis used in the example.lang: Answer language, supportszhoren.timeoutMs: Timeout for the entire request, unit milliseconds.maxImageBytes: Maximum encoded byte count allowed for a single image.allowedDirs: List of additional directories allowed to be read; the workspace itself is allowed.
Typical Usage¶
In a conversation, you can let the agent call read_image, specifying the image path and an optional question:
read_image image="screenshot.png" query="What error is shown in this dialog?"
If you only need to read the image and let the model answer follow-up questions based on the image content, you can pass only the path:
read_image image="diagram.png"
Applicable Scenarios and Notes¶
Suitable for scenarios where DSH agents need to directly view images in the workspace, such as reading content from screenshots, charts, or photos, and answering questions around that image.
Note the following points before use:
- This plugin has not yet completed end-to-end verification against a real live vision endpoint. Local testing covers request/response logic for mock fetch, but before relying on a real vision service, it is recommended to perform a smoke test first with a real
VISION_API_KEY. - The plugin will run under the permissions of the current DSH process. It is recommended to check the source code and MIT license before installing.
- The API key is read from environment variables on every call, not stored in configuration.
- The input path is resolved to within the workspace and
allowedDirsviarealpath; symbolic links cannot bypass allowed directories. - Size limits and extension checks are performed before image upload.
- After installation, the running Web profile needs to be restarted.
- Node engines:
^22.19.0 || >=24.0.0, and peer dependencies:@deepseek-ai/cordis ^4.0.1,@deepseek-ai/dsh-tools ^0.0.1-rc.1are required.
Conclusion¶
The value of dsh-image-reader is focused: adding a read_image tool to text-only DeepSeek Harness agents, allowing them to read workspace images via an OpenAI-compatible vision endpoint and answer questions. It is installed via dsh plugin, with the key configuration points being provider.baseUrl, provider.model, and the API key environment variable.
Repository address:
https://github.com/zcXie777/dsh-image-reader
The DSH Community Directory is an independent site used to discover such plugins; do not interpret the directory page as the official app store for DeepSeek or Huanshan.