BerriAI/litellm · error · Timeout

AnthropicException Timeout - {error_str}

Error message

AnthropicException Timeout - {error_str}

What it means

Error "AnthropicException Timeout - {error_str}" thrown in BerriAI/litellm.

Source

Thrown at litellm/litellm_core_utils/exception_mapping_utils.py:599

                model=model,
                response=getattr(original_exception, "response", None),
            )
        elif original_exception.status_code == 502:
            raise BadGatewayError(
                message=f"AnthropicException BadGatewayError - {error_str}",
                llm_provider="anthropic",
                model=model,
                response=getattr(original_exception, "response", None),
            )
        elif original_exception.status_code == 503:
            raise litellm.ServiceUnavailableError(
                message=f"AnthropicException - {error_str}. Handle with `litellm.ServiceUnavailableError`.",
                llm_provider="anthropic",
                model=model,
                response=getattr(original_exception, "response", None),
            )
        elif original_exception.status_code == 504:  # gateway timeout error
            raise Timeout(
                message=f"AnthropicException Timeout - {error_str}",
                model=model,
                llm_provider="anthropic",
                exception_status_code=original_exception.status_code,
            )


def _map_replicate_exception(
    *,
    model: str,
    original_exception: _ProviderHTTPException,
    custom_llm_provider: str,
    error_str: str,
    exception_type: str,
    exception_provider: str,
    extra_information: str,
) -> None:
    if "Incorrect authentication token" in error_str:

View on GitHub (pinned to 6c2dcb801b)

Solutions

  1. Increase the timeout for the Anthropic request or check connectivity.

When it happens

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

Common situations: See trigger scenarios.

Understand the failure class


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