Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Vertex Anthropic Image URL Support #5449

Open
printharsh opened this issue Mar 29, 2025 · 1 comment · May be fixed by #5476
Open

Google Vertex Anthropic Image URL Support #5449

printharsh opened this issue Mar 29, 2025 · 1 comment · May be fixed by #5476
Labels
ai/provider bug Something isn't working

Comments

@printharsh
Copy link

printharsh commented Mar 29, 2025

Description

Anthropic on google vertex supports image attachments, but requires the base64 image data. Right now, vercel ai-sdk uses anthropic provider settings under the hood for Google Vertex Anthropic resulting in it wrongly assuming image URLs are supported.

The ai-sdk for google vertex with anthropic should fetch the base64 data and plumb it into the request or throw an error to the user saying image urls are not supported.

"For the media type field, Claude 3 models support image/png, image/jpeg, image/gif, or image/webp. The data part of the image is the file bytes encoded to a base64 string (e.g. base64 -i my_image.png)."

Cloud console documentation link for vertex:
https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-7-sonnet

Code example

No response

AI provider

@ai-sdk/google-vertex v2.1.29

Additional context

No response

@lgrammel
Copy link
Collaborator

lgrammel commented Apr 1, 2025

Can you provide an exact reproduction?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai/provider bug Something isn't working
Projects
None yet
2 participants