opencode
opencode copied to clipboard
AI_APICallError - base64 encoded image pasted
Description
After pasting an image into the chat which was encoded to base64, the original image was transferred to Anthropic Claude, but was being included in subsequent messages causing an AI_APICallError. Either we need to save the image locally and transmit a temporary path or use the path of the original file rather than encoding it in the message chat. Also, Opencode froze afterwards with no error messages or response so we are not handling the error gracefully.
OpenCode version
1.0.126
Steps to reproduce
- Select an image
- Clipboard copy image
- Paste image in opencode chat
- Continue to interact with model until it no longer continues.
Screenshot and/or share link
No response
Operating System
Ubuntu 25.04
Terminal
GNOME Terminal