Skip to content

fix(create): replace retired gpt-image-1 in AI add-on image route - #589

Open
pcbeingused33 wants to merge 1 commit into
TanStack:mainfrom
pcbeingused33:fix/ai-image-model
Open

pcbeingused33 wants to merge 1 commit into
TanStack:mainfrom
pcbeingused33:fix/ai-image-model

Conversation

@pcbeingused33

@pcbeingused33 pcbeingused33 commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Fixes the AI add-on's image demo, which still generates projects that call gpt-image-1.

OpenAI shut down gpt-image-1 on 2026-10-23 (https://developers.openai.com/api/docs/deprecations), with gpt-image-2.5-sunburst / gpt-image-2.5-flare as the listed replacements. The React AI add-on's /demo/api/ai/image route still passes openaiImage('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-openai uses in its openaiImage examples) in both places in api.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.ts now also checks that no framework template references gpt-image-1 (gpt-image-1-mini is unaffected). It fails on main (listing react/add-ons/ai/assets/src/routes/demo/api.ai.image.ts) and passes with this change. The @tanstack/create and @tanstack/cli unit suites pass.

This change was prepared with AI assistance.

Summary by CodeRabbit

  • Updates
    • AI image generation now uses gpt-image-2.5-flare instead of gpt-image-1. Successful responses report the updated model identifier; request handling and error responses are unchanged.
  • Tests
    • Added a check to flag references to the retired model in framework templates, helping ensure templates reflect the updated image-generation model.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The AI image-generation route now uses gpt-image-2.5-flare and reports that identifier in successful responses. A template scan checks for the retired gpt-image-1 identifier, and a patch changeset records the update.

Changes: AI image model update

Layer / File(s) Summary
Update model and check templates
packages/create/src/frameworks/react/add-ons/ai/assets/src/routes/demo/api.ai.image.ts, packages/create/tests/template-model-ids.test.ts, .changeset/openai-image-current-model.md
The route selects and reports gpt-image-2.5-flare. The template scan checks for gpt-image-1. The changeset documents the model replacement.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: jherr

Merge Risk: Minimal · up to e5fff

This updates the AI add-on's image demo route to the replacement OpenAI image model, so freshly scaffolded apps no longer call the retired model. The change is small and easy to revert, and no merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the AI add-on image route now uses gpt-image-2.5-flare in place of the retired gpt-image-1. The changeset, the route file, and the template-model test all support this…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the AI add-on image route now uses gpt-image-2.5-flare in place of the retired gpt-image-1. The changeset, the route file, and the template-model test all support this. The title uses the conventional fix(create) prefix and stays under 70 characters.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/create/tests/template-model-ids.test.ts

Parsing error: "parserOptions.project" has been provided for @typescript-eslint/parser.
The file was not found in any of the provided project(s): packages/create/tests/template-model-ids.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 819e63cf-d948-4f1e-bddf-faeb136244da
Commits

Reviewing files that changed from the base of the PR and between 40e0043 and e5fffe9.

Files selected for processing: 3

  • .changeset/openai-image-current-model.md
  • packages/create/src/frameworks/react/add-ons/ai/assets/src/routes/demo/api.ai.image.ts
  • packages/create/tests/template-model-ids.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

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.

1 participant