generated from amazon-archives/__template_Apache-2.0
-
Couldn't load subscription status.
- Fork 449
models - openai - images - b64 validate #251
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zastrowm
requested changes
Jun 19, 2025
zastrowm
reviewed
Jun 19, 2025
zastrowm
previously approved these changes
Jun 19, 2025
Co-authored-by: Mackenzie Zastrow <[email protected]>
zastrowm
approved these changes
Jun 19, 2025
|
Related to issue #252 |
3 tasks
Unshure
pushed a commit
to Unshure/sdk-python
that referenced
this pull request
Jul 2, 2025
12 tasks
jsamuel1
pushed a commit
to jsamuel1/sdk-python
that referenced
this pull request
Jul 9, 2025
dbschmigelski
pushed a commit
to Ketansuhaas/sdk-python
that referenced
this pull request
Jul 24, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In the OpenAI model provider, we currently expect people to pass in base64 encoded data for images. This isn't conventional. As with the other providers like Anthropic and Bedrock, we should accept raw image bytes and base64 encode on behalf of the customers.
In this PR, we put in a fix to the OpenAI model provider to allow both raw bytes and base64 encoded bytes. In the 1.0 release, we should switch to only allowing raw bytes and always perform the base64 encoding on behalf of customers.
Related Issues
No formal issue has been opened, but this is causing compatibility issues with the generate_image tool which passes through raw bytes as a result.
Type of Change
Testing
hatch run prepareChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.