Skip to content

Clipboard images routed directly to model instead of MCP when model lacks vision support #18437

Closed

Description

@zj021121-arch

Description

Problem

When a clipboard image is received and the current model does not support image input, opencode attempts to attach the image directly to the model and fails with:

ERROR: Cannot read "image.png" (this model does not support image input)

This happens before any agent code can intercept the image and route it to the minimax_search_understand_image MCP tool.

Expected Behavior

There should be a config option or automatic fallback to route clipboard images directly to the minimax_media MCP's minimax_search_understand_image tool instead of passing them to the language model.

Workaround (insufficient)

Adding AGENTS.md rules to intercept clipboard images doesn't help because opencode itself tries to attach the image to the model before agent code runs.

Suggested Fixes

  1. Add a config option like imageInput: "mcp" to route images to MCP when model lacks vision
  2. Add automatic MCP fallback when model doesn't support image attachments
  3. Provide a way to disable native image attachment handling

Plugins

Mini Max 2.7 Image Mcp

OpenCode version

1.2.27 I think

Steps to reproduce

No response

Screenshot and/or share link

Image

Operating System

No response

Terminal

No response

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 20, 2026
  2. github-actions commented on Mar 20, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Please review these issues and comment if yours is distinct. If it is a duplicate, consider closing this one and adding your details to the existing issue.

  3. zhongruan0522 commented on Mar 21, 2026

    @zhongruan0522

    I encountered the same problem when using GLM-5, but I had deployed a separate NewAPI instance, forked it, and had NewAPI convert the incoming image into a URL. I also specified in AGENTS.MD that xxxMCP should be used for image understanding.

    (The above was translated into English using Google Translate.)

  4. jensenojs commented on Apr 3, 2026

    @jensenojs
    Contributor

    same problem with mimo v2 pro + mimo omni

  5. zhongruan0522 commented on Apr 3, 2026

    @zhongruan0522

    MIMO V2 Pro + MIMO Omni 也有同样的问题

    小米的不本来就是多模态吗

  6. jensenojs commented on Apr 7, 2026

    @jensenojs
    Contributor

    MIMO V2 Pro + MIMO Omni 也有同样的问题

    小米的不本来就是多模态吗

    Omni 是, 但 V2 pro并不是啊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions