{"record":{"id":"18224259a3f42a02","repo":"docling-project/docling","slug":"unsupported-engine-type-engine-type","errorCode":null,"errorMessage":"Unsupported engine type: {engine_type}","messagePattern":"Unsupported engine type: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"docling/models/inference_engines/vlm/factory.py","lineNumber":133,"sourceCode":"            accelerator_options=accelerator_options,\n        )\n\n    elif VlmEngineType.is_api_variant(engine_type):\n        from docling.datamodel.vlm_engine_options import ApiVlmEngineOptions\n        from docling.models.inference_engines.vlm.api_openai_compatible_engine import (\n            ApiVlmEngine,\n        )\n\n        if not isinstance(options, ApiVlmEngineOptions):\n            raise ValueError(f\"Expected ApiVlmEngineOptions, got {type(options)}\")\n        return ApiVlmEngine(\n            enable_remote_services=enable_remote_services,\n            options=options,\n            model_config=model_config,\n        )\n\n    else:\n        raise ValueError(f\"Unsupported engine type: {engine_type}\")\n","sourceCodeStart":115,"sourceCodeEnd":134,"githubUrl":"https://github.com/docling-project/docling/blob/61d76f1ff3f8428065465889f7b4577da7df704c/docling/models/inference_engines/vlm/factory.py#L115-L134","documentation":"create_vlm_engine is an exhaustive dispatcher over VlmEngineType: AUTO_INLINE, TRANSFORMERS, MLX, VLLM, and API variants are handled, and anything else falls through to this ValueError. It fires when options.engine_type is not a value the installed Docling version knows how to build an engine for.","triggerScenarios":"Calling create_vlm_engine with an engine_type enum member that is unknown to this Docling version (e.g. an enum value injected from a newer/older Docling, or a custom BaseVlmEngineOptions subclass whose engine_type returns a non-member value).","commonSituations":"Version skew: multiple Docling installations in the environment so options carry an enum from a different version; a custom options subclass overriding engine_type with an unsupported value; a typo'd or future engine type.","solutions":["Use one of the supported engine types: AUTO_INLINE, TRANSFORMERS, MLX, VLLM, or an API variant","Check for version skew: ensure only one docling version is imported (pip show docling / python -c 'import docling; print(docling.__version__)')","If you need a custom engine, subclass the options and engine but route through your own factory, not an unsupported enum value"],"exampleFix":"# before\nfrom docling.models.inference_engines.vlm.base import VlmEngineType\nclass MyOptions(BaseVlmEngineOptions):\n    engine_type: VlmEngineType = VlmEngineType('FUTURE_ENGINE')  # unsupported\n\n# after\nfrom docling.datamodel.vlm_engine_options import TransformersVlmEngineOptions\noptions = TransformersVlmEngineOptions()  # supported: AUTO_INLINE | TRANSFORMERS | MLX | VLLM | API","handlingStrategy":"validation","validationCode":"from docling.models.inference_engines.vlm.base import VlmEngineType, BaseVlmEngineOptions\n\nSUPPORTED = {VlmEngineType.AUTO_INLINE, VlmEngineType.TRANSFORMERS, VlmEngineType.MLX, VlmEngineType.VLLM}\n\ndef engine_type_supported(opts: BaseVlmEngineOptions) -> bool:\n    et = opts.engine_type\n    return et in SUPPORTED or VlmEngineType.is_api_variant(et)","typeGuard":"from docling.models.inference_engines.vlm.base import VlmEngineType, BaseVlmEngineOptions\n\ndef has_supported_engine_type(opts: BaseVlmEngineOptions) -> bool:\n    et = opts.engine_type\n    return et in (VlmEngineType.AUTO_INLINE, VlmEngineType.TRANSFORMERS, VlmEngineType.MLX, VlmEngineType.VLLM) or VlmEngineType.is_api_variant(et)","tryCatchPattern":"try:\n    engine = create_vlm_engine(options=options, model_spec=spec, enable_remote_services=False, artifacts_path=None, accelerator_options=acc)\nexcept ValueError as e:\n    if 'Unsupported engine type' in str(e):\n        raise SystemExit(f'Engine {options.engine_type!r} not supported by this docling build. Check for version skew.') from e\n    raise","preventionTips":["Pin the docling version and import VlmEngineType only from that install","Check for duplicate docling installs when factory errors mention types you never configured","Validate engine_type against the supported set before calling the factory"],"tags":["vlm","factory","configuration","unsupported-operation","version-skew"],"backgroundTag":null,"analyzedSha":"61d76f1ff3f8428065465889f7b4577da7df704c","analyzedAt":"2026-08-14T23:53:18.727Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}