Skip to content

#26668 — [BUG] Non-vision models fail even when user only sends text - TeamCode auto-reads clipboard images #917

@ElioNeto

Description

@ElioNeto

Description

Bug Description

When using a non-vision model (e.g., DeepSeek V4 Flash), users cannot send plain text messages because OpenCode automatically reads images from the clipboard and tries to send them to the model, even when the user hasn't attached any images.

Steps to Reproduce

  1. Configure DeepSeek V4 Flash model (non-vision)
  2. Copy an image to clipboard (screenshot, etc.)
  3. Type a text-only message in OpenCode (no image attached)
  4. Submit the message
  5. Error: "Cannot read 'clipboard' (this model does not support image input)."

Expected Behavior

  • OpenCode should NOT automatically read clipboard images when user only sends text
  • Or provide a config option to disable auto clipboard image reading

Actual Behavior

  • Even with no image attached to the message, OpenCode reads clipboard and fails
  • Other models (e.g., minimax-m2.5-free) work fine because they might handle this differently

Evidence

Error message shown:
ERROR: Cannot read "clipboard" (this model does not support image input). Inform the user.
Note: The user never attached any image - it was purely a text message.

Environment

  • OpenCode: 1.14.46
  • OS: macOS
  • Model: deepseek-v4/deepseek-v4-flash
  • Provider: DeepSeek API

Related Issues

  • #21004: Automatic Image Vision Processing for Non-Vision Models
  • #18437: Clipboard images routed directly to model instead of MCP when model lacks vision support

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmedium

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions