[Platform] Fix OpenAI image generation by routing gpt-image models to the image bridge#2224
Open
chr-hertel wants to merge 1 commit into
Open
[Platform] Fix OpenAI image generation by routing gpt-image models to the image bridge#2224chr-hertel wants to merge 1 commit into
chr-hertel wants to merge 1 commit into
Conversation
… the image bridge OpenAI retired the DALL-E models and removed the `response_format` parameter from the images endpoint. The replacement `gpt-image-*` models were classified as chat models and sent to the Responses API, so image generation failed. Route the gpt-image models to the OpenAI image bridge in both the static catalog and the catalog generator (so a refresh keeps the mapping), tolerate a missing `response_format` in the result converter (gpt-image always returns base64), and replace the retired dall-e examples with gpt-image ones.
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.
OpenAI retired the DALL-E models, so the image examples are broken:
dall-e-3now returns "model does not exist" and the images endpoint rejectsresponse_formatoutright. The replacementgpt-image-*models were already in the catalog but classified as chat models, so they were routed to the Responses API instead of/v1/images/generations.This routes the
gpt-image-*models to the OpenAI image bridge:ModelCatalog:gpt-image-1,-mini,-1.5,-2now map toDallEwithINPUT_TEXT+OUTPUT_IMAGE.CapabilityMapper::isImageGenerationModel()+ a generator rule indev/update-model-catalogs.php, so a catalog refresh keeps the mapping.DallE\ResultConvertertolerates a missingresponse_format(gpt-image always returns base64).image-output-dall-e-{2,3}.phpexamples withimage-output-gpt-image-1.phpandimage-output-gpt-image-1-mini.php.Both examples were verified against the live API and produced valid PNGs.