Skip to content

Python: Add support to new openai text to image model#13651

Merged
moonbox3 merged 4 commits intomainfrom
taochen/python-add-support-for-new-openai-text-to-image-model
Mar 13, 2026
Merged

Python: Add support to new openai text to image model#13651
moonbox3 merged 4 commits intomainfrom
taochen/python-add-support-for-new-openai-text-to-image-model

Conversation

@TaoChenOSU
Copy link
Copy Markdown
Contributor

@TaoChenOSU TaoChenOSU commented Mar 12, 2026

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

@TaoChenOSU TaoChenOSU self-assigned this Mar 12, 2026
@TaoChenOSU TaoChenOSU requested a review from a team as a code owner March 12, 2026 18:40
@TaoChenOSU TaoChenOSU added the python Pull requests for the Python Semantic Kernel label Mar 12, 2026
@github-actions github-actions Bot changed the title Add support to new openai text to image model Python: Add support to new openai text to image model Mar 12, 2026
@moonbox3 moonbox3 added this pull request to the merge queue Mar 13, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 13, 2026
@moonbox3
Copy link
Copy Markdown
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.
@moonbox3 moonbox3 enabled auto-merge March 13, 2026 07:30
@moonbox3 moonbox3 added this pull request to the merge queue Mar 13, 2026
@moonbox3
Copy link
Copy Markdown
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'*_

Fixed in latest commit.

@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 13, 2026
… 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'.
@moonbox3 moonbox3 enabled auto-merge March 13, 2026 08:31
@moonbox3 moonbox3 added this pull request to the merge queue Mar 13, 2026
Merged via the queue into main with commit 5c891d1 Mar 13, 2026
36 checks passed
@moonbox3 moonbox3 deleted the taochen/python-add-support-for-new-openai-text-to-image-model branch March 13, 2026 08:38
@github-project-automation github-project-automation Bot moved this to Sprint: Done in Semantic Kernel Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Pull requests for the Python Semantic Kernel

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants