sgl-project/sglang · error · ValueError
must be empty for task (got entries)
Error message
{path} must be empty for task {profile.task!r} (got {len(conditions)} entries) What it means
Conditions are not allowed for this task profile. Remove the condition entries for the given task.
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
- {cpath}: {exc}
- has unknown fields
- must be an object
- .role must be keyframe or reference, got
- .start_time_seconds is only allowed for video or…
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/f1aeacc4e8f91726.
Report an issue: GitHub.
Appendix: 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)