{"record":{"id":"d84263c0177f1134","repo":"BerriAI/litellm","slug":"azure-document-intelligence-analysis-failed-with-s","errorCode":null,"errorMessage":"Azure Document Intelligence analysis failed with status: {operation.status}","messagePattern":"Azure Document Intelligence analysis failed with status: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/azure_ai/ocr/document_intelligence/transformation.py","lineNumber":609,"sourceCode":"        except SSRFError as ssrf_err:\n            raise ValueError(f\"Azure Document Intelligence: rejected polling URL ({ssrf_err})\")\n\n        poll_headers = {\"Ocp-Apim-Subscription-Key\": raw_response.request.headers.get(\"Ocp-Apim-Subscription-Key\", \"\")}\n        return operation_url, poll_headers\n\n    def _transform_completed_response(self, model: str, raw_response: httpx.Response) -> OCRResponse:\n        \"\"\"\n        Transform a completed Azure Document Intelligence analyze operation\n        into the Mistral OCR response shape, preserving Azure-native\n        `analyzeResult` fields (`content`, `tables`, `keyValuePairs`) as\n        top-level response fields.\n        \"\"\"\n        operation: Final = AzureDocumentIntelligenceOperation.model_validate(raw_response.json())\n\n        verbose_logger.debug(\"Azure Document Intelligence response status: %s\", operation.status)\n\n        if operation.status != \"succeeded\":\n            raise ValueError(f\"Azure Document Intelligence analysis failed with status: {operation.status}\")\n\n        analyze_result: Final = (\n            operation.analyzeResult if operation.analyzeResult is not None else AzureDocumentIntelligenceAnalyzeResult()\n        )\n        mistral_pages: Final = [self._transform_azure_page(azure_page) for azure_page in analyze_result.pages]\n        usage_info: Final = OCRUsageInfo(pages_processed=len(mistral_pages), doc_size_bytes=None)\n\n        return OCRResponse(\n            pages=mistral_pages,\n            model=model,\n            usage_info=usage_info,\n            object=\"ocr\",\n            content=analyze_result.content,\n            tables=analyze_result.tables,\n            keyValuePairs=analyze_result.keyValuePairs,\n        )\n\n    def transform_ocr_response(","sourceCodeStart":591,"sourceCodeEnd":627,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/azure_ai/ocr/document_intelligence/transformation.py#L591-L627","documentation":"Error \"Azure Document Intelligence analysis failed with status: {operation.status}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/azure_ai/ocr/document_intelligence/transformation.py:609 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the operation status and error details in Azure; the document analysis failed. Verify document format and model."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}