-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
(feat) Add image support for vertex and bedrock in messages api #15408
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewed
# Check if source has a URL that needs conversion | ||
if isinstance(source, str) and (source.startswith("http://") or source.startswith("https://")): | ||
try: | ||
base64_data = convert_url_to_base64(source) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for async requests please use async_convert_url_to_base64
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merge main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
discussed on call, waiting on async version of this
Title
Add image URL to base64 conversion for Anthropic Messages API
Relevant issues
Fixes LIT-1068
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
tests/litellm/
directory, Adding at least 1 test is a hard requirement - see detailsmake test-unit
Type
🆕 New Feature
Changes
process_image_content()
method to Bedrock and Vertex AI config classestest_anthropic_experimental_pass_through_messages_handler.py
This ensures image URLs work correctly across all providers in the Anthropic Messages API flow, matching the behavior of the completions endpoint.