ATH-MaaS/Pixelle-Video · error · ValueError

first_clip_path is only supported for DashScope wan2.7 model

Error message

first_clip_path is only supported for DashScope wan2.7 models, not provider={provider}.

What it means

The API video media service only supports passing a starting clip (first_clip_path) for DashScope wan2.7-family video models. When a first clip is supplied without an image path and the resolved provider is anything other than 'dashscope', _generate_video raises this ValueError before any client call is made.

Source

Thrown at pixelle_video/services/api_media.py:538

        height: Optional[int],
        **params,
    ) -> MediaResult:
        from pixelle_video.services.api_services.video_client import VideoClient

        first_clip_path = params.get("first_clip_path") or params.get("first_video_path")
        reference_image_path = params.get("reference_image_path")
        reference_image_paths = params.get("reference_image_paths") or []
        reference_video_paths = params.get("reference_video_paths") or []
        has_reference_inputs = bool(reference_image_path or reference_image_paths or reference_video_paths)
        capabilities = self._video_capabilities(provider, model)
        supports_text_to_video = "text_to_video" in set(capabilities.get("adapter_ability_types") or [])
        if not image_path and not first_clip_path and not has_reference_inputs and not supports_text_to_video:
            raise ValueError(
                "API video models require image_path, first_clip_path, or reference media inputs. "
                "Use an image template first or pass input image/video/reference media when calling media generation."
            )
        if first_clip_path and not image_path and provider != "dashscope":
            raise ValueError(f"first_clip_path is only supported for DashScope wan2.7 models, not provider={provider}.")

        client = self._create_video_client()
        save_path = output_path or os.path.join(self._save_dir(None, "api_videos"), "video.mp4")
        ratio = params.get("video_ratio") or params.get("ratio") or self._ratio(width, height)
        requested_duration = int(duration or params.get("duration") or 5)
        safe_duration = self._video_duration(provider, model, requested_duration)
        resolution = params.get("resolution") or self._video_resolution(provider, width, height)
        video_options = self._video_options(provider, model, params, resolution)

        prompt_to_use = prompt
        max_safety_retries = int(params.get("prompt_safety_retries", 1))
        for attempt in range(max_safety_retries + 1):
            try:
                logger.info(
                    f"Generating video via API provider={provider}, model={model}"
                    + (f" (safety retry {attempt})" if attempt else "")
                )
                await asyncio.to_thread(

View on GitHub (pinned to 848b054e4f)

Solutions

  1. Set provider to 'dashscope' with a wan2.7 video model when first_clip_path is used
  2. Remove first_clip_path and instead pass image_path or reference media the target provider supports
  3. Convert the starting clip into an image frame and pass it as image_path
  4. Branch your pipeline on provider so video-continuation requests only route to DashScope

Example fix

// before
await generator(first_clip_path="intro.mp4", provider="openai", model="sora-2")
// after
await generator(first_clip_path="intro.mp4", provider="dashscope", model="wan2.7-t2v")
Defensive patterns

Strategy: validation

Validate before calling

if first_clip_path and not image_path:
    provider = resolve_provider(model)
    if provider != "dashscope":
        raise ValueError(f"first_clip_path requires dashscope provider, got {provider}")

Prevention

When it happens

Trigger: Calling _generate_video (via __call__) with first_clip_path set, image_path unset, and provider != 'dashscope' (e.g. an OpenAI/GPT or ARK/Seedream video provider).

Common situations: Reusing an image-to-video or video-extension workflow across providers; migrating a pipeline that worked with wan2.7 to another provider; user uploads a reference video but the selected model/provider cannot consume it.

Related errors


AI-assisted analysis of ATH-MaaS/Pixelle-Video@848b054e4f (2026-08-30). Data as JSON: /api/errors/3cd6b127428e2773. Report an issue: GitHub.