sgl-project/sglang · error · ValueError

{path} requires at least {profile.min_condition_count} entri

Error message

{path} requires at least {profile.min_condition_count} entries for task {profile.task!r}, got {len(conditions)}

What it means

The task profile sets a min_condition_count higher than 1 and fewer entries were supplied — e.g. first/multi-frame tasks that need N keyframes.

Source

Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/request_validation.py:168

    if not isinstance(conditions, Sequence) or isinstance(conditions, (str, bytes)):
        raise ValueError(f"{path} must be a list")

    if not profile.conditions_required:
        if len(conditions) > 0:
            raise ValueError(
                f"{path} must be empty for task {profile.task!r} "
                f"(got {len(conditions)} entries)"
            )
        return []
    if len(conditions) == 0:
        raise ValueError(
            f"{path} requires at least one entry for task {profile.task!r}"
        )
    if (
        profile.min_condition_count is not None
        and len(conditions) < profile.min_condition_count
    ):
        raise ValueError(
            f"{path} requires at least {profile.min_condition_count} entries "
            f"for task {profile.task!r}, got {len(conditions)}"
        )
    if (
        profile.max_condition_count is not None
        and len(conditions) > profile.max_condition_count
    ):
        raise ValueError(
            f"{path} allows at most {profile.max_condition_count} entries "
            f"for task {profile.task!r}, got {len(conditions)}"
        )

    aligned_frame_count = (
        minimax_h3_align_frame_count(frame_count) if frame_count is not None else None
    )
    normalized: list[dict[str, Any]] = []
    seen_frame_indices: dict[int, int] = {}
    for index, cond in enumerate(conditions):

View on GitHub (pinned to 0132848349)

Solutions

  1. Supply at least min_condition_count condition entries
  2. Check the task profile's min_condition_count and enforce it in the client UI

Example fix

// before
"conditions": [kf0]
// after
"conditions": [kf0, kf1]
Defensive patterns

Strategy: validation

Validate before calling

if profile.min_condition_count and len(conditions) < profile.min_condition_count:
    raise ValueError('too few conditions')

Prevention

When it happens

Trigger: Sending 1 condition to a task whose profile.min_condition_count is 2 or more.

Common situations: Multi-keyframe storyboard tasks where the client only uploads the first frame; partial upload failures silently dropping entries.

Related errors


AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28). Data as JSON: /api/errors/c970d6c3a75b526c. Report an issue: GitHub.