HKUDS/DeepTutor · error · ValueError

No active video-generation model is configured. Set it in Se

Error message

No active video-generation model is configured. Set it in Settings > Media Generation > Video Generation.

What it means

Raised by resolve_videogen_runtime_config when the active profile's model entry for the 'videogen' category has an empty or missing 'model' field. Without a concrete model id the resolver cannot construct a provider config for video generation. Pure configuration error, thrown before any network call.

Source

Thrown at deeptutor/services/config/provider_runtime.py:1126

        size=_as_str((model or {}).get("size")),
        quality=_as_str((model or {}).get("quality")),
        style=_as_str((model or {}).get("style")),
        response_format=_as_str((model or {}).get("response_format")),
    )


def resolve_videogen_runtime_config(
    catalog: dict[str, Any] | None = None,
    *,
    service: ModelCatalogService | None = None,
) -> VideogenConfig:
    """Resolve the active text-to-video config from the model catalog."""
    catalog_service = service or get_model_catalog_service()
    loaded = _load_catalog(catalog)
    profile, model = _active_profile_and_model(loaded, catalog_service, "videogen")
    resolved_model = _as_str((model or {}).get("model"))
    if not resolved_model:
        raise ValueError(
            "No active video-generation model is configured. "
            "Set it in Settings > Media Generation > Video Generation."
        )

    provider = _canonical_generation_provider(
        _as_str((profile or {}).get("binding")), VIDEOGEN_PROVIDERS
    )
    spec = VIDEOGEN_PROVIDERS[provider]
    api_base = _as_str((profile or {}).get("base_url")) or spec.default_api_base
    api_key = _as_str((profile or {}).get("api_key"))
    if not api_key and spec.is_local:
        api_key = "sk-no-key-required"

    return VideogenConfig(
        model=resolved_model,
        provider_name=provider,
        adapter=spec.adapter,
        auth_style=spec.auth_style,

View on GitHub (pinned to 3e82f13042)

Solutions

  1. Set an active video-generation model in Settings > Media Generation > Video Generation
  2. Fix the catalog so the active videogen profile's model object has a non-empty 'model' value
  3. Guard callers (e.g. probe_video UI) with a pre-check that shows a setup dialog instead of crashing

Example fix

// before
video = generate_video(prompt="sunset timelapse")  // ValueError
// after
try:
    video = generate_video(prompt="sunset timelapse")
except ValueError as e:
    if "video-generation model" in str(e):
        show_setup_dialog("videogen")
    else:
        raise
Defensive patterns

Strategy: validation

Validate before calling

def videogen_configured() -> bool:
    try:
        resolve_videogen_runtime_config()
        return True
    except ValueError:
        return False

Try / catch

try:
    cfg = resolve_videogen_runtime_config()
except ValueError as e:
    if "video-generation model" in str(e):
        prompt_user_to_configure("videogen")
    raise

Prevention

When it happens

Trigger: Calling generate_video, probe_video, or _test_videogen when no active text-to-video model is set in Settings > Media Generation > Video Generation, or the catalog's videogen profile lacks a 'model' string.

Common situations: Video generation feature enabled but never configured; catalog file edited by hand and model key removed; environment-specific catalog (dev vs prod) missing the videogen entry.

Related errors


AI-assisted analysis of HKUDS/DeepTutor@3e82f13042 (2026-08-27). Data as JSON: /api/errors/fd8834dff2d179a6. Report an issue: GitHub.