{"record":{"id":"0a20f11697683428","repo":"roboflow/supervision","slug":"unsupported-vlm-value-vlm","errorCode":null,"errorMessage":"Unsupported VLM value: {vlm}.","messagePattern":"Unsupported VLM value: (.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/supervision/detection/core.py","lineNumber":2139,"sourceCode":"                data=data,\n            )\n\n        if vlm == VLM.GOOGLE_GEMINI_3_5:\n            if not isinstance(result, str):\n                raise ValueError(\n                    f\"Invalid VLM result type: {type(result)}. Must be str.\"\n                )\n            gemini_result = from_google_gemini_3_5(result, **kwargs)\n            data = {CLASS_NAME_DATA_FIELD: gemini_result[2]}\n            return cls(\n                xyxy=gemini_result[0],\n                class_id=gemini_result[1],\n                mask=gemini_result[4],\n                confidence=gemini_result[3],\n                data=data,\n            )\n\n        raise ValueError(f\"Unsupported VLM value: {vlm}.\")\n\n    @classmethod\n    def from_easyocr(cls, easyocr_results: list[Any]) -> Detections:\n        \"\"\"\n        Create a Detections object from the\n        [EasyOCR](https://github.com/JaidedAI/EasyOCR) result.\n\n        Results are placed in the `data` field with the key `\"class_name\"`.\n        When EasyOCR returns quadrilateral corners, the original corners are\n        preserved in ``ORIENTED_BOX_COORDINATES``. Call EasyOCR with\n        ``detail=1`` so bounding boxes are available; ``detail=0`` returns text\n        strings only and cannot be converted into detections.\n\n        Args:\n            easyocr_results: The output Results instance from EasyOCR.\n\n        Returns:\n            A new Detections object.","sourceCodeStart":2121,"sourceCodeEnd":2157,"githubUrl":"https://github.com/roboflow/supervision/blob/7f254d9784d4c37e0f03cd89ddee164c8db099c0/src/supervision/detection/core.py#L2121-L2157","documentation":"Raised by Detections.from_vlm when the vlm argument does not match any supported vision-language-model backend. The dispatcher pattern-matches known VLM enums (Paligemma, Florence-2, Qwen, Google Gemini etc.) and this ValueError is the fall-through for anything else, including raw strings, misspelled names, or None.","triggerScenarios":"Calling sv.Detections.from_vlm(result, vlm=\"gpt-4v\") or vlm=\"gemini\" (unsupported/misspelled value), or passing the model output string instead of the VLM enum, or None when result type cannot disambiguate the backend.","commonSituations":"Newer/other VLM providers not yet integrated; users passing lowercase strings instead of the supervision VLM enum; passing a model name loaded from config without validating it against supported values; version differences where an enum member was added/renamed.","solutions":["Pass a supported sv.VLM enum value, e.g. sv.Detections.from_vlm(result, vlm=sv.VLM.GOOGLE_GEMINI_2_0 or the version installed in your supervision release).","Check the VLM enum members available in your installed version: print(list(sv.VLM)) and use one of those exactly.","For unsupported models, parse the model output yourself and construct sv.Detections(xyxy=..., class_id=..., confidence=...) manually.","Upgrade supervision if the backend you need exists in a newer release."],"exampleFix":"# before\ndets = sv.Detections.from_vlm(result, vlm=\"gemini\")\n\n# after\nimport supervision as sv\ndets = sv.Detections.from_vlm(result, vlm=sv.VLM.GOOGLE_GEMINI_2_0)","handlingStrategy":"type-guard","validationCode":"import supervision as sv\nsupported = set(sv.VLM)\nassert my_vlm in supported, f\"unsupported VLM {my_vlm!r}; choose from {sorted(map(str, supported))}\"","typeGuard":"import supervision as sv\n\ndef is_supported_vlm(value) -> bool:\n    return isinstance(value, sv.VLM)","tryCatchPattern":"try:\n    dets = sv.Detections.from_vlm(result, vlm=vlm)\nexcept ValueError as e:\n    if \"Unsupported VLM\" in str(e):\n        dets = parse_result_manually(result)  # build sv.Detections yourself\n    else:\n        raise","preventionTips":["Always pass the sv.VLM enum, never a bare string from config.","Validate config-driven model names against set(sv.VLM) at startup.","If your model is unsupported, construct sv.Detections(xyxy, class_id, confidence) from your own parser."],"tags":["vlm","detections","enum","api-contract","dispatch"],"backgroundTag":null,"analyzedSha":"7f254d9784d4c37e0f03cd89ddee164c8db099c0","analyzedAt":"2026-08-15T05:13:01.950Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}