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
- Configure DeepSeek V4 Flash model (non-vision)
- Copy an image to clipboard (screenshot, etc.)
- Type a text-only message in OpenCode (no image attached)
- Submit the message
- 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
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
Expected Behavior
Actual Behavior
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
Related Issues