تخطى إلى المحتوى الرئيسي

ModLens for DeepSeek Harness

ModLens for DeepSeek Harness
Text-only models can't see a screenshot on their own. modlens fixes that by turning a pasted image into structured JSON for OCR and layout.

A screenshot often contains the evidence needed to fix a UI bug, but a text-only coding model cannot inspect those pixels by itself. The modlens DeepSeek Harness plugin routes a pasted image to a configured vision engine and returns structured JSON containing OCR, layout, semantic, and visual information. The coding model can then reason over that intermediate result. This adds a vision bridge to a text-first workflow; it does not turn the underlying model into a native multimodal model or make visual interpretation infallible.

Giving a Text-Only Model Real Vision

Plugin quick facts

ItemDetail
Verified package@liustack/modlens@3.26.1
Publisherliustack
DSH toolmodlens_read_image
OutputStructured evidence JSON for text-only model routes
ConfigurationDSH profile patch plus ~/.modlens/config.json
Documentation reviewedSeptember 16, 2026

Setup and first check

Pin the verified package in a test profile, restart DSH, and confirm the installed entry:

npx -y @deepseek-ai/dsh plugin --profile web add @liustack/modlens@3.26.1
npx -y @deepseek-ai/dsh plugin --profile web list
npx -y @deepseek-ai/dsh --profile web --dump-config

Select a text-only route exposed as a ModLens vision variant, paste one non-sensitive screenshot, and inspect the returned JSON before changing code. The bridge turns an image into evidence for the model; it does not make the upstream model natively multimodal.

The host remains in developer preview. Pin the working DSH release and recheck the ModLens bridge before changing versions.

ModLens can intercept an image paste for a model whose metadata identifies it as text-only. One route stores the pasted image as a private temporary file and gives the plugin its path. Another route presents a wrapped model entry marked for ModLens vision, keeps the thumbnail in the message, and converts the image before the request reaches the underlying text model.

The vision work is performed by a separate engine. It may be an API provider or an approved local agent CLI with image support. The result returns to the coding conversation as structured evidence. That separation matters for three reasons:

  • The original text model is still responsible for coding and reasoning.
  • Image access, quota, latency, and data handling depend on the selected vision route.
  • A failure can occur before the coding model sees any usable image evidence.

Native vision models are not meant to be wrapped automatically. Routing should affect only models confirmed as text-only. If model metadata is unclear, leave the native paste path unchanged rather than forcing a bridge onto a possibly multimodal route.

For a first test, use a non-sensitive screenshot with a visible heading, one form control, a small error message, and a clear layout. This makes it easier to compare the structured result with the source image.

How the Paste-an-Image-to-JSON Bridge Works

Each successful read returns one JSON object. It identifies the image input and provider, then separates the interpreted result from run metadata. The result schema includes:

FieldWhat it can carry
summaryA concise account of the image
ocrFull text plus optional per-line language data
layoutReading-order regions such as title, list, table, form, code, or image
semanticsScene, intent, entities, evidence, and relationships
visualColors, style, and visual notes when available
uncertaintyItems the vision engine could not establish confidently

Run metadata can show which provider handled the request, how long it took, which routes were attempted, and whether a fallback or reused quota was involved. The plugin validates the JSON shape before returning it. A structurally broken result can move to another configured route instead of reaching the coding model as valid evidence.

The schema deliberately omits numeric confidence scores and pixel bounding boxes. A vision model can invent precision that the image does not support. Reading-order regions and quoted OCR text are easier to inspect honestly than coordinates that appear exact but were never measured.

Pasting once can support later questions about the same image within the active context. For repeated or long-running work, still name the screenshot and task explicitly so evidence from two similar interfaces is not mixed.

Coding and Design Tasks This Actually Helps With

The bridge is useful when the next coding action depends on visual facts that can be represented in text:

  • UI debugging: identify visible error text, disabled controls, missing labels, and unexpected component order.
  • Implementation planning: translate a reference screen into regions, components, content hierarchy, and responsive questions.
  • Accessibility review: inspect reading order, label presence, contrast concerns, and image-only controls before checking the actual DOM.
  • Design comparison: describe changes between two screenshots without treating either image as the source code.
  • OCR-assisted repair: recover a stack trace, configuration value, or terminal output captured only in an image.

A strong request asks for both evidence and action. For example: “Extract the exact visible error, list the affected UI region, mark uncertain text, then propose the smallest code area to inspect.” The agent should not jump from a screenshot to a broad rewrite when the image only supports a narrow observation.

For design implementation, use the JSON as a planning artifact. Verify dimensions, tokens, assets, component behavior, and responsive rules in the actual design system or codebase. A screenshot shows one state at one viewport, not the complete interaction contract.

Where Modlens's Output Still Needs a Human Check

OCR can confuse small text, icons, code punctuation, overlays, and compressed screenshots. Layout regions can preserve reading order without revealing the exact DOM structure. Semantic fields can describe likely intent while still missing an unusual product convention. Human review is most important before the agent edits code, files a defect, or sends an accessibility finding to another team.

Use a compact verification loop:

  1. Compare quoted OCR with the visible pixels.
  2. Check that the reported reading order matches the interface.
  3. Review every item in the uncertainty array.
  4. Separate observed facts from inferred purpose.
  5. Confirm any code change against the DOM, styles, tests, and product requirements.

Image privacy is another boundary. ModLens can recover pasted image bytes from local session storage and may send the image to a configured vision service. Do not paste credentials, private customer records, unreleased designs, or regulated data unless the selected route and account are approved for that material. A screenshot can leak information through background tabs, notifications, filenames, and browser chrome even when the intended region looks harmless.

Frequently Asked Questions

Does ModLens make a text-only model natively multimodal?

No. A separate vision engine interprets the image and returns structured evidence. The text-only model reasons over that result rather than processing the original pixels natively.

What information is included in the JSON result?

The result includes a summary, OCR, reading-order layout regions, semantic details, visual notes, and an uncertainty list. Run metadata can also identify attempts, warnings, duration, and provider routing.

Should I let the agent change code from the JSON alone?

Use the JSON to narrow the investigation, then compare it with the image and inspect the relevant code or DOM. Human confirmation is especially important for small text, visual meaning, accessibility findings, and destructive changes.

Next Step

Evaluate the Vision Bridge Before Adding It to Verdent Work

Use one sanitized screenshot and define five facts the output must recover before the test begins. Score OCR accuracy, reading order, uncertainty handling, latency, and the quality of the resulting code investigation. Compare DeepSeek harness approaches with Verdent before treating image interpretation as a default step in the delivery loop.