Allow Bedrock Converse to accept native images instead of base64 (33% penalty!) #6785
Labels
feature-request
New feature or enhancement. May require GitHub community feedback.
p2
This is a standard priority issue
queued
This issues is on the AWS team's backlog
service-api
This issue is due to a problem in a service API, not the SDK implementation.
Describe the feature
When using the converse API, any image file attached gets base64 encoded. Unfortunately that balloons the size to 33% higher than the actual file.
For example - if i have image.png that is 4.8MB and want to send it to claude sonnet 3.5 v2, it balloons to 6.4MB!
The model returned the following errors: messages.0.content.1.image.source: image exceeds 5 MB maximum: 6737924 bytes > 5242880 bytes
base64 incurs a 33% penalty!
https://en.wikipedia.org/wiki/Data_URI_scheme
Use Case
It's frustrating to limit images to LLM calls using converse API be 3.75 MB when the actual image size threshold should be 5.0MB or higher.
Proposed Solution
allow the ability to natively pass images in without base64 encoding
Other Information
No response
Acknowledgements
SDK version used
@aws-sdk/client-bedrock": "^3.687.0
Environment details (OS name and version, etc.)
MacOS
The text was updated successfully, but these errors were encountered: