The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
feat(video-gen): Kling 3.0 Standard + Pro families on the FAL backend
Teknium3304d205be2e
diff --git a/plugins/video_gen/fal/__init__.py b/plugins/video_gen/fal/__init__.pyindex 059defe78a1..a01ad1ea367 100644--- a/plugins/video_gen/fal/__init__.py+++ b/plugins/video_gen/fal/__init__.py@@ -76,6 +76,14 @@ FAL_FAMILIES: Dict[str, Dict[str, Any]] = {resolutions=("480p", "720p", "1080p"), durations=(1, 15), audio_native=True),"gemini-omni-flash": _family("Gemini Omni Flash (via FAL)", "~60-120s", "premium", "Google. Image-to-video with audio, physics-grounded motion, 3-10s.",None, "google/gemini-omni-flash/image-to-video", duration_int=True, aspect_ratios=("16:9", "9:16"), durations=(3, 10), audio_native=True),+ # Kling 3.0 core tiers: t2v declares aspect_ratio, i2v derives it from `start_image_url`; string duration enum "3".."15";+ # generate_audio is a real toggle (default on, audio-on costs more); no resolution or seed keys in the v3 schemas.+ "kling-v3": _family("Kling 3.0 (Standard)", "~60-180s", "premium", "Kuaishou frontier core model. Cinematic motion, native audio, 3-15s.",+ "fal-ai/kling-video/v3/standard/text-to-video", "fal-ai/kling-video/v3/standard/image-to-video", image_param_key="start_image_url",+ image_drop_keys=("aspect_ratio",), aspect_ratios=("16:9", "9:16", "1:1"), durations=(3, 15), audio=True, negative=True),+ "kling-v3-pro": _family("Kling 3.0 Pro", "~60-180s", "premium", "Kling 3.0 top quality tier. Cinematic motion, native audio, 3-15s.",+ "fal-ai/kling-video/v3/pro/text-to-video", "fal-ai/kling-video/v3/pro/image-to-video", image_param_key="start_image_url",+ image_drop_keys=("aspect_ratio",), aspect_ratios=("16:9", "9:16", "1:1"), durations=(3, 15), audio=True, negative=True),"kling-v3-4k": _family("Kling v3 4K", "~120-300s", "premium", "4K output, native audio (Chinese/English), 3-15s.", "fal-ai/kling-video/v3/4k/text-to-video","fal-ai/kling-video/v3/4k/image-to-video", image_param_key="start_image_url", aspect_ratios=("16:9", "9:16", "1:1"),durations=(3, 15), audio=True, negative=True, seed=True),@@ -301,7 +309,7 @@ class FALVideoGenProvider(VideoGenProvider):def get_setup_schema(self) -> Dict[str, Any]:return {"name": "FAL", "badge": "paid", "env_vars": [{"key": "FAL_KEY", "prompt": "FAL.ai API key", "url": "https://fal.ai/dashboard/keys"}],- "tag": "LTX, Pixverse, Seedance 2.0/2.5/Mini, Veo 3.1, MiniMax H3, FLUX 3, Kling 4K, Happy Horse, Grok Imagine, "+ "tag": "LTX, Pixverse, Seedance 2.0/2.5/Mini, Veo 3.1, MiniMax H3, FLUX 3, Kling 3.0/4K, Happy Horse, Grok Imagine, ""Gemini Omni — text-to-video & image-to-video"}def capabilities(self) -> Dict[str, Any]:diff --git a/tests/plugins/video_gen/test_fal_plugin.py b/tests/plugins/video_gen/test_fal_plugin.pyindex 3cad506c2a2..847c9fc9be2 100644--- a/tests/plugins/video_gen/test_fal_plugin.py+++ b/tests/plugins/video_gen/test_fal_plugin.py@@ -29,6 +29,55 @@ def test_fal_provider_registers():assert DEFAULT_MODEL in {"pixverse-v6", "ltx-2.3"}+def test_kling_v3_standard_and_pro_payload_shape():+ """Kling 3.0 (v3 standard/pro): start_image_url on i2v, aspect_ratio+ dropped on i2v (schema derives it from the image), no seed/resolution+ keys, string duration 3-15, generate_audio + negative_prompt real."""+ from plugins.video_gen.fal import FAL_FAMILIES, _build_payload++ for fid in ("kling-v3", "kling-v3-pro"):+ meta = FAL_FAMILIES[fid]+ assert meta.get("image_param_key") == "start_image_url"++ # text-to-video route+ p = _build_payload(+ meta,+ prompt="a mecha lands",+ image_url=None,+ duration=7,+ aspect_ratio="16:9",+ resolution="1080p",+ negative_prompt="blurry",+ audio=True,+ seed=3,+ )+ assert p == {+ "prompt": "a mecha lands",+ "aspect_ratio": "16:9",+ "duration": "7",+ "generate_audio": True,+ "negative_prompt": "blurry",+ }, fid++ # image-to-video route: start_image_url in, aspect_ratio dropped+ p = _build_payload(+ meta,+ prompt="animate it",+ image_url="https://example.com/i.png",+ duration=20, # clamps to 15+ aspect_ratio="16:9",+ resolution="720p",+ negative_prompt=None,+ audio=False,+ seed=None,+ )+ assert p.get("start_image_url") == "https://example.com/i.png", fid+ assert "image_url" not in p, fid+ assert "aspect_ratio" not in p, fid+ assert p["duration"] == "15", fid+ assert p["generate_audio"] is False, fid++def test_kling_4k_uses_start_image_url():"""Kling v3 4K's image-to-video endpoint expects start_image_url,not image_url. The family must declare image_param_key='start_image_url'."""diff --git a/website/docs/reference/tools-reference.md b/website/docs/reference/tools-reference.mdindex 58296c96402..0308f71fcb8 100644--- a/website/docs/reference/tools-reference.md+++ b/website/docs/reference/tools-reference.md@@ -308,7 +308,7 @@ Opt-in toolset (not loaded in the default `hermes-cli` set). Add via `--toolsetsBackends ship as plugins under `plugins/video_gen/<name>/`:- **xAI Grok-Imagine** — text-to-video and image-to-video (SuperGrok OAuth or `XAI_API_KEY`).-- **FAL.ai** — Veo 3.1, Pixverse v6, Kling O3 (requires `FAL_KEY`).+- **FAL.ai** — Veo 3.1, Pixverse v6, Kling 3.0 / O3 (requires `FAL_KEY`).- **OpenRouter** — every generative model on OpenRouter's video API (Veo 3.1, Sora 2 Pro, Kling 3, Seedance 2, Wan 3, Hailuo 3, Grok Imagine, FLUX 3 Video, …); text-to-video, image-to-video and reference-to-video; catalog and per-model limits fetched live (requires `OPENROUTER_API_KEY`, billed to your OpenRouter credit).- **DeepInfra** — live `video-gen` catalog over the OpenAI-compatible videos endpoint (requires `DEEPINFRA_API_KEY`).diff --git a/website/docs/reference/toolsets-reference.md b/website/docs/reference/toolsets-reference.mdindex eb6476e4f73..34e1d78e6f4 100644--- a/website/docs/reference/toolsets-reference.md+++ b/website/docs/reference/toolsets-reference.md@@ -68,7 +68,7 @@ Or in-session:| `computer_use` | `computer_use` | Background desktop control via cua-driver — does not steal cursor/focus. Works with any tool-capable model. macOS, Windows, and Linux; requires `cua-driver` on `$PATH`. || `context_engine` | (varies) | Runtime tools exposed by the active context-engine plugin (empty until a plugin populates it). || `image_gen` | `image_generate` | Text-to-image generation via FAL.ai (with opt-in OpenAI / xAI backends). |-| `video_gen` | `video_generate`, `xai_video_edit`, `xai_video_extend` | Text-to-video and image-to-video via plugin-registered backends (xAI Grok-Imagine, FAL.ai Veo 3.1 / Pixverse v6 / Kling O3). Pass `image_url` to animate an image; omit it for text-to-video. `xai_video_edit` / `xai_video_extend` are provider-specific edit/extend tools, gated on xAI Imagine credentials. |+| `video_gen` | `video_generate`, `xai_video_edit`, `xai_video_extend` | Text-to-video and image-to-video via plugin-registered backends (xAI Grok-Imagine, FAL.ai Veo 3.1 / Pixverse v6 / Kling 3.0 / Kling O3). Pass `image_url` to animate an image; omit it for text-to-video. `xai_video_edit` / `xai_video_extend` are provider-specific edit/extend tools, gated on xAI Imagine credentials. || `kanban` | `kanban_attach`, `kanban_attach_url`, `kanban_attachments`, `kanban_block`, `kanban_comment`, `kanban_complete`, `kanban_create`, `kanban_heartbeat`, `kanban_link`, `kanban_list`, `kanban_request_changes`, `kanban_request_review`, `kanban_show`, `kanban_unblock` | Multi-agent coordination tools. Registered for dispatcher-spawned task workers (`HERMES_KANBAN_TASK`) and for platforms whose saved selection lists `kanban` (`hermes tools enable kanban --platform <p>`; the `all`/`*` wildcard does **not** enable it). Workers mark tasks done, request first-class review, block, heartbeat, comment, and create/link follow-up tasks; orchestrator profiles additionally get board-routing tools like list/unblock. `delegate_task` children are not Kanban run owners: their schema strips/disables this toolset and runtime guards reject direct board mutations, even if parent `HERMES_KANBAN_*` env vars are present. || `memory` | `memory` | Persistent cross-session memory management. || `desktop_ui` | `annotate_preview`, `close_preview`, `close_terminal`, `drive_preview`, `focus_pane`, `open_preview`, `react_to_message`, `read_preview`, `read_terminal`, `read_window_below`, `tour` | Affordances that act on the Hermes desktop app itself — read/close the embedded terminal pane, open, read, close, interact with, and annotate the in-app browser, identify the OS window behind the app, reveal a pane, react to a message, run a guided tour (highlight + narrate UI elements in the app or the preview pane). Enabled for sessions whose source is the desktop app, whichever backend it's connected to (local, SSH, URL, or Hermes Cloud). Never present on CLI, TUI, messaging, or cron sessions. |