opencode
opencode copied to clipboard
feat: Support images in tool responses
While opencode can send images as user messages when we directly reference an image file, or drag-and-drop it, it wasn't able to analyze images programmatically.
By using multi-part tool responses, we can now let the read tool read an image and send it as a tool response. The same works for MCP servers returning images. Background: https://ai-sdk.dev/docs/foundations/prompts#multi-modal-tool-results
Note: As per the AI SDK, this is an experimental feature only supported by Anthropic.