sgl-project/sglang · error · ValueError
{path} must be empty for task {profile.task!r} (got {len(con
Error message
{path} must be empty for task {profile.task!r} (got {len(conditions)} entries) What it means
The task's profile does not accept conditions (conditions_required false) but the request supplied a non-empty list. Tasks like plain t2v reject any condition entries.
Source
Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/request_validation.py:155
out["duration_seconds"] = float(duration)
return out
def _validate_conditions(
conditions: Any,
*,
profile: MiniMaxH3TaskProfile,
frame_count: int | None,
) -> list[dict[str, Any]]:
path = "conditions"
if conditions is None:
conditions = []
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 NoneView on GitHub (pinned to 0132848349)
Solutions
- Remove the conditions list (or pass []) for this task
- Switch to a task whose profile permits conditions if conditioning is required
Example fix
// before
"conditions": [{"role": "reference", ...}] # on a no-conditions task
// after
"conditions": [] Defensive patterns
Strategy: validation
Validate before calling
if not profile.conditions_required:
request['conditions'] = [] Prevention
- Reset conditions when switching tasks
When it happens
Trigger: Sending a keyframe/reference condition to a task that takes only text.
Common situations: Reusing a ref2va/i2v request body for a text-only task; conditioning pipeline always attaching reference images.
Related errors
- {path} must be a list
- {path} requires at least one entry for task {profile.task!r}
- {path} requires at least {profile.min_condition_count} entri
- {path} allows at most {profile.max_condition_count} entries
- {cpath} must be an object
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/f1aeacc4e8f91726.
Report an issue: GitHub.