{"record":{"id":"0e014b8e259d1b7e","repo":"docling-project/docling","slug":"unsupported-vlm-inference-framework-vlm-options","errorCode":null,"errorMessage":"Unsupported VLM inference framework: {vlm_options.inference_framework}","messagePattern":"Unsupported VLM inference framework: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"docling/experimental/pipeline/threaded_layout_vlm_pipeline.py","lineNumber":208,"sourceCode":"                )\n            elif vlm_options.inference_framework == InferenceFramework.MLX:\n                self.vlm_model = HuggingFaceMlxModel(\n                    enabled=True,\n                    artifacts_path=art_path,\n                    accelerator_options=self.pipeline_options.accelerator_options,\n                    vlm_options=vlm_options,\n                )\n            elif vlm_options.inference_framework == InferenceFramework.VLLM:\n                from docling.models.vlm_pipeline_models.vllm_model import VllmVlmModel\n\n                self.vlm_model = VllmVlmModel(\n                    enabled=True,\n                    artifacts_path=art_path,\n                    accelerator_options=self.pipeline_options.accelerator_options,\n                    vlm_options=vlm_options,\n                )\n            else:\n                raise ValueError(\n                    f\"Unsupported VLM inference framework: {vlm_options.inference_framework}\"\n                )\n        else:\n            raise ValueError(f\"Unsupported VLM options type: {type(base_vlm_options)}\")\n\n    def _resolve_artifacts_path(self) -> Optional[Path]:\n        \"\"\"Resolve artifacts path from options or settings.\"\"\"\n        if self.pipeline_options.artifacts_path:\n            p = Path(self.pipeline_options.artifacts_path).expanduser()\n        elif settings.artifacts_path:\n            p = Path(settings.artifacts_path).expanduser()\n        else:\n            return None\n        if not p.is_dir():\n            raise RuntimeError(\n                f\"{p} does not exist or is not a directory containing the required models\"\n            )\n        return p","sourceCodeStart":190,"sourceCodeEnd":226,"githubUrl":"https://github.com/docling-project/docling/blob/61d76f1ff3f8428065465889f7b4577da7df704c/docling/experimental/pipeline/threaded_layout_vlm_pipeline.py#L190-L226","documentation":"ValueError raised while building the VLM model inside ThreadedLayoutVlmPipeline: vlm_options.inference_framework is not one of the frameworks the pipeline knows how to instantiate (the elif chain covers only specific InferenceFramework members such as TRANSFORMERS and VLLM).","triggerScenarios":"Setting ThreadedLayoutVlmPipelineOptions.vlm_options.inference_framework to a framework not handled by this pipeline (e.g. an API/remote framework enum value) and then initializing the pipeline.","commonSituations":"Reusing options written for the standard VlmPipeline which supports remote-API inference frameworks; enum gains new members in a newer Docling version that the experimental threaded pipeline has not adopted yet.","solutions":["Use one of the frameworks supported by the threaded pipeline, e.g. InferenceFramework.VLLM or the local transformers-based one shown in the branch above.","If you need API-based inference, use the standard VlmPipeline with StandardPdfPipeline instead.","Pin/align Docling versions so the enum values you reference match what the pipeline implements."],"exampleFix":"# before\nvlm_opts.inference_framework = InferenceFramework.API  # not implemented here\n\n# after\nvlm_opts.inference_framework = InferenceFramework.VLLM\n# (or use StandardPdfPipeline + VlmPipeline for API-backed inference)","handlingStrategy":"validation","validationCode":"from docling.datamodel.pipeline_options_vlm_model import InferenceFramework\nSUPPORTED = {InferenceFramework.TRANSFORMERS, InferenceFramework.VLLM}\nassert vlm_opts.inference_framework in SUPPORTED, 'threaded pipeline supports local frameworks only'","typeGuard":"def is_supported_framework(fw: InferenceFramework) -> bool:\n    return fw in {InferenceFramework.TRANSFORMERS, InferenceFramework.VLLM}","tryCatchPattern":"try:\n    pipeline = ThreadedLayoutVlmPipeline(opts)\nexcept ValueError as e:\n    if 'Unsupported VLM inference framework' in str(e):\n        vlm_opts.inference_framework = InferenceFramework.VLLM\n        pipeline = ThreadedLayoutVlmPipeline(opts)","preventionTips":["Restrict threaded-pipeline configs to the local inference frameworks it implements.","Keep API-framework configs paired with the standard VlmPipeline."],"tags":["vlm","inference-framework","configuration"],"backgroundTag":null,"analyzedSha":"61d76f1ff3f8428065465889f7b4577da7df704c","analyzedAt":"2026-08-14T23:53:18.727Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}