[GH-ISSUE #1337] Slurp: send reference images to SpicyAPI edit models #683

Closed
opened 2026-10-20 17:29:42 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @SpicyMarinara on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1337

Originally assigned to: @SpicyMarinara on GitHub.

Problem

Marinara Engine is adding a SpicyAPI image service (Pasta-Devs/Marinara-Engine#7489, closes Pasta-Devs/Marinara-Engine#7478). SpicyAPI edit models, whose IDs end in /edit, accept reference images. The Engine shrinks the references to SpicyAPI's 1 MB per image and 2 MB per request limits and sends them.

Slurp never sends them. slpImageReferencesSupported in packages/slurp2/src/engine/packages/server/src/slp/base/media/slp-image-references.ts returns false for the spicyapi service. Both callers then drop referenceImages before calling generateImage:

  • packages/slurp2/src/engine/packages/server/src/slp/features/media/slp-images-service.ts (allowAvatarReferences)
  • packages/slurp2/src/engine/packages/server/src/slp/features/media/slp-public-images-service.ts (allowAvatarReferences)

So a Slurp image connection on a SpicyAPI edit model generates without the avatar reference, even with avatar references turned on.

Suggested change

Allow spicyapi when the model ID ends in /edit, and keep every existing rule as it is:

     if (/^(?:automatic1111|comfyui|swarmui|runpod_comfyui|gemini_image|nanogpt|xai)$/u.test(service)) return true;
+    if (service === "spicyapi") return /\/edit$/u.test(model);

Note: the service fallback uses inferImageSource from the frozen vendored shared snapshot, which does not know spicyapi.ai hosts. A connection that sets the SpicyAPI service explicitly works with the line above. If connections without a service field should work too, match the spicyapi.ai host in package-owned code, because the vendored shared dist cannot be refreshed.

Acceptance

  • A Slurp image connection on SpicyAPI with a model ending in /edit passes avatar references to generateImage.
  • SpicyAPI text-to-image models (for example alibaba/z-image-spicy-pro/text-to-image) still get text only.
  • The fallback connection must also support references, as it does today.
  • A package regression covers both SpicyAPI cases.
  • Lands after Engine #7489 ships the spicyapi service.

Reported by CodeRabbit on Engine #7489: https://github.com/Pasta-Devs/Marinara-Engine/pull/7489

Originally created by @SpicyMarinara on GitHub (Oct 12, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1337 Originally assigned to: @SpicyMarinara on GitHub. ## Problem Marinara Engine is adding a **SpicyAPI** image service (Pasta-Devs/Marinara-Engine#7489, closes Pasta-Devs/Marinara-Engine#7478). SpicyAPI edit models, whose IDs end in `/edit`, accept reference images. The Engine shrinks the references to SpicyAPI's 1 MB per image and 2 MB per request limits and sends them. Slurp never sends them. `slpImageReferencesSupported` in `packages/slurp2/src/engine/packages/server/src/slp/base/media/slp-image-references.ts` returns `false` for the `spicyapi` service. Both callers then drop `referenceImages` before calling `generateImage`: - `packages/slurp2/src/engine/packages/server/src/slp/features/media/slp-images-service.ts` (`allowAvatarReferences`) - `packages/slurp2/src/engine/packages/server/src/slp/features/media/slp-public-images-service.ts` (`allowAvatarReferences`) So a Slurp image connection on a SpicyAPI edit model generates without the avatar reference, even with avatar references turned on. ## Suggested change Allow `spicyapi` when the model ID ends in `/edit`, and keep every existing rule as it is: ```diff if (/^(?:automatic1111|comfyui|swarmui|runpod_comfyui|gemini_image|nanogpt|xai)$/u.test(service)) return true; + if (service === "spicyapi") return /\/edit$/u.test(model); ``` Note: the service fallback uses `inferImageSource` from the frozen vendored shared snapshot, which does not know `spicyapi.ai` hosts. A connection that sets the SpicyAPI service explicitly works with the line above. If connections without a service field should work too, match the `spicyapi.ai` host in package-owned code, because the vendored shared dist cannot be refreshed. ## Acceptance - A Slurp image connection on SpicyAPI with a model ending in `/edit` passes avatar references to `generateImage`. - SpicyAPI text-to-image models (for example `alibaba/z-image-spicy-pro/text-to-image`) still get text only. - The fallback connection must also support references, as it does today. - A package regression covers both SpicyAPI cases. - Lands after Engine #7489 ships the `spicyapi` service. Reported by CodeRabbit on Engine #7489: https://github.com/Pasta-Devs/Marinara-Engine/pull/7489
bsakaguchi 2026-10-20 17:29:42 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Oct 13, 2026):

Partly prepared in #1356: slpImageReferencesSupported now allows SpicyAPI edit models (model IDs ending in /edit). Still missing: Slurp's bundled generateImage comes from the frozen sources/engine snapshot, which has no SpicyAPI adapter. The frozen inferImageSource / normalizeExplicitImageSource send a spicyapi connection down the OpenAI images path, so SpicyAPI pictures don't generate in Slurp at all yet. Next step: a package-owned SpicyAPI adapter overlay that mirrors the Engine's (Pasta-Devs/Marinara-Engine#7489). Then the reference images take effect.

<!-- gh-comment-id:6148887334 --> @SpicyMarinara commented on GitHub (Oct 13, 2026): Partly prepared in #1356: `slpImageReferencesSupported` now allows SpicyAPI edit models (model IDs ending in `/edit`). Still missing: Slurp's bundled `generateImage` comes from the frozen `sources/engine` snapshot, which has no SpicyAPI adapter. The frozen `inferImageSource` / `normalizeExplicitImageSource` send a `spicyapi` connection down the OpenAI images path, so SpicyAPI pictures don't generate in Slurp at all yet. Next step: a package-owned SpicyAPI adapter overlay that mirrors the Engine's (Pasta-Devs/Marinara-Engine#7489). Then the reference images take effect.
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-Agents#683
No description provided.