BerriAI/litellm · error · ValueError
Trying to Customize Email Alerting {CommonProxyErrors.not_p
Error message
Trying to Customize Email Alerting
{CommonProxyErrors.not_premium_user.value} What it means
Customizing email alert branding (email_logo_url or email_support_contact) is an enterprise/premium feature. _check_if_using_premium_email_feature raises ValueError when these parameters are set but premium_user is not True (litellm/integrations/SlackAlerting/slack_alerting.py:1088).
Source
Thrown at litellm/integrations/SlackAlerting/slack_alerting.py:1088
)
if response.status_code == 200:
return True
else:
print("Error sending webhook alert. Error=", response.text) # noqa: T201
return False
async def _check_if_using_premium_email_feature(
self,
premium_user: bool,
email_logo_url: str | None = None,
email_support_contact: str | None = None,
):
from litellm.proxy.proxy_server import CommonProxyErrors, premium_user
if premium_user is not True:
if email_logo_url is not None or email_support_contact is not None:
raise ValueError(f"Trying to Customize Email Alerting\n {CommonProxyErrors.not_premium_user.value}")
async def _construct_user_invitation_link(self, recipient_user_id: str | None, base_url: str) -> str:
from litellm.proxy.management_helpers.user_invitation import (
create_invitation_for_user,
)
from litellm.proxy.proxy_server import prisma_client
if recipient_user_id is None or prisma_client is None:
return base_url
try:
existing_invitations: Final = TypeAdapter(list[InvitationModel]).validate_python(
await InvitationLinkRepository(prisma_client).table.find_many( # pyright: ignore[reportAny] # untyped prisma boundary (any-ok), result validated by TypeAdapter
where={"user_id": recipient_user_id}, # mutable-ok: prisma find_many requires a dict where filter
order={"created_at": "desc"}, # mutable-ok: prisma find_many requires a dict order arg
),
from_attributes=True,
)View on GitHub (pinned to 6c2dcb801b)
Solutions
- Remove email_logo_url and email_support_contact from the config to use default email alerting
- If you have an enterprise license, ensure premium_user resolves True (valid license/metadata config) before these options are used
- Contact litellm sales if you need branded email alerts
- Check proxy startup logs for premium-user detection errors
Example fix
# before alerting: general_settings: alerting: ["email"] email_logo_url: "https://cdn.acme.com/logo.png" # after alerting: general_settings: alerting: ["email"] # default branding, no premium options
Defensive patterns
Strategy: validation
Validate before calling
def email_customization_allowed(premium_user: bool, logo_url, support_contact) -> bool:
if not premium_user and (logo_url is not None or support_contact is not None):
return False
return True Try / catch
try:
await alerting.send_email_alert(...)
except ValueError as e:
if "not_premium_user" in str(e) or "Trying to Customize Email Alerting" in str(e):
# strip premium email options and retry with defaults
raise Prevention
- Only set email_logo_url/email_support_contact on licensed enterprise deployments
- Gate premium config keys behind a premium flag in your config loader
- Verify premium_user detection at proxy startup
When it happens
Trigger: Configuring alerting with email_logo_url or email_support_contact in litellm proxy config while not running with a premium/enterprise license; premium flag not propagated (e.g., stale env var LITELLM_PREMIUM or missing license) on a proxy that is actually licensed.
Common situations: Copying enterprise config templates to an OSS deployment; license expired; premium_user detection failing behind a proxy where the metadata endpoint is unreachable.
Related errors
- GCS Bucket logging is a premium feature. Please upgrade to u
- PAGERDUTY_API_KEY is not set
- Error saving email settings to general_settings: {str(e)}
- Database not connected
- Setting tag based guardrail modes is only available in litel
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/50ba2fe65b72f412.
Report an issue: GitHub.