opencode icon indicating copy to clipboard operation
opencode copied to clipboard

AI_APICallError - base64 encoded image pasted

Open paka63 opened this issue 1 month ago • 3 comments

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

  1. Select an image
  2. Clipboard copy image
  3. Paste image in opencode chat
  4. 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

paka63 avatar Dec 02 '25 14:12 paka63