Introduction¶
The core design philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When processing images with a vision model, the default adapter limits are fairly strict: the per-image pixel budget is usually only 640000 (about 800×800), and the maximum file size is limited to 4 MiB. This causes high-resolution images to be degraded during ingestion or transfer, which affects recognition accuracy.
dsh-highres-vision is a patch plugin that addresses this pain point. It mainly solves two problems: first, it relaxes the image acceptance and storage limits for the DeepSeek model family; second, it provides the highres_read tool for reading large images in chunks.
Plugin Overview¶
- Plugin name:
dsh-highres-vision - Maintainer:
azwosile - Category: Model inference
- License: MIT
- Core functionality: Enabled only for the DeepSeek model family, automatically raises the image budget, and provides a high-resolution chunked image reading tool.
Core Features¶
-
Restricted model scope
The plugin is enabled only for the DeepSeek model family. The detection logic is that the provider isdeepseek-official, or the model name containsdeepseek. For non-DeepSeek sessions, thehighres_readtool is automatically hidden, and other sessions are not affected. If detection fails, the default policy isallow. -
Automatic per-model image budget increase
On plugin load, it checks the DeepSeek model family configuration and automatically fills in the following fields:imagePixelBudget: 1690000(1300×1300 pixels)imageMaxBytes: 8388608(8 MiB)
These settings are written into thellm-deepseeknamespace insettings.yamland take effect without a restart.
-
Relaxed image limits
The plugin relaxes both the source acceptance limits and the normalization limits for images:- Source acceptance: 32 MiB per image, 8192 px per side, up to 600 images per request, and 64 MiB total inline size.
- Normalization: pixel cap of 8192×8192 (DSH default 2048×2048), long edge of 8192 px, and 16 MiB encoded bytes.
- Note: Relaxing acceptance limits alone is not enough. The plugin also handles normalization limits to prevent images from being re-compressed after ingestion.
-
High-resolution chunked image reading
The plugin registers thehighres_readtool. If the user sends a large image and the model does not call this tool, the system automatically locates the most recent user image in the session, generates “full image + ≤1300×1300 high-resolution chunks,” and injects them through the host’sread_image. Chunk overlap is configurable (default: automatic). The plugin does not override the host’sread_imagemethod.
Installation and Enabling¶
The plugin depends on a Node.js environment and the jimp library. Before installing, make sure the DSH kernel version is >= 0.1.2-rc.1.
- Clone the repository:
git clone https://github.com/azwosile/dsh-highres-vision.git
- Add the plugin:
dsh plugin --profile web add ./dsh-highres-vision
After installation, restart DSH Desktop once so that the bundle patch for relaxed acceptance limits takes effect.
Configuration Example¶
Add the following YAML structure to the DSH plugin configuration. modelImagePixelBudget needs to match tile.
- id: dsh-highres-vision
name: dsh-highres-vision
config:
deepseekOnly: true # 仅在 DeepSeek 系列模型下启用
unknownModelPolicy: allow # 判定失败时的策略:allow | deny
autoRaiseModelBudget: true # 是否自动抬升模型预算
modelBudgetScope: deepseek # 调整范围:deepseek | all
modelImagePixelBudget: 1690000 # 像素预算 (1300x1300)
modelImageMaxBytes: 8388608 # 最大字节 (8 MiB)
tile: 1300 # 分块边长
overlap: 0 # 0 为自动重叠
remind: true # 是否开启 pre-step 提醒
remindThreshold: 1300 # 提醒阈值
Self-check and Rollback¶
- Self-check scripts (can be run without installing the plugin):
node verify.mjs
node verify.mjs <样本目录>
node verify-kernel.mjs <内核树A> [内核树B] ...
Here, `verify-kernel.mjs` is used to compare against the host contract; exit code 0 indicates that no code changes are required.
- Rollback/uninstallation:
dsh plugin --profile web remove dsh-highres-vision
Notes¶
- Model support: This plugin is only applicable to DeepSeek vision models. Starting from 2026-09-10, the official name of the vision model is
deepseek-flash(DeepSeek-V4.1-Flash). The old name is still compatible, butdeepseek-v4-prodoes not officially support vision. - Configuration leftovers: The budget configuration written by the plugin is not automatically removed from
settings.yamlafter uninstallation; the corresponding fields must be deleted manually. - Kernel version: The minimum required kernel version is 0.1.2-rc.1.