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
- Configure OpenCode with direct Anthropic provider and Claude Opus 4
- Have any image file (PNG, JPG, etc.) in the working directory
- Ask the model to read the image file using the Read tool
- 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.
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
Steps to Reproduce
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.