BerriAI/litellm · error · ValueError
Azure Document Intelligence analysis failed with status
Error message
Azure Document Intelligence analysis failed with status: {operation.status} What it means
Error "Azure Document Intelligence analysis failed with status: {operation.status}" thrown in BerriAI/litellm.
Solutions
- Check the operation status and error details in Azure; the document analysis failed. Verify document format and model.
When it happens
Trigger: Thrown at litellm/llms/azure_ai/ocr/document_intelligence/transformation.py:609 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/d84263c0177f1134.
Report an issue: GitHub.
Appendix: source
Thrown at litellm/llms/azure_ai/ocr/document_intelligence/transformation.py:609
except SSRFError as ssrf_err:
raise ValueError(f"Azure Document Intelligence: rejected polling URL ({ssrf_err})")
poll_headers = {"Ocp-Apim-Subscription-Key": raw_response.request.headers.get("Ocp-Apim-Subscription-Key", "")}
return operation_url, poll_headers
def _transform_completed_response(self, model: str, raw_response: httpx.Response) -> OCRResponse:
"""
Transform a completed Azure Document Intelligence analyze operation
into the Mistral OCR response shape, preserving Azure-native
`analyzeResult` fields (`content`, `tables`, `keyValuePairs`) as
top-level response fields.
"""
operation: Final = AzureDocumentIntelligenceOperation.model_validate(raw_response.json())
verbose_logger.debug("Azure Document Intelligence response status: %s", operation.status)
if operation.status != "succeeded":
raise ValueError(f"Azure Document Intelligence analysis failed with status: {operation.status}")
analyze_result: Final = (
operation.analyzeResult if operation.analyzeResult is not None else AzureDocumentIntelligenceAnalyzeResult()
)
mistral_pages: Final = [self._transform_azure_page(azure_page) for azure_page in analyze_result.pages]
usage_info: Final = OCRUsageInfo(pages_processed=len(mistral_pages), doc_size_bytes=None)
return OCRResponse(
pages=mistral_pages,
model=model,
usage_info=usage_info,
object="ocr",
content=analyze_result.content,
tables=analyze_result.tables,
keyValuePairs=analyze_result.keyValuePairs,
)
def transform_ocr_response(View on GitHub (pinned to 77b7c6c40c)