calesthio/OpenMontage · critical · RuntimeError

Ark task succeeded without content.video_url

Error message

Ark task succeeded without content.video_url

What it means

Raised in the synchronous-completion path of `execute()`: the Ark task reported a succeeded status, but `task['content']['video_url']` is missing/empty, so there is nothing to download to `output_path`. Unlike the input-validation ValueErrors, this is a RuntimeError from the post-paid-call phase — money was spent but no artifact was delivered, which is a provider contract violation worth surfacing distinctly.

Source

Thrown at tools/video/seedance_ark.py:633

                detail = self._task_error(task)
                safe_detail = (
                    self._safe_error(RuntimeError(detail), api_key) if detail else ""
                )
                return ToolResult(
                    success=False,
                    data={"task_id": task_id, "status": status},
                    error=(
                        f"Ark Seedance task {status or 'failed'}"
                        + (f": {safe_detail}" if safe_detail else "")
                    ),
                    duration_seconds=round(time.time() - started, 2),
                    model=str(task.get("model") or model),
                )

            content = task.get("content") or {}
            video_url = content.get("video_url")
            if not video_url:
                raise RuntimeError("Ark task succeeded without content.video_url")
            output_path = Path(inputs.get("output_path", "seedance_ark_output.mp4"))
            self._download_video(str(video_url), output_path)

            from tools.video._shared import probe_output

            probed = probe_output(output_path)
            cost_usd = self._cost_from_task(task, inputs)
            return ToolResult(
                success=True,
                data={
                    "provider": self.provider,
                    "task_id": task_id,
                    "status": status,
                    "model": task.get("model") or model,
                    "prompt": inputs.get("prompt"),
                    "operation": inputs.get("operation", "text_to_video"),
                    "video_url": video_url,
                    "last_frame_url": content.get("last_frame_url"),

View on GitHub (pinned to 95e1c3d0ab)

Solutions

  1. Re-query the task once with `task_action: 'query'` and inspect the full task JSON — if the URL appears, download manually or re-run execute
  2. Check the task's failure_reason / detail fields even on succeeded status (the code path above already extracts safe_detail for failed tasks)
  3. If reproducible with a clean payload, report to Volcengine support with the task_id — you were billed for an undelivered artifact
  4. Retry generation with a modified prompt if the content was policy-stripped
Defensive patterns

Strategy: retry

Validate before calling

task = client.query(task_id)
content = task.get("content") or {}
if task.get("status") == "succeeded" and not content.get("video_url"):
    # re-query once; artifact may materialize late
    import time; time.sleep(5)
    task = client.query(task_id)
    content = task.get("content") or {}

Try / catch

try:
    result = ark.execute(inputs)
except RuntimeError as e:
    if "content.video_url" in str(e):
        # one re-query, then escalate — money was spent, artifact missing
        task = ark.execute({"task_action": "query", "task_id": task_id})
        if not task.success:
            report_provider_issue(task_id, e)
        result = task
    else:
        raise

Prevention

When it happens

Trigger: Ark returns status=succeeded with an empty `content` object or no `video_url` key; a moderation pass stripped the asset; a payload shape change moved the URL elsewhere; extremely rare partial provider failures.

Common situations: Content-policy flags that mark a task succeeded without producing media; API version drift renaming `content.video_url`; tasks queried right at the boundary where the artifact is not yet materialized but status flipped early.

Related errors


AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15). Data as JSON: /api/errors/48458e9695b7ec71. Report an issue: GitHub.