You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GLM-4.7 is a multimodal model with vision support, but when using the Read tool to read image files with Z.AI (zai-coding-plan), the model says "I cannot read the image".
Expected Behavior
The model should be able to read and analyze image content, similar to how Claude, GPT-4, and other vision-capable models work.
Actual Behavior
When asking GLM-4.7 to read an image file using the Read tool:
Error message: "Cannot read "/path/to/image.jpg" (this model does not support image input). Inform the user."
Pasting images directly in messages works fine
GLM-4.7 itself supports vision (can read images in other contexts)
Root Cause
The `supportsMediaInToolResults` function in `packages/opencode/src/session/message-v2.ts` doesn't include `@ai-sdk/openai-compatible` (used by Z.AI).
Current supported SDKs:
`@ai-sdk/anthropic`
`@ai-sdk/openai`
`@ai-sdk/amazon-bedrock`
`@ai-sdk/google-vertex/anthropic`
`@ai-sdk/google` (Gemini-3 only)
Suggested Fix
Add `@ai-sdk/openai-compatible` to the `supportsMediaInToolResults` list:
```typescript
if (model.api.npm === "@ai-sdk/openai-compatible") {
// Z.AI GLM models support vision
return true
}
```
Activity
kassieclaire commentedon Feb 16, 2026
GLM-4.7 is text-only, as described here:
github-actions commentedon Apr 17, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.