Repository navigation
fix(images): Fal edits run on Flux Dev's edit endpoints, and Flux Redux takes its reference as redux_image - #351
Conversation
…ux takes its reference as redux_image fal-ai/flux/dev is a text-to-image endpoint whose input has no image, and it was the edit default: an edit sent image, strength and a mask that the endpoint does not take. An edit with no model, or on fal-ai/flux/dev, now runs on fal-ai/flux/dev/image-to-image (image_url, strength), or with a mask on fal-ai/flux-lora/inpainting (image_url, mask_url, strength); an image-to-image or inpainting endpoint gets those fields; the source and mask go typed by their bytes, and the FLUX.1 dev endpoints get no negative prompt, which they do not take. Replicate's Flux Redux requires redux_image, which replaces the prompt, and has no image input. The reference now goes as redux_image, with no prompt or negative prompt unless the caller's own input sets them, and a Redux generation with no reference is refused before the request.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Reviewer's GuideFixes vendor-schema mismatches for Fal image editing and Replicate Flux Redux by selecting compatible Fal edit endpoints, using their required input fields, suppressing unsupported prompts, and validating Redux references; documentation and end-to-end/provider tests capture the new behavior. Sequence diagram for Fal image edit endpoint selectionsequenceDiagram
participant Caller
participant FalImageProvider
participant FalAPI
Caller->>FalImageProvider: editImage(request)
alt no model or modelId is fal-ai/flux/dev
alt mask provided
FalImageProvider->>FalAPI: request fal-ai/flux-lora/inpainting with image_url, mask_url, strength
else no mask
FalImageProvider->>FalAPI: request fal-ai/flux/dev/image-to-image with image_url, strength
end
else compatible named model
FalImageProvider->>FalAPI: request named model with its supported image fields
end
FalAPI-->>Caller: edited image result
Sequence diagram for Flux Redux reference validationsequenceDiagram
participant Caller
participant ReplicateImageProvider
participant ReplicateAPI
Caller->>ReplicateImageProvider: generateImage(referenceImageUrl, providerOptions)
alt redux_image is provided or referenceImageUrl is supplied
ReplicateImageProvider->>ReplicateAPI: request flux-redux-dev with redux_image
ReplicateAPI-->>Caller: generated variation
else no Redux reference
ReplicateImageProvider-->>Caller: throw reference-image validation error
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Warning Review limit reached
This review includes 6 billable files and costs up to $1.50.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 24 minutes for your next included review. View limit details
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6de8912037
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A version-pinned Redux request may give its whole input through providerOptions.replicate.extraBody.input, which the legacy endpoint's branches put over the body. The check that refuses a Redux request with no redux_image ran before that and refused such a request. It now reads the input the request sends.
…paints, and Redux drops the prompt however its reference came Fal's image-to-image endpoint has no mask input: a masked edit that named it now runs on the inpainting endpoint, as one on fal-ai/flux/dev does. The Redux prompt was dropped only when the reference came as referenceImageUrl; a redux_image given in providerOptions.input kept the prompt this provider adds, which the model's input does not have. It is now dropped for every Redux request.
## [0.13.71](v0.13.70...v0.13.71) (2026-10-12) ### fix * **images:** Fal edits run on Flux Dev's edit endpoints, and Flux Redux takes its reference as redux_image (#351) ([164d242](164d242)), closes [included](https://github.com/framerslab/agentos/issues/included) ### docs * add the method draft of the GMI versus agent() paper (#349) ([288c3ca](288c3ca)) * correct the sources of the GMI paper's result tables (#353) ([51f6a71](51f6a71))
Summary
Two image providers sent inputs the vendors' models do not take.
fal-ai/flux/devis a text-to-image endpoint: its input schema has no image field (queue schema, categorytext-to-image). It was the edit default, soeditImage({ provider: 'fal' })sentimage,strengthand a mask to an endpoint that takes none of them. An edit with no model, or onfal-ai/flux/dev, now runs onfal-ai/flux/dev/image-to-image(image_url,strength), or with a mask onfal-ai/flux-lora/inpainting(image_url,mask_url,strength). An image-to-image or inpainting endpoint the caller names gets the same fields. The source and the mask go typed by their bytes, and FLUX.1 dev's edit endpoints get no negative prompt, which they do not take. Any other model keeps theimage+strengthpair the provider has always sent.black-forest-labs/flux-redux-devrequiresredux_image, which "replaces prompt", and has noimage,promptornegative_promptinput. The reference now goes asredux_imagewith no prompt (a caller's ownproviderOptions.inputis still sent as given), and a Redux generation with no reference is refused before the request.The catalog rows and
IMAGE_EDITING.mdsay which endpoint an edit runs on.Linked issues
None: finding A7 of a cold read of the 2026-10-08 image changes.
Type of change
How this was verified
CI runs the tests; nothing was run locally. The vendor schemas were read on 2026-10-12 from the URLs above.
image-operation-default-models.e2e.test.ts, through the realeditImage,generateImageand provider classes with onlyfetchstubbed: a Fal edit posts tofal-ai/flux/dev/image-to-imagewithimage_urlandstrength, an inpaint tofal-ai/flux-lora/inpaintingwithmask_url; a Flux Redux generation postsredux_imageand no prompt.FalImageProvider.edit.test.tsandReplicateImageProvider.consistency.test.ts: the request bodies, now against the vendors' field names. Three tests pinned the old shapes, one of themimageon the image-to-image endpoint, whose schema requiresimage_url.Migration notes
None: no option or type is removed. A Fal edit that named no model, or
fal-ai/flux/dev, now runs on its edit endpoint, and the result names that endpoint.Checklist
!before the colon for a change that breaks users (feat!:orfeat(api)!:).Summary by Sourcery
Align Fal editing and Replicate Flux Redux requests with the vendors’ supported schemas.
Bug Fixes:
redux_imageand reject requests that omit a reference image.Enhancements:
Documentation:
Tests: