Repository navigation
fix(create): replace retired gpt-image-1 in AI add-on image route - #589
pcbeingused33 wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Fixes the AI add-on's image demo, which still generates projects that call
gpt-image-1.OpenAI shut down
gpt-image-1on 2026-10-23 (https://developers.openai.com/api/docs/deprecations), withgpt-image-2.5-sunburst/gpt-image-2.5-flareas the listed replacements. The React AI add-on's/demo/api/ai/imageroute still passesopenaiImage('gpt-image-1')and reports that model in its response, so a freshly scaffolded app fails on the first image request.Fix: use
gpt-image-2.5-flare(the model@tanstack/ai-openaiuses in itsopenaiImageexamples) in both places inapi.ai.image.ts. It supports the same sizes the demo UI offers (1024x1024,1536x1024,1024x1536,auto), so nothing else changes. This follows the same approach as #543 and #562, plus a patch changeset.Test:
packages/create/tests/template-model-ids.test.tsnow also checks that no framework template referencesgpt-image-1(gpt-image-1-miniis unaffected). It fails onmain(listingreact/add-ons/ai/assets/src/routes/demo/api.ai.image.ts) and passes with this change. The@tanstack/createand@tanstack/cliunit suites pass.This change was prepared with AI assistance.
Summary by CodeRabbit
gpt-image-2.5-flareinstead ofgpt-image-1. Successful responses report the updated model identifier; request handling and error responses are unchanged.