Skip to main content

How to use picturereader

Adds visual document reading capability to the text-only DeepSeek Harness model: visual twin receives native thumbnails, local pixel tool with three-mode routing and optional external vision endpoint, image data can remain entirely local.

This article is auto-derived from indexed fields (wiki / faq / compatibility_json), not freshly AI-generated.

This article is derived from the plugin's already-indexed fields (wiki / faq / compatibility_json / readme), not freshly generated by AI. Source field is noted at the end of each section.

Quick start

picturereader

— source: plugin_wiki.wiki_content

Install & verify

dsh plugin --profile web add picturereader

Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.

— source: plugins.install

Key points

  • Proxy 原位包装:对被勾选的模型所属 provider,用 Proxy 把其 adapter 包装成「孪生」并原位替换(registerTwinAdapters,卸载经 ctx.effect 还原),不重复注册。
  • listModels / resolveModel:对被勾选模型声明 inputModalities: ['text','image']、名称加「(视觉)」后缀 → DSH 认为它支持图片 → 原生缩略图渲染、图片块进会话、粘贴准入全部解锁。
  • 隐私模式下分析只走本地工具,绝不外发。
  • 绝不调用任何外部视觉端点,即使你在设置卡配了 API。
  • 约束是 host 侧强制:runtime.js 使 isVlmConfigured() 恒为 false,vision_analyze 强制 include_vlm=false,视觉孪生 stream 的降级文本也明确"只用本地工具"。

— source: plugin_wiki.readme_en (fallback readme_raw)

FAQ

Is it necessary to install Python or LibreOffice to use it?

Not required. The built-in Windows OCR engine works out of the box; only PaddleOCR, RapidOCR, and document-to-image dependencies require running scripts/setup-*.mjs first to create a Python venv. See source code README.md:144-159 / src/index.js full text.

Does privacy mode really not call external APIs? How is this guaranteed?

Privacy mode is a host-side hard gate: src/runtime.js makes isVlmConfigured() return false in this mode, vision_analyze forcibly sets include_vlm to false, and the image bridge guide also states 'use local tools only'. Even if baseURL/Key are filled in the settings card, image bytes will not be sent out. src/runtime.js:24-127 / README.md:62-66.

After use, to uninstall the plugin cleanly, what needs to be done?

Use dsh plugin command to remove entries. The plugin stores exported images in ~/.dsh/picturereader-vision/images/ and writes sections under its namespace in ~/.dsh/settings.yaml. To completely clean up, manually delete the above directories and remove the picturereader section from settings.yaml (README.md:269-276, src/picturereader-vision.mjs:21-22).

Visual twin checked but no response, how to troubleshoot?

Changes to vision_models do not hot-reload, DSH desktop must be restarted (README.md:218-222, 274-275); and when mode is set to code, the plugin still works but must be called via await tools.image_scan(...) programmatically rather than directly invoked.

WebP images report errors when passed in, what to do?

Convert to PNG or JPEG before passing. Source code src/core.js:316 explicitly lists .webp in UNSUPPORTED_EXTENSIONS and throws an error directly; image_scan/image_ocr/image_batch/document_to_image all follow the same rule. src/core.js:316 / src/image-batch.js:297-301.

Is vlm_key in the config file secure?

The field is declared as role:'secret', and the code only writes and never reads or echoes back; you can use vlm_key_env to let the plugin read from your specified environment variable name, so credentials no longer enter the y file. src/index.js:74-78, src/config.js:62-69.

Will visual twin affect all provider models?

No, picturereader visual twin only takes effect for the models checked in the vision_models list, and uses a Proxy to modify their provider's adapter into a 'twin'; unchecked models are not affected. src/picturereader-vision.mjs:108-163.

What is the maximum size for a single image?

Tool layer hard cap is 50 MB, 24,000,000 decoded pixels; DSH attachment upload side is about 5 MB, oversized images will be blocked by the host. You can first use image_crop to cut the image or reduce resolution before transmitting. src/tool.js:19-21, src/image-batch.js:297-314.

— source: plugin_wiki.faq_json

Compatibility

  • DSH: 0.1.0-rc.6+(peerDependencies 声明 @deepseek-ai/dsh-settings ^0.1.0-rc.6、@deepseek-ai/dsh-llm ^0.1.0-rc.6)
  • Node: ^22.19 || >=24(engines.node 字段)

— source: plugin_wiki.compatibility_json

Pitfalls

Review the upstream repo before installing. This guide is auto-derived from indexed fields and may lag the latest release. If anything contradicts the official docs, treat the upstream source as authoritative.

— source: general rule