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
{{ message }}
Repository navigation
First message with image doesn't use MCP vision tool even when available #6149
When sending the first message with an image in opencode, the system defaults to using the model's native vision capabilities even when MCP vision tools are available. If the model doesn't have vision capabilities, it will fail to see the image and report that it cannot view images. However, starting from the second message onwards, it correctly uses the MCP vision tool to process images.
Steps to Reproduce
Configure opencode with an MCP vision server (e.g., vision-mcp-server)
Use a model without native vision capabilities (e.g., non-vision model)
Send the first message with an image attachment
Observe the error message saying the model cannot see images
Send a second message with the same image
Observe that the MCP vision tool is correctly used this time
Expected Behavior
The system should consistently use MCP vision tools for image processing, regardless of whether it's the first message or subsequent messages. If MCP vision tools are available, they should be used even for the first image in a conversation.
Actual Behavior
First message with image: Attempts to use model's native vision → fails
Second message with image: Uses MCP vision tool → works correctly
This creates a poor user experience because users need to send two messages to get image analysis working. The inconsistency between first and subsequent messages suggests there's a state or initialization issue with how MCP tools are prioritized for the first message.
Activity
github-actions commentedon Dec 25, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
piliplaker commentedon Dec 25, 2025
opencode version is 1.0.200
github-actions commentedon Mar 25, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.