opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[Github Copilot] Anthropic models can't see images?

Open agusmdev opened this issue 1 month ago • 4 comments

Question

I’m using a Copilot subscription on OpenCode. Everything works fine, but it seems that the Anthropic models are not able to “see” images. Is this something I can fix on my end, or is it more likely a misconfiguration in the GitHub Copilot + Anthropic integration in OpenCode? Models from OpenAI handle vision correctly.

model "claude-haiku-4.5" not supported for vision model "claude-sonnet-4.5" not supported for vision model "claude-opus-4.5" not supported for vision

agusmdev avatar Dec 09 '25 19:12 agusmdev

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

  • #2944: Getting "AI_APICallError: Invalid API parameter, please check the documentation." in opencode with zAI glm 4.6 - This issue also involves vision MCP server with images and Anthropic models not handling vision correctly.

Feel free to ignore if none of these address your specific case.

github-actions[bot] avatar Dec 09 '25 19:12 github-actions[bot]

ill take a look

rekram1-node avatar Dec 09 '25 22:12 rekram1-node

ill take a look

I'm having the same issue and it is not limited to anthropic models, I tried gemini 3 pro and it is having the same issue with images. ~2 days ago images used to work fine, I think a recent update is the cause of this bug.

aziham avatar Dec 10 '25 00:12 aziham

@aziham what bug are you seeing? How do I reproduce

rekram1-node avatar Dec 10 '25 01:12 rekram1-node

@rekram1-node

Image Image

This is what I'm getting when using the models in opencode (it used to work just fine).


Image

I don't think the issue is related to the models, I tested them with Cherry Studio client and they work just fine

aziham avatar Dec 10 '25 03:12 aziham

what provider are you using

rekram1-node avatar Dec 10 '25 03:12 rekram1-node

I'm using custom providers with @ai-sdk/openai-compatible to unify all my providers into one OpenAI-compatible endpoint (proxy running on localhost).

Config snippet:

provider: {
  proxy: {
    npm: @ai-sdk/openai-compatible,
    options: {
      baseURL: http://localhost:8888/v1
    },
    models: {
      claude-opus-4-5: { ... }
    }
  }
}

aziham avatar Dec 10 '25 03:12 aziham

@aziham add this to any model definition that supports images:

"modalities": {
            "input": ["text", "image"], // consider adding "pdf" too if it supports pdfs
            "output": ["text"], 
          },

rekram1-node avatar Dec 10 '25 04:12 rekram1-node

@rekram1-node adding modalities fixed the issue, thanks Aiden.

aziham avatar Dec 10 '25 07:12 aziham

@aziham add this to any model definition that supports images:

"modalities": {
            "input": ["text", "image"], // consider adding "pdf" too if it supports pdfs
            "output": ["text"], 
          },

Can I make a fix like this but for github copilot integration?

agusmdev avatar Dec 10 '25 10:12 agusmdev

@agusmdev I can't replicate your issue, images read fine?

Image

rekram1-node avatar Dec 10 '25 18:12 rekram1-node

Image @rekram1-node my issue is when I copy paste an image. I have the latest version of OpenCode, and my GF is also facing the same issue, maybe it's something we have to activate in our github-copilot sub?

agusmdev avatar Dec 10 '25 20:12 agusmdev

Image

@agusmdev I still can't replicate your issue

rekram1-node avatar Dec 10 '25 21:12 rekram1-node

But that error you are seeing comes directly from copilot, not from us so maybe there is something you need to specify in your settings? Or maybe your tier subscription doesnt allow it?

rekram1-node avatar Dec 10 '25 21:12 rekram1-node

But that error you are seeing comes directly from copilot, not from us so maybe there is something you need to specify in your settings? Or maybe your tier subscription doesnt allow it?

Yeah it seems that something like this is happening, will take a look. Thank you for you help!!

agusmdev avatar Dec 10 '25 21:12 agusmdev

Yeah no problem! Going to close since this seems not to be an opencode issue, but we can reopen if appropriate ofc

rekram1-node avatar Dec 10 '25 21:12 rekram1-node