Skip to content

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

Merged
Evan Mattson (moonbox3) merged 4 commits into
mainfrom
taochen/python-add-support-for-new-openai-text-to-image-model
Mar 13, 2026
Merged

Evan Mattson (moonbox3) merged 4 commits into
mainfrom
taochen/python-add-support-for-new-openai-text-to-image-model

Conversation

@TaoChenOSU

@TaoChenOSU Tao Chen (TaoChenOSU) commented Mar 12, 2026 •

Copy link
Copy Markdown
Contributor

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 Tao Chen (TaoChenOSU) self-assigned this Mar 12, 2026
@TaoChenOSU
Tao Chen (TaoChenOSU) requested a review from a team as a code owner March 12, 2026 18:40
@TaoChenOSU Tao Chen (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
Evan Mattson (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
Evan Mattson (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
Evan Mattson (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
Evan Mattson (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