BerriAI/litellm · error · NotFoundError

AzureException NotFoundError

Error message

AzureException NotFoundError - {message}

What it means

Azure-specific status mapping: an upstream Azure OpenAI exception with HTTP 404 is re-raised as NotFoundError with the 'AzureException' prefix — typically a wrong deployment name, model path, or api-version.

Solutions

  1. Verify the Azure deployment name and api_base; the deployment was not found.
  2. Check AZURE_API_VERSION matches a version supported by the deployment.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/litellm_core_utils/exception_mapping_utils.py:1913 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/e49c7f1585440315. Report an issue: GitHub.

Appendix: source

Thrown at litellm/litellm_core_utils/exception_mapping_utils.py:1913

    if "Internal server error" in error_str:
        raise litellm.InternalServerError(
            message=f"AzureException Internal server error - {message}",
            llm_provider="azure",
            model=model,
            litellm_debug_info=extra_information,
            response=getattr(original_exception, "response", None),
        )
    elif "This model's maximum context length is" in error_str:
        raise ContextWindowExceededError(
            message=f"AzureException ContextWindowExceededError - {message}",
            llm_provider="azure",
            model=model,
            litellm_debug_info=extra_information,
            response=getattr(original_exception, "response", None),
        )
    elif "DeploymentNotFound" in error_str:
        raise NotFoundError(
            message=f"AzureException NotFoundError - {message}",
            llm_provider="azure",
            model=model,
            litellm_debug_info=extra_information,
            response=getattr(original_exception, "response", None),
        )
    elif azure_error_code == "content_policy_violation" or ExceptionCheckers.is_azure_content_policy_violation_error(
        error_str
    ):
        from litellm.llms.azure.exception_mapping import (
            AzureOpenAIExceptionMapping,
        )

        raise AzureOpenAIExceptionMapping.create_content_policy_violation_error(
            message=message,
            model=model,
            extra_information=extra_information,
            original_exception=original_exception,

View on GitHub (pinned to 77b7c6c40c)