M
Mastraโ€ข2w ago
paul_validity

Issues when using base64 encoded images with threads

I get the following error when trying to use a base64 encoded image in an agent call that is also passing a thread/resouce when using the latest 1.0 beta versinon of Mastra Error:
Error executing step prepare-memory-step: Error: Invalid URL: iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII
Error executing step prepare-memory-step: Error: Invalid URL: iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII
Here is a quick repo that showcases the error. Just run the weather workflow. https://github.com/paulmeyerle/mastra-thread-example/
GitHub
GitHub - paulmeyerle/mastra-thread-example: Repo showcasing a bug i...
Repo showcasing a bug in the Mastra 1.0 beta when using base64 encoded images in a user message - paulmeyerle/mastra-thread-example
3 Replies
Mastra Triager
Mastra Triagerโ€ข2w ago
๐Ÿ“ Created GitHub issue: https://github.com/mastra-ai/mastra/issues/10480 ๐Ÿ” If you're experiencing an error, please provide a minimal reproducible example whenever possible to help us resolve it quickly. ๐Ÿ™ Thank you for helping us improve Mastra!
Abhi Aiyer
Abhi Aiyerโ€ข2w ago
Hey @paul_validity thanks for reporting this! we'll take a look!
Abhi Aiyer
Abhi Aiyerโ€ข2w ago
I have a fix here: https://github.com/mastra-ai/mastra/pull/10483 Will release in 1.0.0-beta and 0.x today/tmrw
GitHub
base64 fixes for agent calls by abhiaiyer91 ยท Pull Request #10483 ...
base64 encoded images Fixes #10480 Fixed "Invalid URL" error when using base64 encoded images (without data: prefix) in agent calls with threads and resources. Raw base64 strings ...

Did you find this page helpful?