{"record":{"id":"93250b50a2c2873c","repo":"roboflow/supervision","slug":"invalid-vlm-result-type-type-result-must-be","errorCode":null,"errorMessage":"Invalid VLM result type: {type(result)}. Must be {RESULT_TYPES[vlm]}","messagePattern":"Invalid VLM result type: (.+?)\\. Must be (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/supervision/detection/vlm.py","lineNumber":195,"sourceCode":"        result: The result object to validate (type depends on VLM).\n        kwargs: Dictionary of arguments to validate against required/allowed lists.\n\n    Returns:\n        The validated VLM enum value.\n\n    Raises:\n        ValueError: If the VLM, result type, or arguments are invalid.\n    \"\"\"\n    if isinstance(vlm, str):\n        try:\n            vlm = VLM(vlm.lower())\n        except ValueError:\n            raise ValueError(\n                f\"Invalid vlm value: {vlm}. Must be one of {[e.value for e in VLM]}\"\n            )\n\n    if not isinstance(result, RESULT_TYPES[vlm]):\n        raise ValueError(\n            f\"Invalid VLM result type: {type(result)}. Must be {RESULT_TYPES[vlm]}\"\n        )\n\n    required_args = REQUIRED_ARGUMENTS.get(vlm, [])\n    for arg in required_args:\n        if arg not in kwargs:\n            raise ValueError(f\"Missing required argument: {arg}\")\n\n    allowed_args = ALLOWED_ARGUMENTS.get(vlm, [])\n    for arg in kwargs:\n        if arg not in allowed_args:\n            raise ValueError(f\"Argument {arg} is not allowed for {vlm.name}\")\n\n    return vlm\n\n\n@deprecated(  # type: ignore[untyped-decorator]\n    target=_validate_vlm_parameters,","sourceCodeStart":177,"sourceCodeEnd":213,"githubUrl":"https://github.com/roboflow/supervision/blob/7f254d9784d4c37e0f03cd89ddee164c8db099c0/src/supervision/detection/vlm.py#L177-L213","documentation":"Error \"Invalid VLM result type: {type(result)}. Must be {RESULT_TYPES[vlm]}\" thrown in roboflow/supervision.","triggerScenarios":"Thrown at src/supervision/detection/vlm.py:195 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Return the result from the model in the type expected for the chosen VLM (see the error message for the expected type).","If the model returns a different structure, extract the expected payload (string or dict) before calling the connector."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7f254d9784d4c37e0f03cd89ddee164c8db099c0","analyzedAt":"2026-08-15T05:13:01.950Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}