fix: eliminate duplicate uploads and wasted credits in ref image gen - #2
Merged
Merged
Conversation
…ration Three fixes to _handle_generate_character_image: 1. Direct UUID extraction — after batchGenerateImages, try extracting UUID from the response before uploading. If found, use it directly (no duplicate image in Google Flow). 2. Skip regen on retry — if reference_image_url exists but media_id is missing, only retry the upload (no credit burned on regen). 3. SSL fix for GCS downloads — macOS Python often lacks root certs for storage.googleapis.com, causing upload to always fail. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ration Two fixes on top of the retry-saves-credits change: 1. Direct UUID extraction — after batchGenerateImages, try extracting UUID from the response before uploading. If found, use it directly (no duplicate image in Google Flow). 2. SSL fix for GCS downloads — macOS Python often lacks root certs for storage.googleapis.com, causing upload to always fail. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
sethliao
added a commit
to sethliao/flowkit
that referenced
this pull request
Jul 27, 2026
Per HANDOVER_CURSOR.md P0 crisng95#2 — Veo models consume significant credits. All video gen types (i2v, r2v, start-end, edit) now use Omni Flash via abra_t2v_8s across both PAYGATE_TIER_ONE and PAYGATE_TIER_TWO. Note: P0 crisng95#1 (NARWHAL for images) was already correct in flow_client.py. stop_motion material already exists as a built-in. Co-authored-by: Cursor <cursoragent@cursor.com>
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
batchGenerateImages, extract UUID from response before uploading. If found, use it directly — no duplicate image in Google Flowreference_image_urlexists butmedia_idis missing, only retry the upload (saves credits)storage.googleapis.com, causing_upload_character_imageto always fail withSSLCertVerificationErrorProblem
Previously each entity generated 2 images in Google Flow:
batchGenerateImages) — named from promptuploadImage) — named "Viktor.jpeg"On upload failure, the worker retried the entire generation (up to 5x), burning credits each time.
Flow after fix
Test plan
media_idis valid UUID and works asimageInputsin scene image genSupersedes #1
🤖 Generated with Claude Code