Skip to content

types: add gpt-image-2 to ImageModel literal#3120

Open
Zelys-DFKH wants to merge 1 commit intoopenai:mainfrom
Zelys-DFKH:fix/add-gpt-image-2-literal
Open

types: add gpt-image-2 to ImageModel literal#3120
Zelys-DFKH wants to merge 1 commit intoopenai:mainfrom
Zelys-DFKH:fix/add-gpt-image-2-literal

Conversation

@Zelys-DFKH
Copy link
Copy Markdown

Adds missing support for gpt-image-2 model which GA'd on 2026-04-21 for Azure OpenAI.

Fixes #3114

Changes

  • Add 'gpt-image-2' to ImageModel Literal
  • Update ImageGeneration.model Literals in responses/tool.py and tool_param.py
  • Update docstrings to mention gpt-image-2 support
  • Clarify input_fidelity support for gpt-image-1.5 and later models

Verification

  • Type-checker will now recognize gpt-image-2 as valid
  • IDE autocomplete will include gpt-image-2
  • Documentation accurately reflects supported models

- Add 'gpt-image-2' to ImageModel Literal in image_model.py
- Update ImageGeneration.model Literal in responses/tool.py and tool_param.py
- Update docstrings in image_generate_params.py and image_edit_params.py to mention gpt-image-2
- Update input_fidelity documentation to clarify support for gpt-image-1.5 and later models

This resolves issue openai#3114 where gpt-image-2 (GA'd on 2026-04-21 for Azure) was missing
from the SDK's type definitions, causing type-checker errors despite runtime support.
@Zelys-DFKH Zelys-DFKH requested a review from a team as a code owner April 24, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

types: ImageModel Literal missing 'gpt-image-2' (GA'd 2026-04-21 on Azure)

1 participant