BerriAI/litellm · error · APIConnectionError

{exception_provider} APIConnectionError - {message} {_redact

Error message

{exception_provider} APIConnectionError - {message}
{_redact_string(traceback.format_exc())}

What it means

Error "{exception_provider} APIConnectionError - {message} {_redact_string(traceback.format_exc())}" thrown in BerriAI/litellm.

Source

Thrown at litellm/litellm_core_utils/exception_mapping_utils.py:2061

            raise Timeout(
                message=f"AzureException Timeout - {message}",
                model=model,
                litellm_debug_info=extra_information,
                llm_provider="azure",
                exception_status_code=original_exception.status_code,
            )
        else:
            raise APIError(
                status_code=original_exception.status_code,
                message=f"AzureException APIError - {message}",
                llm_provider="azure",
                litellm_debug_info=extra_information,
                model=model,
                request=httpx.Request(method="POST", url="https://openai.com/"),
            )
    else:
        # if no status code then it is an APIConnectionError: https://github.com/openai/openai-python#handling-errors
        raise APIConnectionError(
            message=f"{exception_provider} APIConnectionError - {message}\n{_redact_string(traceback.format_exc())}",
            llm_provider="azure",
            model=model,
            litellm_debug_info=extra_information,
            request=httpx.Request(method="POST", url="https://openai.com/"),
        )


def _map_openrouter_exception(
    *,
    model: str,
    original_exception: _ProviderHTTPException,
    custom_llm_provider: str,
    error_str: str,
    exception_type: str,
    exception_provider: str,
    extra_information: str,
) -> None:

View on GitHub (pinned to 6c2dcb801b)

Solutions

  1. Check network connectivity to the provider endpoint; see traceback for details.

When it happens

Trigger: Thrown at litellm/litellm_core_utils/exception_mapping_utils.py:2061 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15). Data as JSON: /api/errors/2efdac1d4552e2c1. Report an issue: GitHub.