From 67c1affa22a379a896930a05c4fd23be51d40eb9 Mon Sep 17 00:00:00 2001 From: shrimbly Date: Tue, 31 Mar 2026 10:28:35 +1300 Subject: [PATCH] feat: add audio-to-video capability type and model discovery Add "audio-to-video" to ModelCapability union, extend ModelInput.type and ModelInputDef.type with "audio", and include "audio-to-video" in fal.ai RELEVANT_CATEGORIES for model discovery. Co-Authored-By: Claude Opus 4.6 --- src/app/api/models/route.ts | 1 + src/lib/providers/types.ts | 5 +++-- src/types/nodes.ts | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/api/models/route.ts b/src/app/api/models/route.ts index e5670103..de9b3745 100644 --- a/src/app/api/models/route.ts +++ b/src/app/api/models/route.ts @@ -54,6 +54,7 @@ const RELEVANT_CATEGORIES = [ "text-to-speech", "text-to-music", "text-to-sound-effects", + "audio-to-video", ]; // Kie.ai models (hardcoded - no discovery API available) diff --git a/src/lib/providers/types.ts b/src/lib/providers/types.ts index 21aeb1cc..4f02ee53 100644 --- a/src/lib/providers/types.ts +++ b/src/lib/providers/types.ts @@ -18,7 +18,8 @@ export type ModelCapability = | "image-to-video" | "text-to-3d" | "image-to-3d" - | "text-to-audio"; + | "text-to-audio" + | "audio-to-video"; /** * Model parameter schema for dynamic UI generation @@ -42,7 +43,7 @@ export interface ModelInput { /** Property name from schema (e.g., "image_url", "tail_image_url", "prompt") */ name: string; /** Handle type for connections */ - type: "image" | "text"; + type: "image" | "text" | "audio"; /** Whether this input is required */ required: boolean; /** Human-readable label for the handle */ diff --git a/src/types/nodes.ts b/src/types/nodes.ts index 36997757..db12b047 100644 --- a/src/types/nodes.ts +++ b/src/types/nodes.ts @@ -172,7 +172,7 @@ export interface CarouselVideoItem { */ export interface ModelInputDef { name: string; - type: "image" | "text"; + type: "image" | "text" | "audio"; required: boolean; label: string; description?: string;