anomalyco / anomalyco/opencode
unsupportedParts() "Inform the user" instruction overrides system prompt, preventing fallback to vision MCP for non-vision models
@jlongster is already working on this.
Since Aug 4, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
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_appendinmode.buildAGENTS.md(project-level instructions)oh-my-openagentagent promptopencode pluginwithexperimental.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_appendorAGENTS.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+Vin 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.