Expand migrated image API: model selection, edits and 2K export - #42
Merged
Merged
Conversation
Owner
|
@Bl0ck154 thank for your commits, but it has some conflict, help me fix them I will review it today |
Bl0ck154
force-pushed
the
feature/migrated-image-api
branch
from
September 17, 2026 07:40
005ad11 to
b7eda7a
Compare
Contributor
Author
|
Rebased this PR onto the current main and resolved the conflicts while preserving the newer upstream Flow/video changes. The branch is now mergeable/clean on GitHub.\n\nValidation after the rebase:\n- focused Flow/image tests: 110 passed\n- git diff --check: clean\n- Python compile checks: passed\n- node --check for the touched extension scripts: passed\n\nI also cross-checked the server checkout before resolving this: its tracked main was already fully pushed (HEAD == origin/main), so there were no unpublished code changes there to recover. |
This was referenced Sep 17, 2026
crisng95
added a commit
that referenced
this pull request
Sep 17, 2026
First release since v1.1.0 (2026-05-09), and it is one arc: Flow moved to flow.google.com in September 2026 and stopped minting the bearer the old REST API needed, so the transport was rebuilt on batchexecute (#39), the dead REST path deleted (#49), the image API migrated (#42), and the Omni image-conditioned modes ported back on top of it (#48/#50). Also fixes a version drift this release would otherwise have deepened. ccf89c6 put "0.2.0" in two places in agent/main.py; 939b956 bumped only the FastAPI line, so /health has reported 0.2.0 ever since while the app said 1.1.0 — three releases stale, on the endpoint CLAUDE.md tells you to curl before anything else. /health now reads app.version, so there is one string to bump instead of two literals that agree only by luck. extension/manifest.json is deliberately not bumped. It tracks the extension's own lifecycle, it is at 0.3.2, and a bump there forces a user-visible reload. Verified: 272 passed; /health and app.version both report 1.2.0, checked by calling the handler rather than reading the source. Not verified: the Omni envelopes from #48. They are live-verified per that PR and the tests lock their shape, but nothing has submitted through a signed-in Flow tab since the merge resolution. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E5BJVhNgerhFTUgmfnKTSj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Expands the migrated
flow.google.comimage path with the capabilities currently exposed by Flow's UI, fixes Nano Banana Pro transport/count semantics, adds bounded wave-based recovery for transient image failures, and restores true image edit + high-resolution export.What changes
image_modelselection onPOST /api/flow/generate-imageHARBOR_SEAL(Nano Banana 2 Lite) alongside Nano Banana Pro / Nano Banana 2count(1-4) and optionalseedcount=Nlike Flow itself: N independent single-imageogiZ0bRPCs, each with its own single-use reCAPTCHAsource-pathand page locale metadata;GEM_PIX_2requires this even where Lite is tolerant[8][8], once, after a 34-second cooldown with fresh request UUIDs and the same seedcomplete=false,generated_count, andfailed_variants1:1,9:16,16:9,3:4,4:3IMAGE_ASPECT_RATIO_PORTRAIT_THREE_FOURspelling while retaining the old alias/api/flow/edit-image: source media uses Flow'sBASE_IMAGEwire type (2), extra refs remainREFERENCEtype (1)SPrCad/FlowService.UpsampleImagePOST /api/flow/export-image(2kdefault,4kplan-gated)Live verification
Verified end-to-end against the current Flow frontend/account:
count=4source-pathmatches the UIogiZ0brequests, not one multi-item RPCcomplete=true, in 63.37sBASE_IMAGEedit successfullySPrCad2K export produced a valid JPEG; 1376x768 source -> 2752x1536 (~3.1 MB)The current Flow UI exposes exactly five image aspect ratios:
1:1,9:16,16:9,3:4,4:3.The
[8]retry is explicitly a FlowKit resilience policy. Live UI capture did not show the same automatic retry after a failed x4 wave.Forward compatibility
Flow can add model ids independently of FlowKit releases. Previously an unknown model was silently replaced with
GEM_PIX_2; this PR only falls back for blank/invalid ids, while a valid Flow-style wire id is preserved as requested.Validation
image_model,count,seed,reference_media_ids, and/api/flow/export-imagegit diff --checkcleanThe repository's full test run on upstream
ce37f4bstill has the same unrelated pre-existing failures aroundprocessor._retry_stateandresult_handlerfixtures (3 failed, 250 passed, 9 errors); the focused migrated Flow/image tests are green.