Skip to content

MCP tool returning an image is not working properly #1563

Closed

Description

@abaudhuin

I'm using a custom MCP that takes the screenshot of a website and returns it.
I'm using openrouter with anthropic/claude-4-sonnet-20250522

When i use it with opencode, it calls the tool correctly but hallucinate entirely what it sees.
I guess the image output is not available to it.

When I use the exact same MCP in cursor the model is capable of describing correctly what it sees on the page.

Does anyone knows if this is a bug of opencode? Or maybe it could be openrouter?
Any idea how I could work around this issue?

Activity

  1. self-assigned this
    on Aug 3, 2025
  2. abaudhuin commented on Aug 4, 2025

    @abaudhuin
    Author

    Could be caused by ai sdk ? vercel/ai#7202
    I'm still investigating this

  3. jgontrum commented on Aug 4, 2025

    @jgontrum

    I was working on something adjacent, this PR shoud fix it? #1589

  4. abaudhuin commented on Aug 15, 2025

    @abaudhuin
    Author

    I just tested your PR and I does not appear to solve it

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

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