- Introduced a model search dialog for selecting external models in GenerateImageNode and GenerateVideoNode.
- Updated node titles to reflect selected models dynamically.
- Improved parameter handling by expanding the ModelParameters component to notify parent nodes on schema load.
- Adjusted handle positions and styles for better alignment and visual consistency.
- Enhanced input validation and processing for dynamic inputs across the workflow.
Use calc() to offset handle positions by 5px (half of 10px handle size)
to center handles at their percentage positions. This ensures edge
connection points align with the visible handle dots and labels.
Avoid using CSS transform which breaks React Flow's handle detection.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use getHandleType() for dynamic handle recognition when dropping connections
- Add findCompatibleHandle() helper that checks inputSchema for dynamic handles
- Include generateVideo in handle mapping for menu selection
- Menu now correctly shows and connects to nodes with dynamic schema-based handles
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Handle colors: cyan (#22d3ee) for image, magenta (#d946ef) for text
- Labels positioned outside node boundary (left of inputs, right of outputs)
- Label text color matches handle color
- Inputs sorted: image handles at top, text handles at bottom
- Visual gap between image and text input groups
- Added CSS variables for handle colors (used by label styling)
- Output handles also have colored labels (Video/Image)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Render dynamic input handles from model schema (GenerateImage/VideoNode)
- Update connection validation with getHandleType() helper
- Add dynamicInputs to getConnectedInputs() return value
- Pass dynamicInputs through generation pipeline (workflowStore -> API)
- Update generateWithFal/Replicate to use dynamic inputs
- Process large images in dynamicInputs to URLs for external providers
- Support prompt from dynamicInputs when top-level prompt is empty
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add ModelInputDef type to node data interfaces
- Update ModelParameters to pass inputs via onInputsLoaded callback
- GenerateImageNode and GenerateVideoNode store input schema
This sets up the foundation for dynamic handle rendering.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add ModelInput type for connectable inputs (image/text handles)
- Update model schema API to return both parameters and inputs
- Categorize properties: image inputs, text inputs, and parameters
- Sort inputs by required status and type
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add onExpandChange callback to ModelParameters component
- Remove max-height constraint from expanded parameters
- GenerateImageNode/GenerateVideoNode calculate new height based on parameter count
- Node height grows when expanded, shrinks when collapsed
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- UAT-001 resolved: fal.ai schema 404 fixed
- ENHANCE-001: Dynamic model input handles based on schema
- ENHANCE-002: Auto-resize node when Parameters expands
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use 'models' array instead of 'data' array
- Iterate paths to find POST endpoint (not always at '/')
- Resolve $ref schema references from components.schemas
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The previous /api endpoint returned 404 for all models. Now using
the correct Model Search API with OpenAPI expansion:
GET https://api.fal.ai/v1/models?endpoint_id={modelId}&expand=openapi-3.0
Also added fallback path traversal for alternate OpenAPI structures.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Many fal.ai models don't expose OpenAPI schemas at /api endpoint.
Return empty parameters instead of error so generation still works
and UI doesn't show error message.
- Mark NanoBananaNode alias as deprecated with migration guidance
- Mark saveNanoBananaDefaults as deprecated with alternative
- ModelSearchDialog already has video capability badges and filtering
- Add inline validation for number/integer parameters with min/max bounds
- Show red border and error text for out-of-range values
- Clear parameters when switching provider or model (schemas differ)
- Validation shows specific constraints (Min/Max values, integer requirement)
- Add modelsFetchError state with retry button in GenerateImage/VideoNode
- Show clear errors when model list fails to load (API key issues, connection)
- Improve API route error messages to include model name
- Add rate limit handling (429) with user-friendly messages
- Parse provider-specific error responses for better detail
- Improve timeout message for video generation
- Include parameters in requestPayload for nanoBanana and generateVideo nodes
- Add logging for custom parameters in Replicate and fal.ai provider functions
- Parameters already spread via ...input.parameters in existing provider code
- Create ModelParameters component with collapsible UI
- Fetches schema from /api/models/{modelId} endpoint
- Renders appropriate inputs based on parameter type (string, number, boolean, enum)
- Add parameters field to NanoBananaNodeData and GenerateVideoNodeData
- Integrate into GenerateImageNode and GenerateVideoNode
- Create /api/models/[modelId] endpoint for fetching model parameter schemas
- Add ModelParameter interface to lib/providers/types.ts
- Support both Replicate and fal.ai providers
- Filter out internal params, prioritize user-relevant ones
- 10-minute cache TTL for schema responses
Tasks completed: 3/3
- Update OutputNode for video detection and playback
- Connect generateVideo output to workflow pipeline
- Bug fix: create generateVideo node for video models in browser
SUMMARY: .planning/phases/06-video-and-polish/06-02-SUMMARY.md
- Check model capabilities when selecting from model browser
- Create generateVideo node for text-to-video or image-to-video models
- Create nanoBanana node for image generation models
- Pass selectedModel with provider, modelId, displayName to node
- Add generateVideo case to getConnectedInputs for downstream nodes
- Update output node execution to detect video content type
- Set video and contentType fields when receiving video content
- Enable Prompt -> GenerateVideo -> Output workflow pipeline
- Add video and contentType fields to OutputNodeData
- Detect video content from data URL prefix or contentType hint
- Render video element with controls, loop, muted autoplay
- Support both base64 data URLs and HTTP URLs for video
- Update lightbox to show video player in fullscreen
- Update placeholder text to 'Waiting for image or video'
- Added to TEXT_TARGET_OPTIONS for text-to-video
- Added to IMAGE_TARGET_OPTIONS for image-to-video
- Fixes UAT-001: node now accessible via connection menu
Extend /api/generate to support video output from Replicate and fal.ai:
- Detect video content type in Replicate response
- Handle fal.ai video.url field for video model responses
- Return video/videoUrl fields with contentType for videos
- Add generateVideo case to executeWorkflow and regenerateNode
- Handle large videos (>20MB) by returning URL directly
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add GenerateVideoNode for video generation using Replicate and fal.ai:
- Add GenerateVideoNodeData interface with video output field
- Add generateVideo to NodeType union
- Create GenerateVideoNode component with provider/model selection
- Register in WorkflowCanvas with purple minimap color (#9333ea)
- Add default dimensions and node data creation in store
- Update validation.ts for new node type
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 06: Video & Polish
- 4 plans created (06-01 through 06-04)
- 11 total tasks defined
- Addresses ISS-001 (model parameter adaptation)
Plans:
- 06-01: GenerateVideo node with video model selector
- 06-02: Video playback in output node
- 06-03: Custom model parameters from provider schemas
- 06-04: Edge case handling and final polish
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Import uploadImageForUrl, shouldUseImageUrl, deleteImages from @/lib/images
- Process images for Replicate/fal providers before generation
- Small images (<256KB) use data URIs directly
- Large images converted to temporary URLs via /api/images/[id]
- Cleanup uploaded images in finally block (success or failure)
- Gemini path unchanged (handles base64 directly)
- Add image parameter to predictionInput when images array provided
- Log image input presence for debugging
- Uses 'image' param name (most common for img2img models)
Phase 05: Image URL Server
- 2 plans created
- 6 total tasks defined
- Request-scoped cleanup (no TTL) to prevent memory accumulation
- Ready for execution
- Extract last segment from model ID (e.g., "effects" from "kling-video/v1.6/pro/effects")
- Append as suffix if not already in name: "Kling 1.6 - effects"
- Helps differentiate model variants with same display name
- Show all capability badges (txt→img, img→img, txt→vid, img→vid)
- Display model ID below name to differentiate similar models
- Larger cover images (20x20 instead of 16x16)
- Taller cards with 3-line description (was 2)
- Better visual differentiation for fal.ai model variants
- Replicate's search API endpoint unreliable, use client-side filtering
- Always cache full model list for Replicate (not per-search-query)
- Apply search filter on cached models for faster subsequent searches
- Remove unused ReplicateSearchResponse and ReplicateSearchResult types
- Add ModelSearchDialog with search, provider filter, and capability filter
- Integrate with /api/models endpoint using API key headers
- Display model grid with cover images, provider badges, and descriptions
- Update addNode to accept optional initialData for pre-configured nodes
- Replace placeholder in FloatingActionBar with actual dialog
- Dialog opens when provider icon is clicked with provider filter in state
- Placeholder UI shows "Coming in 04-02" message
- Close button properly resets modelSearchOpen state
- Ready for 04-02 to implement full search functionality