sgl-project/sglang · critical · ValueError

{path} must contain non-empty strings

Error message

{path} must contain non-empty strings

What it means

_string_list rejects list fields in model_index.json that contain non-string or empty-string entries — every element must be a non-empty string. Typically hit on _minimax_h3.tasks or alias-related lists.

Source

Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/release_metadata.py:39

_MINIMAX_H3_QUALITY_WORKLOAD = {
    "task": "t2va",
    "width": 1344,
    "height": 768,
    "fps": 24,
    "frame_count": 124,
    "num_inference_steps": 50,
    "flow_shift": 12.0,
    "audio_flow_shift": 3.0,
}


def _string_list(value: Any, path: str) -> tuple[str, ...]:
    if not isinstance(value, list) or not value:
        raise ValueError(f"{path} must be a non-empty list")
    values = tuple(value)
    if any(not isinstance(item, str) or not item for item in values):
        raise ValueError(f"{path} must contain non-empty strings")
    if len(set(values)) != len(values):
        raise ValueError(f"{path} must not contain duplicates")
    return values


@dataclass(frozen=True)
class MiniMaxH3ReleaseMetadata:
    schema_version: int
    partition: str
    tasks: tuple[str, ...]
    task_aliases: Mapping[str, str]
    video_sigma_shift: float
    audio_sigma_shift: float

    @classmethod
    def from_model_index(
        cls, model_index: Mapping[str, Any]
    ) -> MiniMaxH3ReleaseMetadata:

View on GitHub (pinned to 0132848349)

Solutions

  1. Inspect every element of the offending list in model_index.json and normalize to non-empty strings
  2. Regenerate the file with the release tooling
  3. Add a JSON-schema check to your packaging CI

Example fix

// before
"tasks": ["ref2v", null, ""]

// after
"tasks": ["ref2v"]
Defensive patterns

Strategy: validation

Validate before calling

def all_nonempty_strings(v) -> bool:
    return isinstance(v, list) and all(isinstance(s, str) and s for s in v)

Prevention

When it happens

Trigger: tasks containing values like null, 42, or "" in model_index.json during from_model_index/_load_config.

Common situations: JSON produced by a script that inserted Python None or ints, or trailing commas/blank entries from hand editing.

Related errors


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