{"record":{"id":"2284aff031fe2d91","repo":"PaddlePaddle/PaddleOCR","slug":"invalid-backend-for-the-vl-recognition-module-vl","errorCode":null,"errorMessage":"Invalid backend for the VL recognition module: {vl_rec_backend}. Supported values are {_SUPPORTED_VL_BACKENDS}.","messagePattern":"Invalid backend for the VL recognition module: (.+?)\\. Supported values are (.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"paddleocr/_pipelines/paddleocr_vl.py","lineNumber":76,"sourceCode":"        use_doc_orientation_classify=None,\n        use_doc_unwarping=None,\n        use_layout_detection=None,\n        use_chart_recognition=None,\n        use_seal_recognition=None,\n        use_ocr_for_image_block=None,\n        format_block_content=None,\n        merge_layout_blocks=None,\n        markdown_ignore_labels=None,\n        use_queues=None,\n        **kwargs,\n    ):\n        if pipeline_version not in _AVAILABLE_PIPELINE_VERSIONS:\n            raise ValueError(\n                f\"Invalid pipeline version: {pipeline_version}. Supported versions are {_AVAILABLE_PIPELINE_VERSIONS}.\"\n            )\n\n        if vl_rec_backend is not None and vl_rec_backend not in _SUPPORTED_VL_BACKENDS:\n            raise ValueError(\n                f\"Invalid backend for the VL recognition module: {vl_rec_backend}. Supported values are {_SUPPORTED_VL_BACKENDS}.\"\n            )\n\n        params = locals().copy()\n        params.pop(\"self\")\n        params.pop(\"pipeline_version\")\n        params.pop(\"kwargs\")\n        self._params = params\n        self.pipeline_version = pipeline_version\n\n        super().__init__(**kwargs)\n\n    @property\n    def _paddlex_pipeline_name(self):\n        if self.pipeline_version == \"v1\":\n            return \"PaddleOCR-VL\"\n        elif self.pipeline_version == \"v1.5\":\n            return \"PaddleOCR-VL-1.5\"","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/PaddlePaddle/PaddleOCR/blob/2661c7c0ef5c613e8f93c6e93b2e052399f0f854/paddleocr/_pipelines/paddleocr_vl.py#L58-L94","documentation":"The PaddleOCR-VL constructor validates the VL recognition backend name against _SUPPORTED_VL_BACKENDS and raises ValueError for unknown values. The check is skipped when vl_rec_backend is None (default), so it only fires when an explicit unsupported backend string is supplied.","triggerScenarios":"PaddleOCRVL(vl_rec_backend='trt'), vl_rec_backend='paddle' when the installed release only supports other names, or any typo/case variant of a supported backend string.","commonSituations":"Passing inference-engine nicknames ('onnx', 'tensorrt', 'gpu') that are not backend identifiers in this API; backend names changing across paddleocr versions; copy-pasting config between versions.","solutions":["Use one of the supported backends — inspect paddleocr._pipelines.paddleocr_vl._SUPPORTED_VL_BACKENDS for your install and pass an exact entry.","Omit vl_rec_backend to use the default backend.","If you need a specific engine (e.g. TensorRT), configure it through the correct backend's own options after choosing a supported backend value."],"exampleFix":"# before\npipe = PaddleOCRVL(vl_rec_backend='tensorrt')  # ValueError\n# after\nfrom paddleocr._pipelines.paddleocr_vl import _SUPPORTED_VL_BACKENDS\npipe = PaddleOCRVL(vl_rec_backend=_SUPPORTED_VL_BACKENDS[0])","handlingStrategy":"validation","validationCode":"from paddleocr._pipelines.paddleocr_vl import _SUPPORTED_VL_BACKENDS\n\ndef valid_vl_backend(b) -> bool:\n    return b is None or b in _SUPPORTED_VL_BACKENDS","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pick backends from _SUPPORTED_VL_BACKENDS, not engine nicknames like 'tensorrt'","Omit vl_rec_backend unless you specifically need a non-default backend","Re-check the backend list after package upgrades"],"tags":["vl-pipeline","backend","config","valueerror"],"backgroundTag":null,"analyzedSha":"2661c7c0ef5c613e8f93c6e93b2e052399f0f854","analyzedAt":"2026-08-14T20:17:30.180Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}