How to Use ModLens? Give DeepSeek Harness Text-Only Models Sight
ModLens is the first vision plugin for DeepSeek Harness, giving text-only models "eyes": paste an image into the chat and the model reads it through the native modlens_read_image tool, returning structured JSON evidence.
ModLens is maintained by liustack under the MIT license, targeting text-only models in DeepSeek Harness (DSH) such as DeepSeek and GLM. Those models cannot read images natively, so ModLens converts an image into structured OCR, layout, and semantic information before handing it to the model.
What problem does ModLens solve?
Text-only models have no vision: given an image they either error out or ignore it. The old workaround is saving the image to a file and passing a path, but a text-only model still cannot "see" that path.
ModLens reduces this to paste-and-read: once an image is pasted, the native modlens_read_image tool turns it into structured JSON evidence with OCR text, layout, and semantics, letting the model understand the content (source).
How to install ModLens?
Installation is a single command using DSH's plugin management:
dsh plugin --profile web add github:liustack/modlens
To update, run the same command again. The command pins an explicit version instead of @latest to avoid pnpm 11's delay on releases published within the last 24 hours.
How to choose between the two paste modes?
ModLens supports two modes; pick based on the situation:
- Direct paste: the image lands as a temp file with its path in the composer — good when you treat the image as an attachment.
- Select a
(modlens vision)model entry: the thumbnail stays in the message and is converted at request time — good when you want to keep seeing the image in the conversation.
Both modes trigger modlens_read_image; they differ only in presentation and conversion timing.
Which model routes does ModLens wrap?
ModLens auto-discovers every provider route carrying text-only DeepSeek or GLM models and appends a wrapped entry per route (e.g., DeepSeek-V4-Flash (modlens vision)), remembering your choice.
It only wraps models whose metadata positively confirms text-only, auto-excludes vision models, and leaves unconfirmed ones untouched — so vision models keep their native paste behavior.
Where are the config docs and output contract?
ModLens ships three kinds of docs for customization and troubleshooting:
- Configuration:
skills/modlens/references/configure.md - Output contract:
docs/output-schema.md(defines the OCR, layout, and semantic fields) - Security:
docs/security.md(explains image-handling safeguards)
Notes and limitations
- ModLens is built with TypeScript and requires Node.js.
- It targets text-only models; vision models neither need nor should use ModLens.
- Report issues via GitHub Issues; author liustack announces releases on X (Twitter).
- A companion ModSearch web tool offers extra visual search as a complement.
See more DSH plugins in the plugin hub.
FAQ
ModLens pins an explicit version instead of @latest because pnpm 11 holds back releases published within the last 24 hours, so @latest could resolve to an older version. Run the same command again to update.
Direct paste lands the image as a temp file with its path in the composer; selecting a (modlens vision) entry keeps the thumbnail in the message and converts at request time. Both trigger modlens_read_image — the difference is presentation and conversion timing.
No. ModLens only wraps routes whose metadata positively confirms text-only DeepSeek or GLM models, auto-excludes vision models, and leaves unconfirmed ones untouched, so native paste stays intact.