sgl-project/sglang · error · ValueError
requires at least one entry for task
Error message
{path} requires at least one entry for task {profile.task!r} What it means
This task profile requires at least one condition entry. Add conditions to the request.
Solutions
- Add at least one valid condition entry with role/type/uri
- If you intended text-only generation, use the text-only task instead
Example fix
// before
"conditions": []
// after
"conditions": [{"role": "reference", "type": "image", "uri": "ref.png"}] Defensive patterns
Strategy: validation
Validate before calling
if profile.conditions_required and not conditions:
raise ValueError('this task requires at least one condition') Prevention
- Verify reference uploads completed before submitting
When it happens
Trigger: Submitting an image/video-conditioned task (e.g. ref2va) with conditions omitted or [].
Common situations: Defaulting conditions to [] universally; forgetting to attach the reference image after moving file upload code.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- canonical request missing
- conditions[ ].frame_index is required
- {cpath}: {exc}
- has unknown fields
- must be an object
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/da2a869a31935546.
Report an issue: GitHub.
Appendix: source
Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/request_validation.py:161
*,
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 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)}"
)View on GitHub (pinned to 0132848349)