Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/openai-image-current-model.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tanstack/create": patch
---

Use `gpt-image-2.5-flare` instead of the retired `gpt-image-1` in the AI add-on's image generation route.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const Route = createFileRoute('/demo/api/ai/image')({

try {
const result = await generateImage({
adapter: openaiImage('gpt-image-1'),
adapter: openaiImage('gpt-image-2.5-flare'),
threadId: crypto.randomUUID(),
prompt,
numberOfImages,
Expand All @@ -45,7 +45,7 @@ export const Route = createFileRoute('/demo/api/ai/image')({
return new Response(
JSON.stringify({
images: result.images,
model: 'gpt-image-1',
model: 'gpt-image-2.5-flare',
}),
{
status: 200,
Expand Down
9 changes: 9 additions & 0 deletions packages/create/tests/template-model-ids.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ const RETIRED_CLAUDE_MODEL = /claude-3(?:-5|-7)?-(?:opus|sonnet|haiku)/
// Google shut down gemini-2.0-flash (and its -exp variants) on 2026-06-01.
const RETIRED_GEMINI_MODEL = /gemini-2\.0-flash/

// OpenAI shut down gpt-image-1 on 2026-10-23 (gpt-image-1-mini is unaffected).
const RETIRED_OPENAI_IMAGE_MODEL = /gpt-image-1(?![\w.-])/

function listFiles(dir: string): Array<string> {
return readdirSync(dir).flatMap((entry) => {
if (entry === 'node_modules') return []
Expand Down Expand Up @@ -53,6 +56,12 @@ describe('framework templates', () => {
)
})

it('do not reference retired OpenAI image model IDs', () => {
expect(
findRetiredModelFiles(frameworksDir, RETIRED_OPENAI_IMAGE_MODEL),
).toEqual([])
})

it('ignores installed dependencies while checking authored templates', () => {
const root = mkdtempSync(join(tmpdir(), 'tanstack-model-scan-'))
try {
Expand Down