Give text-only, cost-effective opencode models (e.g.
deepseek-v4-flash) the ability to see images by delegating analysis to themimo-v2.5vision subagent — no extra plans needed, the built-in opencode-go plan suffices.
- Cost-effective text models, upgraded with vision. Main models such as
deepseek-v4-flash— pure-text, extremely cost-effective models from the opencode-go plan — cannot understand images on their own. - Vision via subagent. This project uses opencode's subagent mechanism to give those
text models "eyes": when the main model needs to analyze an image (screenshot, UI design,
game frame, a pasted picture, etc.), it delegates the task to the
visionsubagent (vision modelmimo-v2.5) via thetasktool, which reads the image and returns a description. - No extra plans required. Everything works with the opencode-go plan you already have; no additional subscription or model package is needed.
- The main model encounters an image (a file path or a pasted picture).
- It calls the
tasktool withsubagent_type="vision", passing the image path. - The
visionsubagent reads the image with theReadtool and returns a detailed description. - The main model integrates the analysis result into its answer.
| File | Purpose |
|---|---|
opencode.json |
Declares that mimo-v2.5 under opencode-go supports image input |
vision.md |
Definition of the vision subagent (read-only, image analysis only) |
vision-image-handler.ts |
Pasted-image plugin: saves pasted images into .opencode/tmp/vision/ and injects text guidance for the main model to delegate to the vision subagent |
Ask opencode to install it in a single sentence, e.g.:
Install the
visionsubagent and the pasted-image plugin from this repository.
opencode will copy vision.md → ~/.config/opencode/agent/vision.md,
vision-image-handler.ts → ~/.config/opencode/plugins/vision-image-handler.ts, and merge the
provider.opencode-go block of opencode.json into ~/.config/opencode/opencode.json for you.
Then quit and restart opencode.
- Copy
vision.md→~/.config/opencode/agent/vision.md - Copy
vision-image-handler.ts→~/.config/opencode/plugins/vision-image-handler.ts - Merge the
provider.opencode-goblock fromopencode.jsoninto~/.config/opencode/opencode.json(keep the existing$schema,provider.deepseek,mcp, and other fields) - If global plugins are loaded as npm-style plugins, make sure
@opencode-ai/pluginis in thedependenciesof~/.config/opencode/package.json(skip if it already exists) - Exit and restart opencode for the config to take effect
- Image files: when the main model sees an image path, call the
tasktool withsubagent_type="vision"and pass the full image path. - Pasted images: after the user pastes an image, the plugin saves it to disk and injects
delegation guidance, so the main model calls the
visionsubagent accordingly. - It is recommended to add the following conventions to your project
AGENTS.md:- When an image needs to be analyzed, do not read it directly with the
Readtool (the raw bytes are not understandable); - Use the
tasktool to call thevisionsubagent with the full image file path.
- When an image needs to be analyzed, do not read it directly with the
The screenshots below show the flow: 1.png is an example of a pasted image, and 2.png
shows the text-only main model (here DeepSeek V4 Flash) delegating to the Vision Task
subagent and returning the description.
- The model ID
opencode-go/mimo-v2.5invision.mdmust match the actual ID underopencode-go(run/modelsinside opencode to confirm; if it differs, update the model ID invision.md). - The image storage directory
.opencode/tmp/vision/is ignored by each project's.gitignoreand never enters the repository.

