mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-26 16:06:16 +00:00
fix(video): guard active async generation tasks
This commit is contained in:
@@ -65,30 +65,33 @@ Use `action: "list"` to inspect available providers and models at runtime:
|
||||
|
||||
## Tool parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| ----------------- | -------- | -------------------------------------------------------------------------------------- |
|
||||
| `prompt` | string | Video generation prompt (required for `action: "generate"`) |
|
||||
| `action` | string | `"generate"` (default) or `"list"` to inspect providers |
|
||||
| `model` | string | Provider/model override, e.g. `qwen/wan2.6-t2v` |
|
||||
| `image` | string | Single reference image path or URL |
|
||||
| `images` | string[] | Multiple reference images (up to 5) |
|
||||
| `video` | string | Single reference video path or URL |
|
||||
| `videos` | string[] | Multiple reference videos (up to 4) |
|
||||
| `size` | string | Size hint when the provider supports it |
|
||||
| `aspectRatio` | string | Aspect ratio: `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9` |
|
||||
| `resolution` | string | Resolution hint: `480P`, `720P`, or `1080P` |
|
||||
| `durationSeconds` | number | Target duration in seconds. OpenClaw may round to the nearest provider-supported value |
|
||||
| `audio` | boolean | Enable generated audio when the provider supports it |
|
||||
| `watermark` | boolean | Toggle provider watermarking when supported |
|
||||
| `filename` | string | Output filename hint |
|
||||
| Parameter | Type | Description |
|
||||
| ----------------- | -------- | ------------------------------------------------------------------------------------------------- |
|
||||
| `prompt` | string | Video generation prompt (required for `action: "generate"`) |
|
||||
| `action` | string | `"generate"` (default), `"status"` for the current session task, or `"list"` to inspect providers |
|
||||
| `model` | string | Provider/model override, e.g. `qwen/wan2.6-t2v` |
|
||||
| `image` | string | Single reference image path or URL |
|
||||
| `images` | string[] | Multiple reference images (up to 5) |
|
||||
| `video` | string | Single reference video path or URL |
|
||||
| `videos` | string[] | Multiple reference videos (up to 4) |
|
||||
| `size` | string | Size hint when the provider supports it |
|
||||
| `aspectRatio` | string | Aspect ratio: `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9` |
|
||||
| `resolution` | string | Resolution hint: `480P`, `720P`, or `1080P` |
|
||||
| `durationSeconds` | number | Target duration in seconds. OpenClaw may round to the nearest provider-supported value |
|
||||
| `audio` | boolean | Enable generated audio when the provider supports it |
|
||||
| `watermark` | boolean | Toggle provider watermarking when supported |
|
||||
| `filename` | string | Output filename hint |
|
||||
|
||||
Not all providers support all parameters. Unsupported optional overrides are ignored on a best-effort basis and reported back in the tool result as a warning. Hard capability limits such as too many reference inputs still fail before submission. When a provider or model only supports a discrete set of video lengths, OpenClaw rounds `durationSeconds` to the nearest supported value and reports the normalized duration in the tool result.
|
||||
|
||||
## Async behavior
|
||||
|
||||
- Session-backed agent runs: `video_generate` creates a background task, returns a started/task response immediately, and posts the finished video later in a follow-up agent message.
|
||||
- Duplicate prevention: while that background task is still `queued` or `running`, later `video_generate` calls in the same session return task status instead of starting another generation.
|
||||
- Status lookup: use `action: "status"` to inspect the active session-backed video task without starting a new one.
|
||||
- Task tracking: use `openclaw tasks list` / `openclaw tasks show <taskId>` to inspect queued, running, and terminal status for the generation.
|
||||
- Completion wake: OpenClaw injects an internal completion event back into the same session so the model can write the user-facing follow-up itself.
|
||||
- Prompt hint: later user/manual turns in the same session get a small runtime hint when a video task is already in flight so the model does not blindly call `video_generate` again.
|
||||
- No-session fallback: direct/local contexts without a real agent session still run inline and return the final video result in the same turn.
|
||||
|
||||
## Configuration
|
||||
|
||||
Reference in New Issue
Block a user