-
Notifications
You must be signed in to change notification settings - Fork 15
Add full provider input schemas for all video models #195
Copy link
Copy link
Open
Description
Context
PR #194 added model-rules.ts with per-model Zod schemas to normalize duration values before sending to providers. Currently ModelDurationRules only handles duration — but there are many other model-specific input constraints in the if/else chains in fal.ts (lines 520-720).
What needs to happen
Expand model-rules.ts into full provider input schemas that validate and normalize all model-specific fields:
aspect_ratio— some models usevideo_sizeinstead, some restrict to specific ratiosresolution— Grok Imagine defaults"720p"generate_audio— Kling v3/v2.6 and LTX-2 default totruedelete_video— Sora 2 needsfalseto keep URLs accessiblevideo_size— LTX-2 uses this instead ofaspect_rationum_frames— LTX-2 convertsduration * fpsto frame countend_image_url— supported by Kling v3/v2.6 and LTX-2
Once complete, rename ModelDurationRules → ModelInputRules and consolidate the remaining if/else logic in fal.ts into the Zod schemas.
Related
- Gateway companion issue: vargHQ/gateway#88
- Current implementation:
src/ai-sdk/providers/model-rules.ts
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels