feat(ai-openai): accept gpt-image-2.5-flare and gpt-image-2.5-sunburst - #1529
Conversation
OpenAI released both models on 2026-09-08. The size check threw "Unknown image model" before sending, and OpenAIImageModel rejected both ids. Add them with sizes 1024x1024, 1536x1024, 1024x1536 and auto, and quality low, medium, high, xhigh, max and auto. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: TanStack/ai/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (10)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe OpenAI image adapter now supports ChangesGPT Image 2.5 models
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable issue remains in the reviewed model support, request handling, or tests; the PR is mergeable after normal checks. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to The change expands an image-generation integration and introduces a test endpoint. Normal testing uses fixed inputs and a local mock service, but the endpoint’s deployment constraints have not been demonstrated. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
View your CI Pipeline Execution ↗ for commit 0021811
☁️ Nx Cloud last updated this comment at |
@tanstack/ai
@tanstack/ai-acp
@tanstack/ai-angular
@tanstack/ai-anthropic
@tanstack/ai-bedrock
@tanstack/ai-byteplus
@tanstack/ai-claude-code
@tanstack/ai-client
@tanstack/ai-cloudflare
@tanstack/ai-code-mode
@tanstack/ai-code-mode-snippets
@tanstack/ai-codex
@tanstack/ai-cohere
@tanstack/ai-compaction
@tanstack/ai-devtools-core
@tanstack/ai-durable-stream
@tanstack/ai-elevenlabs
@tanstack/ai-event-client
@tanstack/ai-fal
@tanstack/ai-gemini
@tanstack/ai-grok
@tanstack/ai-grok-build
@tanstack/ai-groq
@tanstack/ai-isolate-cloudflare
@tanstack/ai-isolate-daytona
@tanstack/ai-isolate-node
@tanstack/ai-isolate-quickjs
@tanstack/ai-isolate-quickjs-bun
@tanstack/ai-llmgateway
@tanstack/ai-lovable
@tanstack/ai-mcp
@tanstack/ai-memory
@tanstack/ai-mistral
@tanstack/ai-octane
@tanstack/ai-ollama
@tanstack/ai-openai
@tanstack/ai-opencode
@tanstack/ai-openrouter
@tanstack/ai-perplexity
@tanstack/ai-persistence
@tanstack/ai-preact
@tanstack/ai-react
@tanstack/ai-react-ui
@tanstack/ai-reactor
@tanstack/ai-remix
@tanstack/ai-sandbox
@tanstack/ai-sandbox-blaxel
@tanstack/ai-sandbox-boxd
@tanstack/ai-sandbox-cloudflare
@tanstack/ai-sandbox-daytona
@tanstack/ai-sandbox-docker
@tanstack/ai-sandbox-e2b
@tanstack/ai-sandbox-local-process
@tanstack/ai-sandbox-sprites
@tanstack/ai-sandbox-upstash-box
@tanstack/ai-sandbox-vercel
@tanstack/ai-skills
@tanstack/ai-solid
@tanstack/ai-solid-ui
@tanstack/ai-svelte
@tanstack/ai-typesafe
@tanstack/ai-utils
@tanstack/ai-vercel-gateway
@tanstack/ai-vertex
@tanstack/ai-vue
@tanstack/ai-vue-ui
@tanstack/ai-worldlabs
@tanstack/openai-base
@tanstack/preact-ai-devtools
@tanstack/react-ai-devtools
@tanstack/solid-ai-devtools
@tanstack/svelte-ai-devtools
commit: |
You can now use
gpt-image-2.5-flareandgpt-image-2.5-sunburstwithopenaiImage(). Today both ids fail the type check, and at run time the size check throwsUnknown image modelbefore any request goes out. This PR adds both models with the sizes and quality levels that OpenAI documents, including the newxhighandmaxquality levels.🎯 Changes
model-meta.ts: add both models toOPENAI_IMAGE_MODELS. The token prices are the same asgpt-image-2.image-provider-options.ts: sizes1024x1024,1536x1024,1024x1536andauto.qualityislow | medium | high | xhigh | max | auto.backgroundis allowed.adapters/image.ts: up to 16 edit source images, the same as the other gpt-image models. ThemodelOptionsspread is cast, because the OpenAI SDK (6.41.0)qualitytype does not listxhigh/maxyet.docs/media/image-generation.md.Sources: gpt-image-2.5-flare, gpt-image-2.5-sunburst, image generation guide, changelog (2026-09-08).
✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.docs/for this change, or this change is not user-facing.pnpm changeset), or this PR does not change a published package.🚀 Release Impact
Testing
Commands run
pnpm test:pr: passed.pnpm --filter @tanstack/ai-e2e exec playwright test tests/openai-image-2-5-models.spec.ts tests/image-gen.spec.ts tests/image-to-image.spec.ts: 8 passed. I did not run the full E2E suite.mainwithUnknown image model: gpt-image-2.5-flare.Manual test
pnpm --filter @tanstack/ai-openai exec vitest run tests/image-adapter.test.ts.sends gpt-image-2.5-flare with a listed size and the xhigh quality(and the sunburst case). Both pass.How this PR makes testing easy
packages/ai-openai/tests/image-adapter.test.ts, one case per model.testing/e2e/tests/openai-image-2-5-models.spec.tsgenerates one image on each model through aimock.Risk / rollback
Low. The change only adds model ids. Existing models keep the same behavior. OpenAI does not publish a separate edit input cap for the 2.5 models, so 16 is the gpt-image family cap. The API returns its own error if the cap is lower. Revert the PR to undo.
Public API change
Before
After
🤖 Generated with Claude Code
Summary by CodeRabbit
gpt-image-2.5-flareandgpt-image-2.5-sunburstmodels for image generation and image editing.xhighandmaxquality settings.