Python: Add support to new openai text to image model#13651
Merged
Conversation
eavanvalkenburg
approved these changes
Mar 12, 2026
giles17
approved these changes
Mar 12, 2026
Collaborator
|
Looks like one sample needs an update: FAILED tests/samples/test_concepts.py::test_concepts[image_generation] - semantic_kernel.exceptions.service_exceptions.ServiceResponseException: Failed to generate image: Error code: 400 - ***'error': 'message': "Unknown parameter: 'style'.", 'type': 'invalid_request_error', 'param': 'style', 'code': 'unknown_parameter' |
…tion sample The gpt-image-1 model does not support the 'style' or 'quality' (with value 'hd') parameters that were specific to DALL-E 3.
eavanvalkenburg
approved these changes
Mar 13, 2026
Collaborator
Fixed in latest commit. |
… gpt-image-1 DALL-E 3 is being retired in favor of gpt-image-1 which returns base64 data instead of URLs. Update the sample to decode base64 and use ImageContent with data instead of uri.
…r gpt-image-1 DALL-E 3 is being retired. The 'style' parameter is not supported by gpt-image-1 and 'quality' only accepts 'high', 'medium', or 'low'.
eavanvalkenburg
approved these changes
Mar 13, 2026
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
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.
Motivation and Context
Dall-e-3 and Dall-e-2 have been deprecated. The newer gpt-1-image model returns base64 strings.
Description
Return url if set, otherwise return the base64 string.
Contribution Checklist