anomalyco / anomalyco/opencode

unsupportedParts() "Inform the user" instruction overrides system prompt, preventing fallback to vision MCP for non-vision models

Open
#40,495 1 comment 0 reactions 1 assignee View on GitHub

@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_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
  1. Configure a vision MCP server (e.g. kimi-vision-mcp)
  2. 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"
  3. Use a non-vision model (e.g. deepseek-v4-pro)
  4. Paste a clipboard image via Cmd+V in opencode
  5. Observe: model ignores system prompt and outputs "I can't view images directly" or similar
Screenshot and/or share link
Image
Operating System

macOS 15 (Apple Silicon)

Terminal

iTerm2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.