fix(video_gen): veo3.1 duration format and 4k resolution

FAL veo3.1 API expects duration as "4s"/"6s"/"8s" (with unit suffix),
not bare "4"/"6"/"8" like other families. Add per-family duration_suffix
field and apply it in _build_payload. Also add "4k" to veo3.1 resolutions
per FAL API docs.

Note: the managed gateway currently rejects the "4s" format (expects
integer duration). Gateway-side fix needed for veo3.1 to work through
the Nous subscription path.
This commit is contained in:
alt-glitch
2026-05-29 18:56:41 +05:30
committed by Siddharth Balyan
parent a4c18f65d4
commit 3183b2e28c
2 changed files with 6 additions and 3 deletions

View File

@ -257,7 +257,7 @@ class TestPayloadBuilder:
seed=42,
)
assert p["prompt"] == "x"
assert p["duration"] == "8" # FAL queue API uses strings
assert p["duration"] == "8s" # veo3.1 uses "Ns" format per FAL API
assert p["aspect_ratio"] == "16:9"
assert p["resolution"] == "720p"
assert p["generate_audio"] is True