Add GPT Image 2 model support for image generation#302
Merged
Conversation
Adds GPT_IMAGE_2 ("openai/gpt-image-2") to the TEE_LLM enum so the SDK
can route to OpenAI's image-generation model already supported by the
tee-gateway. Billed at a flat per-image rate; images returned as data:
URIs on the response. Updates the image-generation example and README
model list.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BUq85aJiPfVTWsMCPmWJ1L
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.
Summary
Add support for OpenAI's GPT Image 2 model via the TEE endpoint for native image generation capabilities.
Changes
src/opengradient/types.py: AddedGPT_IMAGE_2 = "openai/gpt-image-2"enum value toTEE_LLMwith documentation noting:/images/generationsendpointTextGenerationOutput.imagesandStreamChunk.imagesexamples/llm_image_generation.py: Updated example documentation to list GPT Image 2 as an available image generation model with pricing ($0.05/image)README.md: Added "GPT Image 2 (native image generation)" to the OpenAI models list in the supported models sectionImplementation Details
The model follows the existing TEE LLM pattern and integrates with the image generation infrastructure already in place. Images are handled separately from the signed output, consistent with other image generation models like Gemini variants.
https://claude.ai/code/session_01BUq85aJiPfVTWsMCPmWJ1L