Provider fix, anthropic Errorhandling if empty image file is read
when the agent creates images, by screenshot or otherwise, which produces and file, which is empty, calling the antrophic provider will fail and the chat session is broken, it will not allow you to continue.
Session Export: session_empty_image_.json
The fix will check if there is any content, otherwise return a message to the agent, the test is entirely generated by the ai.
just cleaned the git-history
/review
So I looked at your session, looks like this is related to anthropic, not zen. The code changes you made are for zen api endpoints. This is probably not what you are looking to do..
Instead I think we should revert these changes and put the filter in this function: https://github.com/sst/opencode/blob/e6a0a005d6c5e30054b848e931050bb82326efd8/packages/opencode/src/provider/transform.ts#L167
@rekram1-node thank you, i will try fixing it there!
/review
lgtm
Nice!