Skip to content

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

Description

@yang-neu

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions