Description
When using a non-vision model (e.g. deepseek-v4-pro), pasting an image causes unsupportedParts() in packages/opencode/src/provider/transform.ts to replace the image with:
ERROR: Cannot read clipboard (this model does not support image input). Inform the user.
The trailing "Inform the user." is treated by the LLM as a high-priority instruction. Even when the system prompt (via prompt_append or AGENTS.md) explicitly instructs the model to handle images via a workaround (pngpaste → vision MCP), the model always responds with "I can't see images" instead.
What we tried to override this (all failed):
prompt_append in mode.build
AGENTS.md (project-level instructions)
oh-my-openagent agent prompt
opencode plugin with experimental.chat.messages.transform
Plugins
@zilliz/memsearch-opencode oh-my-openagent@latest
OpenCode version
1.18.12
Steps to reproduce
- Configure a vision MCP server (e.g. kimi-vision-mcp)
- Add to
prompt_append or AGENTS.md: "When you see 'ERROR: Cannot read clipboard', run pngpaste + vision_analyze_image instead of telling the user you can't see it"
- Use a non-vision model (e.g. deepseek-v4-pro)
- Paste a clipboard image via
Cmd+V in opencode
- Observe: model ignores system prompt and outputs "I can't view images directly" or similar
Screenshot and/or share link
Operating System
macOS 15 (Apple Silicon)
Terminal
iTerm2
Description
When using a non-vision model (e.g. deepseek-v4-pro), pasting an image causes
unsupportedParts()inpackages/opencode/src/provider/transform.tsto replace the image with:The trailing "Inform the user." is treated by the LLM as a high-priority instruction. Even when the system prompt (via
prompt_appendorAGENTS.md) explicitly instructs the model to handle images via a workaround (pngpaste→ vision MCP), the model always responds with "I can't see images" instead.What we tried to override this (all failed):
prompt_appendinmode.buildAGENTS.md(project-level instructions)oh-my-openagentagent promptopencode pluginwithexperimental.chat.messages.transformPlugins
@zilliz/memsearch-opencode oh-my-openagent@latest
OpenCode version
1.18.12
Steps to reproduce
prompt_appendorAGENTS.md: "When you see 'ERROR: Cannot read clipboard', run pngpaste + vision_analyze_image instead of telling the user you can't see it"Cmd+Vin opencodeScreenshot and/or share link
Operating System
macOS 15 (Apple Silicon)
Terminal
iTerm2