[PR #6313] [MERGED] feat: add fal.ai image generation connections #7131

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

📋 Pull Request Information

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

Base: staging ← Head: codex/fal-image-provider


📝 Commits (3)

  • 030c85e chore: start fal image provider request
  • 6417473 feat: add fal.ai image generation connections
  • f61e847 fix: guard fal.ai transport and single-image billing

📊 Changes

12 files changed (+411 additions, -44 deletions)

View changed files

📝 CHANGELOG.md (+3 -0)
📝 docs/media/image-providers.md (+9 -2)
➕ e2e/fal-image.e2e.ts (+80 -0)
📝 packages/client/src/components/connections/ConnectionEditor.tsx (+51 -35)
📝 packages/client/src/hooks/use-connections.ts (+7 -4)
📝 packages/client/src/localization/locales/en.json (+4 -0)
📝 packages/server/src/routes/connections.routes.ts (+15 -0)
➕ packages/server/src/services/image/fal-image.ts (+19 -0)
📝 packages/server/src/services/image/image-generation.ts (+47 -0)
📝 packages/shared/src/constants/model-lists.ts (+16 -0)
➕ scripts/regressions/fal-image.regression.ts (+155 -0)
📝 scripts/regressions/image-custom-parameters.regression.ts (+5 -3)

📄 Description

Users with fal.ai credits can now select fal.ai in an image connection and generate images through their existing Marinara image workflow. The default endpoint is https://fal.run, with FLUX.1 Schnell and Dev starter models and support for compatible custom text-to-image endpoint IDs.

Closes #6312

The implementation uses native HTTP and reuses connection settings, custom parameters, debug logging, generation deadlines, cancellation and safe image downloads. API keys use fal.ai's Key authentication and are not forwarded when downloading images. Remote endpoints require HTTPS; HTTP is permitted only for loopback proxies. Custom parameters cannot request extra billed images that the single-image result would discard. Test Connection validates configuration without generating an image; Test Image performs the paid generation. The setup guide explains the synchronous text-to-image boundary and model-specific options. Documentation translations are tracked in #6316 and are being prepared in #6311.

Browser verification also exposed a shared auto-save race: a fast connection-test result could be cleared by the subsequent editor refresh. The update hook now awaits that refresh before starting the test.

Validation completed locally:

  • pnpm check and pnpm version:check.
  • Focused fal.ai HTTP/connection and image custom-parameter regressions, covering payloads, authentication, downloads, rejected private origins, invalid model IDs, malformed responses, cancellation, configuration-only checks and redacted debug logs.
  • Nine browser checks across desktop Chromium, mobile Chromium and mobile WebKit: fal.ai setup/reload, image custom parameters and adjacent GPT Image controls.
  • Local CodeRabbit review completed with zero findings after the save/test fix.
  • Desktop/mobile before-and-after selection screenshots, using synthetic data; inspected in light/dark themes.

Provider behavior follows the fal.ai authentication guide and FLUX Schnell API schema. No paid fal.ai generation or physical-device calibration was performed.

  • Manually verify text-to-image generation with a fal.ai API key and available credits.
  • Manually verify another compatible fal.ai model and its custom parameters.
  • Manually verify the connection editor on a physical mobile device.

Summary by CodeRabbit

  • New Features

    • Added fal.ai support for image-generation connections, including FLUX starter models and custom endpoints.
    • Added support for prompts, dimensions, negative prompts, custom parameters, image previews, and gallery integration.
    • Added API key validation and configuration guidance for fal.ai connections.
  • Bug Fixes

    • Connection saves now reliably complete before subsequent updates, preventing stale settings from overwriting newer changes.
  • Documentation

    • Added fal.ai setup, model, endpoint, testing, and usage guidance.

🔄 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/6313 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/18/2026 **Status:** ✅ Merged **Merged:** 9/18/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/fal-image-provider` --- ### 📝 Commits (3) - [`030c85e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/030c85ed66ad8ee0f3b5c8113f9ad28becb04fd8) chore: start fal image provider request - [`6417473`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6417473f67f012d5084706f3839a3951b70fd7e0) feat: add fal.ai image generation connections - [`f61e847`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f61e8473f9538cd9a4c0e23acdf35fd3a393e855) fix: guard fal.ai transport and single-image billing ### 📊 Changes **12 files changed** (+411 additions, -44 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+3 -0) 📝 `docs/media/image-providers.md` (+9 -2) ➕ `e2e/fal-image.e2e.ts` (+80 -0) 📝 `packages/client/src/components/connections/ConnectionEditor.tsx` (+51 -35) 📝 `packages/client/src/hooks/use-connections.ts` (+7 -4) 📝 `packages/client/src/localization/locales/en.json` (+4 -0) 📝 `packages/server/src/routes/connections.routes.ts` (+15 -0) ➕ `packages/server/src/services/image/fal-image.ts` (+19 -0) 📝 `packages/server/src/services/image/image-generation.ts` (+47 -0) 📝 `packages/shared/src/constants/model-lists.ts` (+16 -0) ➕ `scripts/regressions/fal-image.regression.ts` (+155 -0) 📝 `scripts/regressions/image-custom-parameters.regression.ts` (+5 -3) </details> ### 📄 Description Users with fal.ai credits can now select **fal.ai** in an image connection and generate images through their existing Marinara image workflow. The default endpoint is `https://fal.run`, with FLUX.1 Schnell and Dev starter models and support for compatible custom text-to-image endpoint IDs. Closes #6312 The implementation uses native HTTP and reuses connection settings, custom parameters, debug logging, generation deadlines, cancellation and safe image downloads. API keys use fal.ai's `Key` authentication and are not forwarded when downloading images. Remote endpoints require HTTPS; HTTP is permitted only for loopback proxies. Custom parameters cannot request extra billed images that the single-image result would discard. **Test Connection** validates configuration without generating an image; **Test Image** performs the paid generation. The setup guide explains the synchronous text-to-image boundary and model-specific options. Documentation translations are tracked in #6316 and are being prepared in #6311. Browser verification also exposed a shared auto-save race: a fast connection-test result could be cleared by the subsequent editor refresh. The update hook now awaits that refresh before starting the test. Validation completed locally: - `pnpm check` and `pnpm version:check`. - Focused fal.ai HTTP/connection and image custom-parameter regressions, covering payloads, authentication, downloads, rejected private origins, invalid model IDs, malformed responses, cancellation, configuration-only checks and redacted debug logs. - Nine browser checks across desktop Chromium, mobile Chromium and mobile WebKit: fal.ai setup/reload, image custom parameters and adjacent GPT Image controls. - Local CodeRabbit review completed with zero findings after the save/test fix. - [Desktop/mobile before-and-after selection screenshots](https://gist.github.com/SpicyMarinara/1285d3bd35f5ed7574a191b8445798f3), using synthetic data; inspected in light/dark themes. Provider behavior follows the [fal.ai authentication guide](https://fal.ai/docs/documentation/setting-up/authentication) and [FLUX Schnell API schema](https://fal.ai/models/fal-ai/flux/schnell/api). No paid fal.ai generation or physical-device calibration was performed. - [ ] Manually verify text-to-image generation with a fal.ai API key and available credits. - [ ] Manually verify another compatible fal.ai model and its custom parameters. - [ ] Manually verify the connection editor on a physical mobile device. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added fal.ai support for image-generation connections, including FLUX starter models and custom endpoints. - Added support for prompts, dimensions, negative prompts, custom parameters, image previews, and gallery integration. - Added API key validation and configuration guidance for fal.ai connections. - **Bug Fixes** - Connection saves now reliably complete before subsequent updates, preventing stale settings from overwriting newer changes. - **Documentation** - Added fal.ai setup, model, endpoint, testing, and usage guidance. <!-- 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:16:49 +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#7131
No description provided.