hermes - 💡(How to fix) Fix FAL Veo 3.1 video generation sends duration as "4" but API expects "4s"

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

The request fails with a validation error similar to:

Fix Action

Fix / Workaround

Local workaround tested

Code Example

FAL video generation failed: [{'type': 'literal_error', 'loc': ['body', 'duration'], 'msg': "Input should be '4s', '6s' or '8s'", 'input': '4', 'ctx': {'expected': "'4s', '6s' or '8s'"}}]

---

payload["duration"] = str(clamped)

---

payload["duration"] = f"{clamped}s"
RAW_BUFFERClick to expand / collapse

Bug description

The bundled FAL video generation plugin appears to send Veo 3.1 duration as a bare numeric string such as "4". FAL's current fal-ai/veo3.1 endpoint validates this field as a literal enum with an s suffix: "4s", "6s", or "8s".

Steps to reproduce

  1. Configure video_gen with provider fal and model veo3.1.
  2. Call the video_generate tool with a simple text prompt and duration=4.
  3. Observe the FAL queue request failing with HTTP 422.

Actual behavior

The request fails with a validation error similar to:

FAL video generation failed: [{'type': 'literal_error', 'loc': ['body', 'duration'], 'msg': "Input should be '4s', '6s' or '8s'", 'input': '4', 'ctx': {'expected': "'4s', '6s' or '8s'"}}]

Expected behavior

The FAL plugin should send duration in the format expected by the target endpoint, e.g. "4s" for Veo 3.1.

Local workaround tested

In plugins/video_gen/fal/__init__.py, changing payload construction from:

payload["duration"] = str(clamped)

to:

payload["duration"] = f"{clamped}s"

and parsing the success response duration by stripping a trailing s made a 4s fal-ai/veo3.1 generation succeed.

Environment

  • Hermes checkout commit: 9f182bd7b
  • OS: Ubuntu 24.04 / Linux
  • Provider: FAL
  • Model family: veo3.1

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The FAL plugin should send duration in the format expected by the target endpoint, e.g. "4s" for Veo 3.1.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix FAL Veo 3.1 video generation sends duration as "4" but API expects "4s"