Skip to content

Support RemoteImage and Base64Image attachments in PrismGateway#254

Open
vcprx wants to merge 1 commit intolaravel:0.xfrom
vcprx:fix/prism-gateway-remote-base64-image-attachments
Open

Support RemoteImage and Base64Image attachments in PrismGateway#254
vcprx wants to merge 1 commit intolaravel:0.xfrom
vcprx:fix/prism-gateway-remote-base64-image-attachments

Conversation

@vcprx
Copy link

@vcprx vcprx commented Mar 10, 2026

Description

Adds support for RemoteImage and Base64Image attachment types in PrismGateway::toPrismImageAttachments().

Previously, only LocalImage, StoredImage, and UploadedFile were handled. Passing a RemoteImage or Base64Image would fall through to the default branch and throw an InvalidArgumentException, even though the Prism library supports both via PrismImage::fromUrl() and PrismImage::fromBase64().

Changes

  • Map RemoteImagePrismImage::fromUrl($url, $mime)
  • Map Base64ImagePrismImage::fromBase64($base64, $mime)

@taylorotwell
Copy link
Member

Do providers actually accept this as input?

@vcprx
Copy link
Author

vcprx commented Mar 13, 2026

Can confirm that Gemini accepts both. Not sure about OpenAI and xAI though...

@vcprx
Copy link
Author

vcprx commented Mar 13, 2026

No problems with OpenAI as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants