opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat: Support images in tool responses

Open jgontrum opened this issue 5 months ago • 0 comments

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.

jgontrum avatar Aug 04 '25 13:08 jgontrum