improvement(media-blocks): new versions of image and video gen with latest models + fixes#4667
Conversation
…atest models + fixes
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryHigh Risk Overview Updates video generation to a new Aligns product/docs plumbing. Updates docs pages, integration registry/icon mappings, integrations JSON (including docs URL change for video), built-in tool type lists, and the docs generation script to emit separate icon mappings for docs (including hidden versioned blocks) vs landing (visible only). Reviewed by Cursor Bugbot for commit 71b4080. Configure here. |
Greptile SummaryThis PR adds multi-provider image generation (OpenAI GPT Image, Google Nano Banana via Gemini, Fal.ai) through a new
Confidence Score: 5/5Safe to merge; all major backend changes are additive, SSRF guards are intact, and the previous polling/status bugs are fixed. The image and video routes are well-structured with proper input validation, SSRF protection, and terminal-status handling. The config-driven model dispatch replaces fragile hardcoded maps. The two non-blocking nits (duplicate Gemini/Fal.ai model labels, missing duration validation for two legacy Kling configs) have no correctness impact at runtime. apps/sim/app/api/tools/video/route.ts — the two legacy Kling configs (kling-2.5-turbo-pro, kling-2.1-pro) lack duration option lists; apps/sim/blocks/blocks/image_generator.ts — Gemini model labels duplicate Fal.ai labels. Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant ImageRoute as POST /api/tools/image
participant OpenAI as OpenAI API
participant Gemini as Gemini API
participant FalAI as Fal.ai Queue
Client->>ImageRoute: "{provider, apiKey, model, prompt, ...}"
ImageRoute->>ImageRoute: parseRequest + checkInternalAuth
alt "provider = openai"
ImageRoute->>OpenAI: POST /v1/images/generations
OpenAI-->>ImageRoute: b64_json or url
ImageRoute->>ImageRoute: bufferFromImageUrl (SSRF-safe)
else "provider = gemini"
ImageRoute->>Gemini: POST generateContent
Gemini-->>ImageRoute: inlineData (base64)
else "provider = falai"
ImageRoute->>FalAI: "POST queue.fal.run/{endpoint}"
FalAI-->>ImageRoute: "{request_id, status_url, response_url}"
loop Poll every 3s
ImageRoute->>FalAI: GET status_url
FalAI-->>ImageRoute: "{status: QUEUED|IN_PROGRESS|COMPLETED|FAILED|CANCELLED}"
end
ImageRoute->>FalAI: GET response_url
FalAI-->>ImageRoute: "{images: [{url, content_type}]}"
ImageRoute->>ImageRoute: bufferFromImageUrl (SSRF-safe)
end
ImageRoute->>ImageRoute: storeGeneratedImage (execution or copilot)
ImageRoute-->>Client: "{imageUrl, imageFile, metadata}"
Reviews (3): Last reviewed commit: "address api mismatches" | Re-trigger Greptile |
|
@greptile |
|
bugbot run |
|
bugbot run |
|
@greptile |
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 54d2e1f. Configure here.
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 71b4080. Configure here.
Summary
New versions of image and video gen models
Support for new providers incl. Google Nano Banana, OpenAI Sora, Seeddance via Fal
Updated docs
Type of Change
Testing
Tested manually
Checklist