-
Notifications
You must be signed in to change notification settings - Fork 4k
Python: feature: support gpt-image-1 #12621
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
eavanvalkenburg
merged 6 commits into
microsoft:main
from
ymuichiro:python/feature/support-gpt-image-1
Jul 4, 2025
Merged
Python: feature: support gpt-image-1 #12621
eavanvalkenburg
merged 6 commits into
microsoft:main
from
ymuichiro:python/feature/support-gpt-image-1
Jul 4, 2025
+405
−43
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
…ath to image_paths and from image_file to image_files
…ath to image_paths and from image_file to image_files
b8e5e58
to
8aa209b
Compare
Thanks for working on this, @ymuichiro. Are there unit tests we can add so we have coverage for the new code? |
4ea4f29
to
8aa209b
Compare
I've added unit tests! I also made some minor adjustments to other parts of the code as I found issues in existing test code. |
The test was failing, so I fixed it.
|
Python Test Coverage Report •
Python Unit Test Overview
|
moonbox3
approved these changes
Jul 3, 2025
eavanvalkenburg
approved these changes
Jul 4, 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.
This pull request was created in response to the issue #12500 (comment). The current AzureTextToImage implementation only works with DALL-E 3. For gpt-image-1, the response format has changed from a URL to base64 only, which the current code does not support.
Additionally, gpt-image-1 introduces a new image editing feature that also needs to be supported. Since breaking changes are required, new methods have been added.
Minimal code that reproduces the problem
Example of use with newly added methods
Problems Identified
semantic-kernel/python/semantic_kernel/connectors/ai/open_ai/services/open_ai_text_to_image_base.py
Line 69 in 8d1b3fd