Skip to content

feat(api): add image-latest to ImageModel type#1853

Open
anishesg wants to merge 1 commit intoopenai:masterfrom
proudhare:fix/ph-issue-1844
Open

feat(api): add image-latest to ImageModel type#1853
anishesg wants to merge 1 commit intoopenai:masterfrom
proudhare:fix/ph-issue-1844

Conversation

@anishesg
Copy link
Copy Markdown

  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

The ImageModel type in src/resources/images.ts was missing 'image-latest', even though the images.edit endpoint's JSDoc comment already listed it as a supported model alongside gpt-image-1, gpt-image-1.5, gpt-image-1-mini, and dall-e-2. This caused TypeScript consumers to get a type error when passing 'image-latest' as the model parameter (without falling back to the string & {} escape hatch). Adding 'image-latest' to the ImageModel union aligns the type definition with the documented API capabilities.

Additional context & links

The model fields on ImageEditParamsBase and ImageGenerateParamsBase already use (string & {}) | ImageModel | null, so runtime behavior is unchanged — this is purely a type-level improvement giving users proper autocomplete for all supported models.

Fixes #1844

- [ ] I understand that this repository is auto-generated and my pull request may not be merged

Signed-off-by: anish k <ak8686@princeton.edu>
@anishesg anishesg requested a review from a team as a code owner April 29, 2026 14:42
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.

images.edit endpoint rejects GPT Image models

1 participant