- 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 /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
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>
- 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)
- 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
Refactor generate API route to support multiple providers:
- Accept both legacy format and new format with selectedModel
- Route requests to Replicate, fal.ai, or Gemini based on provider
- Extract Gemini logic into generateWithGemini() helper function
- Add generateWithReplicate() and generateWithFal() server-side helpers
- Get provider API keys from request headers (X-Replicate-API-Key, X-Fal-API-Key)
- Preserve backward compatibility for existing Gemini-based workflows
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Video models were getting text-to-image capability by default.
Now properly detects video models (by keywords like video, animate,
motion, luma, kling, minimax) and only assigns video capabilities.
Both APIs return paginated results but we were only fetching page 1.
Now fetches up to 5 pages from Replicate (~125 models) and 10 pages
from fal.ai to get more complete model lists.
UAT-005: Video models were showing in image-only dropdown because
the API wasn't filtering by capabilities param. Now filters results
based on ?capabilities=text-to-image,image-to-image query param.
UAT-004: Replicate shows first page only (~25 models) - this is
expected API behavior. Full pagination can be added later.
Add /api/models endpoint that aggregates models from all configured
providers. Supports caching, search, provider filtering, and handles
partial failures gracefully.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add defensive null checks before calling .map() on data.results
in both the API route and provider implementation. Returns empty
array with success:true when results is undefined, preventing
"Cannot read properties of undefined (reading 'map')" crash.
Fixes: UAT-001 from 02-01-ISSUES.md
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
fal.ai API only accepts a single category parameter, but we were
sending multiple categories. Now we fetch all active models and
filter client-side using the existing isRelevantModel() function.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add Next.js API route for server-side fal.ai model fetching:
- GET /api/providers/fal/models endpoint
- Optional API key auth (fal.ai works without but rate limited)
- Filter to image/video categories only
- Normalize response to ProviderModel interface
- Support search query parameter
- Follow established pattern from replicate API route
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- GET /api/providers/replicate/models endpoint
- Accepts X-API-Key header or api_key query param
- Optional search param for model search
- Maps Replicate models to ProviderModel interface
- Infers capabilities from model name/description
- Returns { success, models } or { success, error }
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The Gemini API requires base64-encoded image data, not URL paths.
Added convertLocalImagesToBase64() function that reads local images
from public/sample-images/ and converts them to data URLs before
returning the workflow.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add welcome screen that appears on empty canvas with 6 preset templates
- Implement AI-powered workflow generation via Gemini LLM
- Create /api/quickstart endpoint for template and AI generation
- Add content level selector (empty/minimal/full)
- Add Quickstart button in Header for re-access when canvas has nodes
- Include JSON validation and repair utilities for LLM output
- Update CLAUDE.md with improved documentation
🤖 Generated with [Claude Code](https://claude.ai/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>