[PR #5972] [MERGED] feat(images): support GPT Image 2.5 Flare and Sunburst #7004

Closed
opened 2026-10-23 04:15:39 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5972
Author: @SpicyMarinara
Created: 9/8/2026
Status: ✅ Merged
Merged: 9/8/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feat/gpt-image-2-5


📝 Commits (4)

  • 3c285c3 feat(images): add GPT Image 2.5 model entries
  • ab7cd15 feat(images): wire GPT Image 2.5 capabilities and quality
  • 88ba358 docs: place GPT Image 2.5 under added features
  • 3661220 fix(connections): validate model values before editor initialization

📊 Changes

14 files changed (+448 additions, -62 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
➕ e2e/gpt-image-2-5.e2e.ts (+131 -0)
📝 packages/client/src/components/connections/ConnectionEditor.tsx (+22 -17)
📝 packages/client/src/lib/connection-transfer.ts (+3 -6)
📝 packages/client/src/localization/locales/en.json (+2 -0)
📝 packages/server/src/routes/sprites.routes.ts (+3 -10)
📝 packages/server/src/services/image/image-generation-defaults.ts (+2 -5)
📝 packages/server/src/services/image/image-generation.ts (+39 -18)
📝 packages/server/src/services/mari-db/mari-images.service.ts (+1 -5)
📝 packages/shared/src/constants/model-lists.ts (+2 -0)
📝 packages/shared/src/index.ts (+1 -0)
📝 packages/shared/src/types/connection.ts (+1 -1)
➕ packages/shared/src/utils/openai-image.ts (+30 -0)
➕ scripts/regressions/gpt-image-2-5.regression.ts (+210 -0)

📄 Description

Linked issue

Closes #5971

Why this change

Selecting GPT Image 2.5 currently hides quality controls and treats reference-image requests as ordinary text-to-image generation. Both official OpenAI variants now use Marinara's GPT Image generation/edit path, with the additional quality levels and size limits documented for 2.5.

What changed

  • Add gpt-image-2.5-flare and gpt-image-2.5-sunburst to the image model catalog. Recognize their dated snapshots in capability checks.
  • Support PNG generation, multipart reference edits, transparent backgrounds, and custom dimensions within the documented 16-pixel, aspect-ratio, edge and total-pixel limits.
  • Offer localized Extra high (xhigh) and Max quality settings for 2.5. Preserve them through save/reload, export/import and fallback connections; reset unsupported levels to Auto for older models.
  • Share the capability checks with sprite generation and Professor Mari's image editing. Keep expression sheets together for 2.5 and preserve older models' request formats and transparency behavior.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Automated verification:

  • pnpm check passed, including localization, TypeScript, ESLint and production builds. One existing hook-dependency warning in GameNarration.tsx.
  • pnpm regression:prompt passed.
  • node scripts/run-regressions.mjs --filter scripts/regressions/gpt-image-2-5.regression.ts passed: both models' JSON generation and multipart edits against a local HTTP fixture, exact valid canvases and invalid-size normalization, quality persistence/transfer/fallback, and older GPT Image / DALL-E controls.
  • pnpm smoke:ui e2e/gpt-image-2-5.e2e.ts passed in all three projects: desktop Chromium, mobile Chromium and mobile WebKit. Selected both models, saved/reloaded Extra high and Max, verified transparent single-sheet sprite previews and switching back to older GPT Image quality settings.
  • Docker image built and ran; /api/health and the browser shell both returned HTTP 200.
  • Full local node run: 232/234 passed. mari-guard-sibling-paths.regression.ts (canonical store-link assertion) and storage-writer-lock.regression.ts (invalid legacy lease fields) also failed in isolated macOS reruns. Those files and implementation paths are unchanged by this patch. The final head, 36612209c, passed the complete CI suite, including all desktop/mobile browser lanes, and completed CodeRabbit review with every thread resolved.

Integration proof for 31d60c042 (#5970) and 36612209c (#5972) combined also passed: pnpm check, both Roleplay command/streaming regressions, the GPT Image 2.5 regression, and all 15 focused desktop/mobile browser cases.

The model-initialization follow-up also passed pnpm check and all three browser projects, including a malformed model value with Max quality. Merged to staging as d4dcf909c.

Manual verification notes

Playwright exercised the real local UI and API; before/after screenshots were visually inspected in dark/light themes and desktop/mobile viewports. This is automated browser proof, not a human click-through or live provider test.

  • Manually verify live OpenAI generation and reference edits for both models with an eligible account, including output transparency and paid quality behavior. No live OpenAI API call was made.
  • Manually verify the quality choices in your preferred theme and exported/imported connections.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened
  • Version/release files updated (only if this PR includes a version bump)

Unreleased changelog entry added. No version bump, migration or new dependency.

UI evidence (if applicable)

Before/after screenshots for all three browser projects

The before captures use the staging ConnectionEditor at 8945372f4 with the new model catalog retained. After captures use this PR. Download the gist ZIP and open the HTML files to view the original embedded screenshots.

Official API references

Summary by CodeRabbit

  • New Features
    • Added support for OpenAI GPT Image 2.5 Flare and Sunburst image generation and reference edits.
    • Added transparent PNG output and custom image sizes for supported models.
    • Added “Extra high” and “Max” image-quality options.
    • Quality settings now adapt to the selected image model and persist across reloads.
  • Bug Fixes
    • Improved validation and fallback handling for unsupported model or quality combinations.
  • Documentation
    • Updated the unreleased changelog with GPT Image 2.5 support details.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/5972 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/8/2026 **Status:** ✅ Merged **Merged:** 9/8/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/gpt-image-2-5` --- ### 📝 Commits (4) - [`3c285c3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3c285c38f1c53e8a0f4d223bf2b32499a3a59a72) feat(images): add GPT Image 2.5 model entries - [`ab7cd15`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ab7cd157bfe7dbc747f4f3318df25e690187491a) feat(images): wire GPT Image 2.5 capabilities and quality - [`88ba358`](https://github.com/Pasta-Devs/Marinara-Engine/commit/88ba3580adeae5c16492ec1a86500fe1d5af69d0) docs: place GPT Image 2.5 under added features - [`3661220`](https://github.com/Pasta-Devs/Marinara-Engine/commit/36612209ca2b9ee73591716cbd41215dccac307e) fix(connections): validate model values before editor initialization ### 📊 Changes **14 files changed** (+448 additions, -62 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) ➕ `e2e/gpt-image-2-5.e2e.ts` (+131 -0) 📝 `packages/client/src/components/connections/ConnectionEditor.tsx` (+22 -17) 📝 `packages/client/src/lib/connection-transfer.ts` (+3 -6) 📝 `packages/client/src/localization/locales/en.json` (+2 -0) 📝 `packages/server/src/routes/sprites.routes.ts` (+3 -10) 📝 `packages/server/src/services/image/image-generation-defaults.ts` (+2 -5) 📝 `packages/server/src/services/image/image-generation.ts` (+39 -18) 📝 `packages/server/src/services/mari-db/mari-images.service.ts` (+1 -5) 📝 `packages/shared/src/constants/model-lists.ts` (+2 -0) 📝 `packages/shared/src/index.ts` (+1 -0) 📝 `packages/shared/src/types/connection.ts` (+1 -1) ➕ `packages/shared/src/utils/openai-image.ts` (+30 -0) ➕ `scripts/regressions/gpt-image-2-5.regression.ts` (+210 -0) </details> ### 📄 Description ## Linked issue Closes #5971 ## Why this change Selecting GPT Image 2.5 currently hides quality controls and treats reference-image requests as ordinary text-to-image generation. Both official OpenAI variants now use Marinara's GPT Image generation/edit path, with the additional quality levels and size limits documented for 2.5. ## What changed - Add `gpt-image-2.5-flare` and `gpt-image-2.5-sunburst` to the image model catalog. Recognize their dated snapshots in capability checks. - Support PNG generation, multipart reference edits, transparent backgrounds, and custom dimensions within the documented 16-pixel, aspect-ratio, edge and total-pixel limits. - Offer localized **Extra high** (`xhigh`) and **Max** quality settings for 2.5. Preserve them through save/reload, export/import and fallback connections; reset unsupported levels to Auto for older models. - Share the capability checks with sprite generation and Professor Mari's image editing. Keep expression sheets together for 2.5 and preserve older models' request formats and transparency behavior. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` Automated verification: - `pnpm check` passed, including localization, TypeScript, ESLint and production builds. One existing hook-dependency warning in `GameNarration.tsx`. - `pnpm regression:prompt` passed. - `node scripts/run-regressions.mjs --filter scripts/regressions/gpt-image-2-5.regression.ts` passed: both models' JSON generation and multipart edits against a local HTTP fixture, exact valid canvases and invalid-size normalization, quality persistence/transfer/fallback, and older GPT Image / DALL-E controls. - `pnpm smoke:ui e2e/gpt-image-2-5.e2e.ts` passed in all three projects: desktop Chromium, mobile Chromium and mobile WebKit. Selected both models, saved/reloaded Extra high and Max, verified transparent single-sheet sprite previews and switching back to older GPT Image quality settings. - Docker image built and ran; `/api/health` and the browser shell both returned HTTP 200. - Full local node run: **232/234 passed**. `mari-guard-sibling-paths.regression.ts` (canonical store-link assertion) and `storage-writer-lock.regression.ts` (invalid legacy lease fields) also failed in isolated macOS reruns. Those files and implementation paths are unchanged by this patch. The final head, `36612209c`, passed the complete CI suite, including all desktop/mobile browser lanes, and completed CodeRabbit review with every thread resolved. Integration proof for `31d60c042` (#5970) and `36612209c` (#5972) combined also passed: `pnpm check`, both Roleplay command/streaming regressions, the GPT Image 2.5 regression, and all 15 focused desktop/mobile browser cases. The model-initialization follow-up also passed `pnpm check` and all three browser projects, including a malformed model value with Max quality. Merged to `staging` as `d4dcf909c`. ### Manual verification notes Playwright exercised the real local UI and API; before/after screenshots were visually inspected in dark/light themes and desktop/mobile viewports. This is automated browser proof, not a human click-through or live provider test. - Manually verify live OpenAI generation and reference edits for both models with an eligible account, including output transparency and paid quality behavior. No live OpenAI API call was made. - Manually verify the quality choices in your preferred theme and exported/imported connections. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened - [ ] Version/release files updated (only if this PR includes a version bump) Unreleased changelog entry added. No version bump, migration or new dependency. ## UI evidence (if applicable) [Before/after screenshots for all three browser projects](https://gist.github.com/SpicyMarinara/d158f4c20392d37941ad2a3aa2915ce9) The before captures use the staging ConnectionEditor at `8945372f4` with the new model catalog retained. After captures use this PR. Download the gist ZIP and open the HTML files to view the original embedded screenshots. ## Official API references - [Image generation API guide](https://developers.openai.com/api/docs/guides/image-generation) - [GPT Image 2.5 Flare](https://developers.openai.com/api/docs/models/gpt-image-2.5-flare) - [GPT Image 2.5 Sunburst](https://developers.openai.com/api/docs/models/gpt-image-2.5-sunburst) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added support for OpenAI GPT Image 2.5 Flare and Sunburst image generation and reference edits. - Added transparent PNG output and custom image sizes for supported models. - Added “Extra high” and “Max” image-quality options. - Quality settings now adapt to the selected image model and persist across reloads. - **Bug Fixes** - Improved validation and fallback handling for unsupported model or quality combinations. - **Documentation** - Updated the unreleased changelog with GPT Image 2.5 support details. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:15:39 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#7004
No description provided.