{"record":{"id":"5bae1e3a8062232a","repo":"sgl-project/sglang","slug":"path-aspect-ratio-for-task-profile-task-r-must","errorCode":null,"errorMessage":"{path}.aspect_ratio for task {profile.task!r} must be 'auto' or one of {list(MINIMAX_H3_FINITE_ASPECT_RATIOS)!r}, got {aspect_ratio!r}","messagePattern":"(.+?)\\.aspect_ratio for task (.+?) must be 'auto' or one of (.+?), 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":107,"sourceCode":"        raise ValueError(f\"{path}.short_edge must be positive, got {short_edge}\")\n    if short_edge != MINIMAX_H3_RECOMMENDED_SHORT_EDGE:\n        # Same guard the resolver applies. Without it the recommended value warns\n        # that it is \"outside the verified configuration\", naming itself as the\n        # verified one.\n        warn_unverified_short_edge(short_edge)\n    aspect_ratio = _require_str(target.get(\"aspect_ratio\"), f\"{path}.aspect_ratio\")\n    if profile.aspect_ratio_forced_auto and aspect_ratio != \"auto\":\n        raise ValueError(\n            f'{path}.aspect_ratio must be \"auto\" for task {profile.task!r}, '\n            f\"got {aspect_ratio!r}\"\n        )\n    has_duration = target.get(\"duration_seconds\") is not None\n    if (\n        profile.task in {MINIMAX_H3_TASK_T2VA, MINIMAX_H3_TASK_REF2VA}\n        and aspect_ratio != \"auto\"\n        and aspect_ratio not in MINIMAX_H3_FINITE_ASPECT_RATIOS\n    ):\n        raise ValueError(\n            f\"{path}.aspect_ratio for task {profile.task!r} must be 'auto' or \"\n            f\"one of {list(MINIMAX_H3_FINITE_ASPECT_RATIOS)!r}, got \"\n            f\"{aspect_ratio!r}\"\n        )\n    if not has_duration:\n        if not profile.duration_from_audio_reference:\n            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:","sourceCodeStart":89,"sourceCodeEnd":125,"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#L89-L125","documentation":"For T2VA/REF2VA tasks, aspect_ratio must be \"auto\" or a member of MINIMAX_H3_FINITE_ASPECT_RATIOS; anything else is rejected. This enumerates the finite supported ratios (e.g. '16:9', '9:16', '1:1', ...).","triggerScenarios":"Passing aspect_ratio='4:3' or '21:9' or a typo like '16x9' on a t2va/ref2va request.","commonSituations":"Copy-pasting aspect ratios supported by other video models; using 'x' instead of ':' separators; locale-specific formatting.","solutions":["Use 'auto' to let the model pick the ratio","Use one of the entries in MINIMAX_H3_FINITE_ASPECT_RATIOS (import it and validate client-side)","Fix separator/format typos like '16x9' -> '16:9'"],"exampleFix":"// before\n{\"aspect_ratio\": \"16x9\"}\n// after\n{\"aspect_ratio\": \"16:9\"}","handlingStrategy":"type-guard","validationCode":"from sglang... import MINIMAX_H3_FINITE_ASPECT_RATIOS\nif ar != 'auto' and ar not in MINIMAX_H3_FINITE_ASPECT_RATIOS:\n    raise ValueError(f'unsupported aspect_ratio {ar}')","typeGuard":"def is_valid_aspect_ratio(v: str) -> bool:\n    return v == 'auto' or v in MINIMAX_H3_FINITE_ASPECT_RATIOS","tryCatchPattern":null,"preventionTips":["Expose a dropdown of supported ratios in UIs","Use ':' not 'x' in ratio strings"],"tags":["minimax-h3","aspect-ratio","enum-validation"],"backgroundTag":"value-not-in-allowed-set","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}