{"record":{"id":"2c85fa9e96b84692","repo":"sgl-project/sglang","slug":"path-duration-seconds-must-be-in-minimax-h3-mi","errorCode":null,"errorMessage":"{path}.duration_seconds must be in [{MINIMAX_H3_MIN_DURATION_SECONDS:g}, {MINIMAX_H3_MAX_DURATION_SECONDS:g}], got {duration}","messagePattern":"(.+?)\\.duration_seconds must be in \\[(.+?), (.+?)\\], got (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/request_validation.py","lineNumber":132,"sourceCode":"            raise ValueError(f\"{path}.duration_seconds is required\")\n        # ref2va: duration may derive from a reference audio; the\n        # audio-condition presence is enforced after conditions validate.\n    out: dict[str, Any] = {\n        \"short_edge\": short_edge,\n        \"aspect_ratio\": aspect_ratio,\n    }\n    if has_duration:\n        duration = target[\"duration_seconds\"]\n        if isinstance(duration, bool) or not isinstance(duration, (int, float)):\n            raise ValueError(f\"{path}.duration_seconds must be a number\")\n        if duration <= 0:\n            raise ValueError(f\"{path}.duration_seconds must be positive\")\n        if not (\n            MINIMAX_H3_MIN_DURATION_SECONDS\n            <= float(duration)\n            <= MINIMAX_H3_MAX_DURATION_SECONDS\n        ):\n            raise ValueError(\n                f\"{path}.duration_seconds must be in \"\n                f\"[{MINIMAX_H3_MIN_DURATION_SECONDS:g}, \"\n                f\"{MINIMAX_H3_MAX_DURATION_SECONDS:g}], got {duration}\"\n            )\n        out[\"duration_seconds\"] = float(duration)\n    return out\n\n\ndef _validate_conditions(\n    conditions: Any,\n    *,\n    profile: MiniMaxH3TaskProfile,\n    frame_count: int | None,\n) -> list[dict[str, Any]]:\n    path = \"conditions\"\n    if conditions is None:\n        conditions = []\n    if not isinstance(conditions, Sequence) or isinstance(conditions, (str, bytes)):","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/request_validation.py#L114-L150","documentation":"duration_seconds is outside [MINIMAX_H3_MIN_DURATION_SECONDS, MINIMAX_H3_MAX_DURATION_SECONDS]. The pipeline only supports this bounded range; the message embeds the exact bounds with %g formatting.","triggerScenarios":"Requesting duration 2 or 30 when the supported range is e.g. [5, 12] seconds.","commonSituations":"Assuming the model supports arbitrary lengths; slider UI allowing wider ranges than the backend; unit confusion (milliseconds passed as seconds).","solutions":["Clamp duration to the documented min/max","Check for ms-vs-s unit confusion (6000 -> 6)","Read the constants MINIMAX_H3_MIN/MAX_DURATION_SECONDS and validate client-side"],"exampleFix":"// before\n{\"duration_seconds\": 6000}\n// after\n{\"duration_seconds\": 6}","handlingStrategy":"validation","validationCode":"d = target['duration_seconds'] = min(max(d, MINIMAX_H3_MIN_DURATION_SECONDS), MINIMAX_H3_MAX_DURATION_SECONDS)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Watch for ms-vs-s unit mixups","Clamp slider ranges to the documented bounds"],"tags":["minimax-h3","duration","range-check"],"backgroundTag":"value-out-of-range","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}