Skip to content

Read tool fails to process images with direct Anthropic provider (Claude Opus 4) on v1.2.15 #15566

@disolaterX

Description

@disolaterX

Description

The Read tool fails to read image files with the error "Could not process image" when using Claude Opus 4 via the direct Anthropic provider. The model supports image input, but the Read tool's modality check appears to reject it.

Environment

  • OpenCode version: 1.2.15
  • Provider: Anthropic (direct, no proxy)
  • Model: anthropic/claude-opus-4-6
  • OS: macOS
  • Plugin: oh-my-opencode@latest

Steps to Reproduce

  1. Configure OpenCode with direct Anthropic provider and Claude Opus 4
  2. Have any image file (PNG, JPG, etc.) in the working directory
  3. Ask the model to read the image file using the Read tool
  4. Read tool returns an error about not being able to process the image

Expected Behavior

The Read tool should detect that Claude Opus 4 supports image input and return the base64-encoded image as an attachment.

Actual Behavior

Read tool rejects the image with a "could not process image" error.

Related Issues

This appears to be a regression or incomplete fix in the modality detection logic for direct Anthropic provider models.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions