[PR #1500] [MERGED] feat(image-gen): native Google Gemini (Nano Banana) image provider #5113

Closed
opened 2026-10-22 04:13:24 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1500
Author: @aeriondyseti
Created: 5/29/2026
Status: ✅ Merged
Merged: 5/29/2026
Merged by: @SpicyMarinara

Base: refactor ← Head: feature/nano-banana-image-gen


📝 Commits (4)

  • b44375c feat(image-gen): add native Google Gemini (Nano Banana) image provider
  • 7887cc1 Merge branch 'refactor' into feature/nano-banana-image-gen
  • 060937e Merge branch 'refactor' into feature/nano-banana-image-gen
  • 3b5654b Warn when Imagen ignores reference images

📊 Changes

10 files changed (+5605 additions, -6371 deletions)

View changed files

📝 graphify-out/.graphify_labels.json (+1 -8)
📝 graphify-out/GRAPH_REPORT.md (+326 -343)
➕ graphify-out/cache/ast/0c468d13d6693ca5eb6c25a89b5393d4b6bee311d688509e699b5b3ea4d1b183.json (+1 -0)
➕ graphify-out/cache/ast/bf8fdc4705730c34965d8b0fbe834d0e3c51db5128e6101d3d8b4e102bcd18d8.json (+1 -0)
📝 graphify-out/cache/stat-index.json (+1 -1)
📝 graphify-out/graph.json (+3857 -4822)
📝 graphify-out/manifest.json (+1140 -1195)
📝 src-tauri/src/commands/storage/images/providers.rs (+239 -1)
📝 src-tauri/src/commands/storage/llm.rs (+20 -0)
📝 src/engine/contracts/constants/model-lists.ts (+19 -1)

📄 Description

Linked issue

Closes #1507

Why this change

Google AI Studio image-generation keys were being routed through the existing OpenRouter-style Gemini image path. That sent the wrong endpoint shape and bearer auth, so native Google Gemini / Imagen image generation could not work correctly from Marinara image connections.

What changed

  • Added a native google_image provider path for Google's Generative Language API.
  • Added Google-host detection and a default Google image base URL.
  • Added Gemini image model handling through generateContent with image response modalities.
  • Added Imagen model handling through predict with fixed aspect-ratio mapping.
  • Added Google image connection-test support using x-goog-api-key.
  • Updated the frontend image-service/model list for current Gemini and Imagen image models.
  • Warn when Imagen models receive reference images, since that endpoint does not consume them.

Refactor impact

Primary owner:

Rust storage / image generation provider transport, connection testing, image-generation model catalog.

Impact areas reviewed:

Image-generation provider source detection, Google image request payloads, Google connection tests, frontend model/service selection.

Boundary notes:

Provider transport stays in src-tauri; frontend changes only update connection defaults/model lists. No engine-to-React boundary changes.

Pressure points touched:

src-tauri/src/commands/storage/images/providers.rs, src-tauri/src/commands/storage/llm.rs, src/engine/contracts/constants/model-lists.ts.

Validation

  • pnpm check passes locally
  • pnpm typecheck passes locally
  • pnpm build passes locally
  • pnpm check:architecture passes locally
  • pnpm check:docs passes locally
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passes locally
  • Rust clippy/tests were run for Rust behavior changes
  • Browser or Tauri app manual verification completed
  • Playwright, screenshot, or recording evidence added for UI changes
  • Remote runtime smoke checked when relevant

Manual verification notes

Original author verified in tauri dev against a real Google AI Studio key: connection test passed, and image generation returned for gemini-2.5-flash-image plus Gemini 3.x image models.

Maintainer follow-up verified cargo check --manifest-path src-tauri/Cargo.toml --workspace and cargo fmt --manifest-path src-tauri/Cargo.toml --all --check after adding the Imagen reference-image warning.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

UI evidence

No visible UI layout changes; connection/model list changes are covered by the service/model entries and manual native app verification above.


🔄 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/1500 **Author:** [@aeriondyseti](https://github.com/aeriondyseti) **Created:** 5/29/2026 **Status:** ✅ Merged **Merged:** 5/29/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `refactor` ← **Head:** `feature/nano-banana-image-gen` --- ### 📝 Commits (4) - [`b44375c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b44375c6f2e89c20b9b2903d18e5fd0d6eda2d60) feat(image-gen): add native Google Gemini (Nano Banana) image provider - [`7887cc1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7887cc14e23e7c74ef990fa915ede52155973d30) Merge branch 'refactor' into feature/nano-banana-image-gen - [`060937e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/060937e474869e30579dc4956c00b091c3aeb436) Merge branch 'refactor' into feature/nano-banana-image-gen - [`3b5654b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3b5654b489ce07a08ddab34caba74fa046cbffc9) Warn when Imagen ignores reference images ### 📊 Changes **10 files changed** (+5605 additions, -6371 deletions) <details> <summary>View changed files</summary> 📝 `graphify-out/.graphify_labels.json` (+1 -8) 📝 `graphify-out/GRAPH_REPORT.md` (+326 -343) ➕ `graphify-out/cache/ast/0c468d13d6693ca5eb6c25a89b5393d4b6bee311d688509e699b5b3ea4d1b183.json` (+1 -0) ➕ `graphify-out/cache/ast/bf8fdc4705730c34965d8b0fbe834d0e3c51db5128e6101d3d8b4e102bcd18d8.json` (+1 -0) 📝 `graphify-out/cache/stat-index.json` (+1 -1) 📝 `graphify-out/graph.json` (+3857 -4822) 📝 `graphify-out/manifest.json` (+1140 -1195) 📝 `src-tauri/src/commands/storage/images/providers.rs` (+239 -1) 📝 `src-tauri/src/commands/storage/llm.rs` (+20 -0) 📝 `src/engine/contracts/constants/model-lists.ts` (+19 -1) </details> ### 📄 Description ## Linked issue Closes #1507 ## Why this change Google AI Studio image-generation keys were being routed through the existing OpenRouter-style Gemini image path. That sent the wrong endpoint shape and bearer auth, so native Google Gemini / Imagen image generation could not work correctly from Marinara image connections. ## What changed - Added a native `google_image` provider path for Google's Generative Language API. - Added Google-host detection and a default Google image base URL. - Added Gemini image model handling through `generateContent` with image response modalities. - Added Imagen model handling through `predict` with fixed aspect-ratio mapping. - Added Google image connection-test support using `x-goog-api-key`. - Updated the frontend image-service/model list for current Gemini and Imagen image models. - Warn when Imagen models receive reference images, since that endpoint does not consume them. ## Refactor impact Primary owner: Rust storage / image generation provider transport, connection testing, image-generation model catalog. Impact areas reviewed: Image-generation provider source detection, Google image request payloads, Google connection tests, frontend model/service selection. Boundary notes: Provider transport stays in `src-tauri`; frontend changes only update connection defaults/model lists. No engine-to-React boundary changes. Pressure points touched: `src-tauri/src/commands/storage/images/providers.rs`, `src-tauri/src/commands/storage/llm.rs`, `src/engine/contracts/constants/model-lists.ts`. ## Validation - [ ] `pnpm check` passes locally - [x] `pnpm typecheck` passes locally - [x] `pnpm build` passes locally - [x] `pnpm check:architecture` passes locally - [ ] `pnpm check:docs` passes locally - [x] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [x] Rust clippy/tests were run for Rust behavior changes - [x] Browser or Tauri app manual verification completed - [ ] Playwright, screenshot, or recording evidence added for UI changes - [ ] Remote runtime smoke checked when relevant ### Manual verification notes Original author verified in `tauri dev` against a real Google AI Studio key: connection test passed, and image generation returned for `gemini-2.5-flash-image` plus Gemini 3.x image models. Maintainer follow-up verified `cargo check --manifest-path src-tauri/Cargo.toml --workspace` and `cargo fmt --manifest-path src-tauri/Cargo.toml --all --check` after adding the Imagen reference-image warning. ## Docs and release impact - [x] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [x] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence No visible UI layout changes; connection/model list changes are covered by the service/model entries and manual native app verification above. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:13:24 +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#5113
No description provided.