BerriAI/litellm · error · ValueError
Azure Document Intelligence analysis failed
Error message
Azure Document Intelligence analysis failed: {error_msg} What it means
Error "Azure Document Intelligence analysis failed: {error_msg}" thrown in BerriAI/litellm.
Solutions
- Read error_msg in the error; fix the document or request per the Document Intelligence error returned.
When it happens
Trigger: Thrown at litellm/llms/azure_ai/ocr/document_intelligence/transformation.py:485 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/df1c3316a4e4f1b9.
Report an issue: GitHub.
Appendix: source
Thrown at litellm/llms/azure_ai/ocr/document_intelligence/transformation.py:485
response: HTTP response from operation endpoint
Returns:
Operation status string
Raises:
ValueError: If operation failed or status is unknown
"""
try:
result: Final = response.json()
status: Final = result.get("status")
verbose_logger.debug("Azure DI operation status: %s", status)
if status == "succeeded":
return "succeeded"
elif status == "failed":
error_msg: Final = result.get("error", {}).get("message", "Unknown error")
raise ValueError(f"Azure Document Intelligence analysis failed: {error_msg}")
elif status in ["running", "notStarted"]:
return "running"
else:
raise ValueError(f"Unknown operation status: {status}")
except Exception as e:
if "succeeded" in str(e) or "failed" in str(e):
raise
# If we can't parse JSON, something went wrong
raise ValueError(f"Failed to parse Azure DI operation response: {e}")
def _poll_operation_sync(
self,
operation_url: str,
headers: dict[str, str],
timeout_secs: int,
) -> httpx.Response:
"""View on GitHub (pinned to 77b7c6c40c)