Preface¶
DeepSeek Harness (DSH)’s primary conversational models are predominantly text-based and cannot directly read images pasted into chats. The common approach involves first saving the image as a file, then passing the path to the model or opening a separate multimodal pipeline. This process is cumbersome and can easily disrupt the context.
ModLens is a visual plugin within the DSH ecosystem, maintained by liustack and open-sourced on GitHub (MIT License, approximately 3600 stars). It processes pasted images through an independent visual engine, then organizes OCR, layout structure, and semantic information into structured JSON evidence for the text model. This allows text-only models like DeepSeek and GLM to answer questions based on image content.
What is this¶
ModLens (@liustack/modlens) is positioned as: adding visual capabilities to text-only coding agents. Within DSH, it is a standalone plugin; in other harnesses (Claude Code, Codex, OpenCode, Pi, etc.), it corresponds to a skill directory.
The plugin does not modify the harness’s core configuration and does not rely on local proxy processes. Uninstallation is simply a matter of deleting the corresponding directory to restore default behavior.
Core Features¶
Direct Image Pasting¶
After installation, simply paste an image or drag-and-drop a path into the conversation to trigger it. The image is sent to the visual engine via the modlens_read_image tool, returning structured evidence instead of relying on the model to guess the content of the image.
The evidence includes complete transcribed text, layout regions arranged in reading order, and a list of entities and relationships. Once an image is pasted once, follow-up questions do not require pasting it again.
Two Pasting Paths¶
In DSH, there are two interaction methods for pasting images:
- Direct Paste: The image first goes to a temporary file, the path enters the input box, and then
modlens_read_imagetakes over processing. This is consistent with the default behavior in harnesses like OpenCode and Pi. - Select
(modlens vision)Model: Choose an entry with the(modlens vision)suffix in the model selector (e.g.,DeepSeek-V4-Flash (modlens vision)), then paste the image. The thumbnail will remain in the message, and it will be converted to structured evidence when the request is made.
The plugin automatically discovers eligible text-only DeepSeek, GLM, and MiMo Pro models on each provider’s route and adds wrapper entries for each route. Models confirmed to have native visual capabilities will not be overridden.
Multi-Engine & Failover¶
ModLens is not tied to a single visual service. It includes six built-in providers and can reuse the existing login states of four local agent CLIs, totaling ten visual sources. Built-in providers include:
| Provider | Requirements | Time per Read | Use Case |
|---|---|---|---|
gemini-api |
Free Gemini API key | ~5–10 seconds | Recommended default |
openai |
OpenAI-compatible endpoint (key + baseUrl + model) | ~5–10 seconds | qwen-vl, GLM, self-hosted gateways |
anthropic |
Anthropic API key | ~5–10 seconds | Environments with existing keys |
antigravity-cli |
Free agy CLI, login once via browser, no key needed |
~15–45 seconds | When you don’t want to register for an API |
Multiple keys separated by commas will rotate upon authentication, rate-limiting, or quota failures; other types of errors will skip the remaining keys, following the original provider’s failover logic.
In DSH, you can also switch engines via the ModLens card in Settings → Plugins → Plugin config, and enable the auto mode to reuse eligible local CLIs. Changes take effect immediately after saving.
Installation & Setup¶
Installing in DeepSeek Harness¶
The current version is 3.25.0, requiring Node.js >= 22.19. Run the following in the terminal:
npx -y @deepseek-ai/dsh plugin --profile web add @liustack/modlens@3.25.0
For installation and update details, see the repository documentation: docs/harness-setup.md.
Configuring the Visual Engine¶
Zero configuration is required to start: if your local machine already has login states for Claude Code, Codex, OpenAI, or Pi, the installation process will ask whether to reuse them. The health check will report currently available engines.
If the health check returns empty, you can choose any of the following methods:
- Apply for a free Gemini API key at Google AI Studio (takes about three minutes, no credit card required).
- Install the Antigravity CLI and log in:
curl -fsSL https://antigravity.google/cli/install.sh | bash
agy
Exit after the login is complete. agy serves as a free channel and does not require an API key.
Installing in Other Harnesses¶
Send the following message to your local AI, instructing it to complete the installation and health check according to INSTALL.md:
Install and configure the modlens skill following https://github.com/liustack/modlens/blob/main/INSTALL.md, then run the health check and tell me the result.
Typical Usage¶
After installation, you can start a conversation directly without any extra commands. The typical flow is:
- Paste a screenshot, photo, or design draft into the chat window, or drag in a local image path.
- Ask a question in natural language, such as “What is the error message in this image?” or “What is the sum of the numbers in the third column of the table?”.
- The plugin automatically calls the visual engine, injects the reading results as structured JSON evidence into the context, and the text model answers based on that.
If you need a screenshot shortcut key, you can use the standalone plugin dsh-screenshot.
Applicable Scenarios & Notes¶
Who is it for
- Users of DSH who rely on text-only models like DeepSeek or GLM but need to analyze screenshots, scanned documents, UI design drafts, or error interfaces.
- Users who want a one-time installation that can be reused across multiple harnesses without modifying the core configuration of any harness.
- Users who already have Gemini, OpenAI-compatible, or Anthropic keys, or are willing to use the free Antigravity CLI as the visual backend.
Precautions before use
- The plugin runs with the permissions of the current DSH process, and images are sent to the configured visual engine. Before installation, please read the source code and SECURITY.md to ensure the engine selection and data processing methods meet your security requirements.
- Different engines have significantly different reading times (approximately 5 seconds to 45 seconds). You can switch engines in the settings page based on the scenario.
- The SkillHub community directory (skillhub.cn) is maintained by the community and is not officially affiliated with DeepSeek / High-Flyer. Plugin versions are based on npm and GitHub releases.
Conclusion¶
ModLens chains together “paste image → structured evidence → text model answers,” allowing text-only models to gain visual capabilities without modifying the harness’s core. For plugin details or to submit an issue, visit the community directory page and GitHub repository:
- Directory Page: https://www.skillhub.cn/plugins/liustack/modlens
- GitHub: https://github.com/liustack/modlens