Skip to content

fix: skip image regeneration on upload retry to save credits - #1

Merged
crisng95 merged 1 commit into
mainfrom
fix/ref-image-retry-saves-credits
Apr 2, 2026
Merged

crisng95 merged 1 commit into
mainfrom
fix/ref-image-retry-saves-credits

Conversation

@crisng95

@crisng95 crisng95 commented Apr 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • When uploadImage fails after successful batchGenerateImages, the worker now retries only the upload instead of regenerating the image (which burned credits on each retry)
  • Added UUID extraction from GCS URL as a fallback when upload is unavailable
  • Prevents wasting 5x credits per entity on transient upload failures

Test plan

  • Generate a reference image, verify it completes in 1 generation
  • Simulate upload failure (disconnect extension mid-upload), verify retry only re-uploads
  • Verify UUID extraction from GCS URL works when upload is down

🤖 Generated with Claude Code

When upload fails after successful image generation, the worker was
retrying the entire generation (burning credits each time). Now it
checks for existing reference_image_url first and only retries the
upload. Falls back to extracting UUID directly from the GCS URL.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@crisng95
crisng95 merged commit e207d9c into main Apr 2, 2026
crisng95 added a commit that referenced this pull request Apr 5, 2026
Security:
- Add X-Callback-Secret auth to /api/ext/callback (shared secret via WS)
- Fix _extract_media_id: don't return CAMS mediaGenerationId (Rule #1)
- Fix _save_raw_bytes: use absolute path, add 500MB size guard

Features:
- Save inline rawBytes (4K video) from upscale responses to output/4k_raw/
- Re-poll on retry for video/upscale (prevents duplicate API calls)
- Transient WS errors don't burn retry count
- Extension side panel: ID column, updated badge labels (sent/gen.../done/fail)
- Extension popup: request details with headers, payload, response

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant