BerriAI/litellm · error · ValueError
Unknown operation status
Error message
Unknown operation status: {status} What it means
Error "Unknown operation status: {status}" thrown in BerriAI/litellm.
Solutions
- Handle the reported operation status; poll again or check the operation in Azure for the unexpected state.
When it happens
Trigger: Thrown at litellm/llms/azure_ai/ocr/document_intelligence/transformation.py:489 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/0c2f57880395bfdf.
Report an issue: GitHub.
Appendix: source
Thrown at litellm/llms/azure_ai/ocr/document_intelligence/transformation.py:489
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:
"""
Poll Azure Document Intelligence operation until completion (sync).
Azure DI POST returns 202 with Operation-Location header.
We need to poll that URL until status is "succeeded" or "failed".View on GitHub (pinned to 77b7c6c40c)