BerriAI/litellm · error · ImportError
backoff is not installed. Please install it via 'pip install
Error message
backoff is not installed. Please install it via 'pip install backoff'
What it means
Module-level import guard in litellm/proxy/utils.py: the optional 'backoff' dependency is not installed in the environment. Email-sending callbacks rely on it for retry/backoff, so the proxy module refuses to load at import time until 'pip install backoff' is run.
Source
Thrown at litellm/proxy/utils.py:67
from litellm_enterprise.enterprise_callbacks.send_emails.resend_email import (
ResendEmailLogger,
)
from litellm_enterprise.enterprise_callbacks.send_emails.sendgrid_email import (
SendGridEmailLogger,
)
from litellm_enterprise.enterprise_callbacks.send_emails.smtp_email import (
SMTPEmailLogger,
)
except ImportError:
BaseEmailLogger = None
SendGridEmailLogger = None
SMTPEmailLogger = None
ResendEmailLogger = None
try:
import backoff
except ImportError:
raise ImportError("backoff is not installed. Please install it via 'pip install backoff'")
from fastapi import HTTPException, status
import litellm
import litellm.litellm_core_utils
import litellm.litellm_core_utils.litellm_logging
from litellm import (
EmbeddingResponse,
ImageResponse,
ModelResponse,
ModelResponseStream,
Router,
)
from litellm._logging import _redact_string, verbose_proxy_logger
from litellm._service_logger import ServiceLogging, ServiceTypes
from litellm.caching.caching import DualCache, RedisCache
from litellm.caching.dual_cache import LimitedSizeOrderedDict
from litellm.exceptions import RejectedRequestError, SensitiveDataRouteExceptionView on GitHub (pinned to 77b7c6c40c)
Solutions
- Install the backoff package: pip install backoff.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/utils.py:67 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/c29220d6851495a0.
Report an issue: GitHub.