{"record":{"id":"5d6f095b66297140","repo":"docling-project/docling","slug":"unsupported-vlm-response-format-response-format-l","errorCode":null,"errorMessage":"Unsupported VLM response format {response_format_legacy}","messagePattern":"Unsupported VLM response format (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"docling/pipeline/vlm_pipeline.py","lineNumber":320,"sourceCode":"\n            elif response_format_legacy == ResponseFormat.MARKDOWN:\n                conv_res.document = self._convert_text_with_backend(\n                    conv_res, InputFormat.MD, MarkdownDocumentBackend\n                )\n\n            elif response_format_legacy == ResponseFormat.HTML:\n                conv_res.document = self._convert_text_with_backend(\n                    conv_res, InputFormat.HTML, HTMLDocumentBackend\n                )\n\n            elif response_format_legacy == ResponseFormat.CHANDRA_HTML:\n                conv_res.document = self._parse_chandra_html(conv_res)\n\n            elif response_format_legacy == ResponseFormat.DOTS_JSON:\n                conv_res.document = self._parse_dots_json(conv_res)\n\n            else:\n                raise RuntimeError(\n                    f\"Unsupported VLM response format {response_format_legacy}\"\n                )\n\n            # Generate images of the requested element types\n            if self.pipeline_options.generate_picture_images:\n                scale = self.pipeline_options.images_scale\n                for element, _level in conv_res.document.iterate_items():\n                    if not isinstance(element, DocItem) or len(element.prov) == 0:\n                        continue\n                    if (\n                        isinstance(element, PictureItem)\n                        and self.pipeline_options.generate_picture_images\n                    ):\n                        page_ix = element.prov[0].page_no - 1\n                        page = conv_res.pages[page_ix]\n                        assert page.size is not None\n                        assert page.image is not None\n","sourceCodeStart":302,"sourceCodeEnd":338,"githubUrl":"https://github.com/docling-project/docling/blob/61d76f1ff3f8428065465889f7b4577da7df704c/docling/pipeline/vlm_pipeline.py#L302-L338","documentation":"After the VLM generates a response, VlmPipeline._build_document dispatches on the legacy response_format to pick a parser: Markdown, DocTags, HTML, Chandra-HTML, or DOTS JSON. If the value matches none of these branches the pipeline cannot interpret the model output and raises this RuntimeError. It indicates a response format that this docling release does not know how to parse.","triggerScenarios":"Setting VlmOptions response format to a new/unrecognized ResponseFormat member (or a raw string coerced into the enum) not covered by the dispatch; upgrading options objects that carry a response format introduced in a newer docling while running older pipeline code; custom presets with response_format mutated to an experimental value.","commonSituations":"Using a dots.mocr or chandra-html variant before/after the release that added its parser; hand-editing serialized pipeline options JSON; mixing docling versions between the client that builds options and the process that runs conversion.","solutions":["Set response_format to one of the supported values for your docling version (MARKDOWN, DOCTAGS, HTML, CHANDRA_HTML, DOTS_JSON).","Upgrade docling to the release that supports the response format you want.","Use a stock VLM preset instead of custom options so response format and parser stay in sync.","Check the changelog for the ResponseFormat enum to see which members your version parses."],"exampleFix":"# before\nvlm_options.response_format = ResponseFormat.MOCR_JSON  # not in dispatch\n\n# after\nfrom docling.datamodel.pipeline_options_vlm_model import ResponseFormat\nvlm_options.response_format = ResponseFormat.DOTS_JSON  # supported parser exists","handlingStrategy":"validation","validationCode":"from docling.datamodel.pipeline_options_vlm_model import ResponseFormat\n\nSUPPORTED = {ResponseFormat.MARKDOWN, ResponseFormat.DOCTAGS, ResponseFormat.HTML,\n             ResponseFormat.CHANDRA_HTML, ResponseFormat.DOTS_JSON}\nassert vlm_options.response_format in SUPPORTED","typeGuard":null,"tryCatchPattern":"try:\n    result = vlm_converter.convert(doc)\nexcept RuntimeError as e:\n    if 'Unsupported VLM response format' in str(e):\n        vlm_options.response_format = ResponseFormat.MARKDOWN\n        result = vlm_converter.convert(doc)","preventionTips":["Set response_format from the ResponseFormat enum, never raw strings.","Prefer presets that pair model and response format correctly.","Upgrade docling when adopting new response formats."],"tags":["vlm","response-format","parsing","configuration"],"backgroundTag":null,"analyzedSha":"61d76f1ff3f8428065465889f7b4577da7df704c","analyzedAt":"2026-08-14T23:53:18.727Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}