{"record":{"id":"471eb81005e84bfa","repo":"docling-project/docling","slug":"no-asr-model-support-for-asr-options","errorCode":null,"errorMessage":"No ASR model support for {asr_options}","messagePattern":"No ASR model support for (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"docling/pipeline/asr_transcriber.py","lineNumber":807,"sourceCode":"                artifacts_path=artifacts_path,\n                accelerator_options=accelerator_options,\n                asr_options=asr_options,\n            )\n        elif isinstance(asr_options, InlineAsrMlxWhisperOptions):\n            return _MlxWhisperModel(\n                enabled=True,\n                artifacts_path=artifacts_path,\n                accelerator_options=accelerator_options,\n                asr_options=asr_options,\n            )\n        elif isinstance(asr_options, InlineAsrWhisperS2TOptions):\n            return _WhisperS2TModel(\n                enabled=True,\n                artifacts_path=artifacts_path,\n                accelerator_options=accelerator_options,\n                asr_options=asr_options,\n            )\n        raise ValueError(f\"No ASR model support for {asr_options}\")\n","sourceCodeStart":789,"sourceCodeEnd":808,"githubUrl":"https://github.com/docling-project/docling/blob/61d76f1ff3f8428065465889f7b4577da7df704c/docling/pipeline/asr_transcriber.py#L789-L808","documentation":"The ASR model factory (_get_asr_model / equivalent dispatcher) only maps specific option classes to transcribers: InlineAsrWhisperOptions -> _WhisperModel, InlineAsrMlxWhisperOptions -> _MlxWhisperModel, InlineAsrWhisperS2TOptions -> _WhisperS2TModel. Any other value — including a typo'd class, a custom subclass the factory does not isinstance-match, or None — falls through to ValueError.","triggerScenarios":"Passing an unrecognized object as asr_options to the inline ASR pipeline: e.g. a user-defined AsrOptions subclass, a dict, an options object from an older/newer docling version whose class identity differs, or a plain AsrOptions base instance where a specific engine options class is required.","commonSituations":"Version mismatches after upgrade/downgrade (options classes live in different modules, isinstance fails across duplicates); plugins trying to add a custom ASR engine by subclassing; forgetting to set a concrete engine in asr_options.","solutions":["Set asr_options to one of the concrete engine option classes: InlineAsrWhisperOptions(), InlineAsrMlxWhisperOptions(), or InlineAsrWhisperS2TOptions()","After upgrading/downgrading docling, re-create options via that version's own get_default_options()/classes so isinstance matches","For custom engines, monkeypatch/extend the factory rather than passing an unknown options class"],"exampleFix":"# before\npipeline_options.asr_options = MyCustomAsrOptions()  # unknown to factory\n\n# after\nfrom docling.pipeline.asr_transcriber import InlineAsrWhisperOptions\npipeline_options.asr_options = InlineAsrWhisperOptions()","handlingStrategy":"type-guard","validationCode":"from docling.pipeline.asr_transcriber import (\n    InlineAsrMlxWhisperOptions, InlineAsrWhisperOptions, InlineAsrWhisperS2TOptions)\n\nSUPPORTED_ASR_OPTIONS = (InlineAsrWhisperOptions, InlineAsrMlxWhisperOptions, InlineAsrWhisperS2TOptions)\nassert isinstance(asr_options, SUPPORTED_ASR_OPTIONS), f'unsupported engine options: {type(asr_options).__name__}'","typeGuard":"def is_supported_asr_options(o) -> bool:\n    return isinstance(o, (InlineAsrWhisperOptions, InlineAsrMlxWhisperOptions, InlineAsrWhisperS2TOptions))","tryCatchPattern":null,"preventionTips":["Always set asr_options to a concrete engine class from the docling version you run","After upgrades, construct options via the installed version's own API instead of reusing serialized/config files"],"tags":["asr","factory","options","configuration"],"backgroundTag":null,"analyzedSha":"61d76f1ff3f8428065465889f7b4577da7df704c","analyzedAt":"2026-08-14T23:53:18.727Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}