[v0.14.7] Read tool incorrectly detects model as non-image-capable #2035

Closed
opened 2026-02-16 17:33:52 -05:00 by yindo · 5 comments
Owner

Originally created by @Raviguntakala on GitHub (Oct 10, 2025).

Originally assigned to: @rekram1-node on GitHub.

In the latest release v0.14.7, the read tool now supports reading images.However, there seems to be a small issue with the model capability check.

When I run read image.png, it says my model doesn’t support images.But when I pass the same image using @image.png, it works fine.

I’m using Sonnet 4, which supports both text and image inputs.

Attaching screenshot for reference 👇

Image Image

Expected behavior: The read tool should correctly detect that the model (Sonnet 4) supports images and proceed without throwing the unsupported model error.

Version: 0.14.7

Originally created by @Raviguntakala on GitHub (Oct 10, 2025). Originally assigned to: @rekram1-node on GitHub. In the latest release v0.14.7, the read tool now supports reading images.However, there seems to be a small issue with the model capability check. When I run read image.png, it says my model doesn’t support images.But when I pass the same image using @image.png, it works fine. I’m using Sonnet 4, which supports both text and image inputs. Attaching screenshot for reference 👇 <img width="2746" height="960" alt="Image" src="https://github.com/user-attachments/assets/75e77f8f-a47d-429b-a834-ba75146f85a6" /> <img width="2670" height="514" alt="Image" src="https://github.com/user-attachments/assets/bf612570-7ee6-4075-96d5-48191b6a1442" /> **Expected behavior:** The read tool should correctly detect that the model (Sonnet 4) supports images and proceed without throwing the unsupported model error. **Version**: 0.14.7
yindo closed this issue 2026-02-16 17:33:52 -05:00
Author
Owner

@rekram1-node commented on GitHub (Oct 10, 2025):

I think we need to update models.dev to track it correctly..

is this a custom claude sonnet 4? I see "Nexus Claude Sonnet 4" in your screenshot

But the other part looks like normal?

What provider is this?

@rekram1-node commented on GitHub (Oct 10, 2025): I think we need to update models.dev to track it correctly.. is this a custom claude sonnet 4? I see "Nexus Claude Sonnet 4" in your screenshot But the other part looks like normal? What provider is this?
Author
Owner

@Raviguntakala commented on GitHub (Oct 10, 2025):

I think we need to update models.dev to track it correctly..

is this a custom claude sonnet 4? I see "Nexus Claude Sonnet 4" in your screenshot

But the other part looks like normal?

What provider is this?

Nexus is my client’s internal API gateway

@Raviguntakala commented on GitHub (Oct 10, 2025): > I think we need to update models.dev to track it correctly.. > > is this a custom claude sonnet 4? I see "Nexus Claude Sonnet 4" in your screenshot > > But the other part looks like normal? > > What provider is this? Nexus is my client’s internal API gateway
Author
Owner

@rekram1-node commented on GitHub (Oct 10, 2025):

@Raviguntakala can u show your opencode.json if this is a custom model you need to specify the modalities currently...

ill show you, here is an example:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "myprovider": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "My AI ProviderDisplay Name",
      "options": {
        "baseURL": "https://api.myprovider.com/v1"
      },
      "models": {
        "my-model-name": {
          "name": "My Model Display Name",
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          }
        }
      }
    }
  }
}
@rekram1-node commented on GitHub (Oct 10, 2025): @Raviguntakala can u show your opencode.json if this is a custom model you need to specify the modalities currently... ill show you, here is an example: ``` { "$schema": "https://opencode.ai/config.json", "provider": { "myprovider": { "npm": "@ai-sdk/openai-compatible", "name": "My AI ProviderDisplay Name", "options": { "baseURL": "https://api.myprovider.com/v1" }, "models": { "my-model-name": { "name": "My Model Display Name", "modalities": { "input": ["text", "image"], "output": ["text"] } } } } } } ```
Author
Owner

@Raviguntakala commented on GitHub (Oct 11, 2025):

"modalities": {
"input": ["text", "image"],
"output": ["text"]

Thanks @rekram1-node! After adding modalities, it is working.

Image
@Raviguntakala commented on GitHub (Oct 11, 2025): > "modalities": { > "input": ["text", "image"], > "output": ["text"] Thanks @rekram1-node! After adding modalities, it is working. <img width="1778" height="362" alt="Image" src="https://github.com/user-attachments/assets/5b1db5e1-2f5b-49fa-9b9b-f2361415e644" />
Author
Owner

@rekram1-node commented on GitHub (Oct 11, 2025):

sweet

@rekram1-node commented on GitHub (Oct 11, 2025): sweet
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2035