{"record":{"id":"6c670588946598d6","repo":"sgl-project/sglang","slug":"cpath-has-unknown-fields-sorted-unknown","errorCode":null,"errorMessage":"{cpath} has unknown fields: {sorted(unknown)}","messagePattern":"(.+?) has unknown fields: (.+?)","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":192,"sourceCode":"        and len(conditions) > profile.max_condition_count\n    ):\n        raise ValueError(\n            f\"{path} allows at most {profile.max_condition_count} entries \"\n            f\"for task {profile.task!r}, got {len(conditions)}\"\n        )\n\n    aligned_frame_count = (\n        minimax_h3_align_frame_count(frame_count) if frame_count is not None else None\n    )\n    normalized: list[dict[str, Any]] = []\n    seen_frame_indices: dict[int, int] = {}\n    for index, cond in enumerate(conditions):\n        cpath = f\"{path}[{index}]\"\n        if not isinstance(cond, Mapping):\n            raise ValueError(f\"{cpath} must be an object\")\n        unknown = set(cond) - _ALLOWED_CONDITION_KEYS\n        if unknown:\n            raise ValueError(f\"{cpath} has unknown fields: {sorted(unknown)}\")\n        role = _require_str(cond.get(\"role\"), f\"{cpath}.role\")\n        if role not in (\n            MINIMAX_H3_CONDITION_ROLE_KEYFRAME,\n            MINIMAX_H3_CONDITION_ROLE_REFERENCE,\n        ):\n            raise ValueError(\n                f\"{cpath}.role must be keyframe or reference, \" f\"got {role!r}\"\n            )\n        cond_type = _require_str(cond.get(\"type\"), f\"{cpath}.type\")\n        try:\n            rule = profile.rule_for(role=role, condition_type=cond_type)\n        except ValueError as exc:\n            raise ValueError(f\"{cpath}: {exc}\") from exc\n        uri = _require_str(cond.get(\"uri\"), f\"{cpath}.uri\")\n\n        entry: dict[str, Any] = {\"type\": cond_type, \"uri\": uri, \"role\": role}\n        if rule.requires_frame_index:\n            frame_index = _require_int(cond.get(\"frame_index\"), f\"{cpath}.frame_index\")","sourceCodeStart":174,"sourceCodeEnd":210,"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#L174-L210","documentation":"A condition object contains fields outside _ALLOWED_CONDITION_KEYS. The validator enforces a closed schema so typos and transport-layer extras fail fast.","triggerScenarios":"Adding fields like 'frameIdx', 'timestamp', or 'url' (instead of 'uri') to a condition.","commonSituations":"Client SDK version drift adding new fields the server schema doesn't know; typos in field names; embedding metadata on conditions.","solutions":["Remove/rename the unknown fields to the allowed set (role, type, uri, frame_index, start_time_seconds, ...)","Check _ALLOWED_CONDITION_KEYS for the exact supported schema","Upgrade the server if a newer client legitimately adds fields"],"exampleFix":"// before\n{\"role\": \"keyframe\", \"type\": \"image\", \"url\": \"f0.png\"}\n// after\n{\"role\": \"keyframe\", \"type\": \"image\", \"uri\": \"f0.png\"}","handlingStrategy":"validation","validationCode":"allowed = {'role', 'type', 'uri', 'frame_index', 'start_time_seconds'}\nextra = set(cond) - allowed\nif extra:\n    cond = {k: v for k, v in cond.items() if k in allowed}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin client and server schema versions","Strip metadata before forwarding conditions"],"tags":["minimax-h3","conditions","unknown-fields","schema"],"backgroundTag":"schema-validation-failed","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}