Skip to content

fix(examples): use gpt-image-2.5-flare in the OpenAI image generation example - #1109

Merged
marandaneto merged 1 commit into
PostHog:mainfrom
pcbeingused333:fix/example-image-model-gpt-image-2-5
Oct 23, 2026
Merged

marandaneto merged 1 commit into
PostHog:mainfrom
pcbeingused333:fix/example-image-model-gpt-image-2-5

Conversation

@pcbeingused333

Copy link
Copy Markdown
Contributor

💡 Motivation and Context

examples/example-ai-openai/image_generation.py calls gpt-image-1, which OpenAI shuts down on 2026-10-23 (https://developers.openai.com/api/docs/deprecations lists gpt-image-2.5-sunburst or gpt-image-2.5-flare as the replacements). After that date the example fails with a model-not-found error.

The example now uses gpt-image-2.5-flare. The prompt, size="1024x1024" and the b64_json read are unchanged. No library code changes.

💚 How did you test it?

Not run against the live OpenAI API: this is a one-line model name change in an example, and the request shape is the same one the example already sent to gpt-image-1. If the new model needs a different size or response format, the example will say so on first run and the follow-up is one line.

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

🤖 Agent context

Autonomy: Fully autonomous

Claude Code (Anthropic) found and made the change; the model mapping comes from OpenAI's deprecations page, and the example was not executed. Nothing else in the repository references gpt-image-1.

@pcbeingused333
pcbeingused333 requested a review from a team as a code owner October 22, 2026 21:55
@turnipdabeets
turnipdabeets requested a review from a team October 22, 2026 21:58
@turnipdabeets

turnipdabeets commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Thanks @pcbeingused333, can you make sure all your commits are signed and verified in this repo too?

You can git config --global commit.gpgsign true and set gpg.format ssh with user.signingkey pointing to the key used on #PostHog-js/5355.

… example

OpenAI shuts down gpt-image-1 on 2026-10-23 and lists gpt-image-2.5-sunburst or
gpt-image-2.5-flare as the replacement
(https://developers.openai.com/api/docs/deprecations).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@pcbeingused333
pcbeingused333 force-pushed the fix/example-image-model-gpt-image-2-5 branch from 0af158d to 66692b2 Compare October 23, 2026 06:52
@pcbeingused333

Copy link
Copy Markdown
Contributor Author

Thanks @turnipdabeets, the commits on this branch are now signed and show as verified (same content, re-signed only).

@marandaneto
marandaneto enabled auto-merge (squash) October 23, 2026 10:40
@marandaneto
marandaneto merged commit efc866e into PostHog:main Oct 23, 2026
42 checks passed
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.

3 participants