BerriAI/litellm · error · HTTPException
Blocked user check was never set. This call has no effect.Th
Error message
Blocked user check was never set. This call has no effect.This uses the enterprise folder - only available on the Docker image.
What it means
POST /customer/unblock first imports the enterprise-only hook enterprise.enterprise_hooks.blocked_user_list. On ImportError - the enterprise code ships only inside LiteLLM's enterprise Docker image, never in the pip package - the endpoint immediately returns HTTP 400 stating that blocked-user management has no effect without the enterprise package.
Source
Thrown at litellm/proxy/management_endpoints/customer_endpoints.py:221
async def unblock_user(data: BlockUsers):
"""
[BETA] Unblock calls with this user id
Example
```
curl -X POST "http://0.0.0.0:8000/user/unblock"
-H "Authorization: Bearer sk-1234"
-d '{
"user_ids": [<user_id>, ...]
}'
```
"""
try:
from enterprise.enterprise_hooks.blocked_user_list import (
_ENTERPRISE_BlockedUserList,
)
except ImportError:
raise HTTPException(
status_code=400,
detail={
"error": "Blocked user check was never set. This call has no effect."
+ CommonProxyErrors.missing_enterprise_package_docker.value
},
)
if (
not any(isinstance(x, _ENTERPRISE_BlockedUserList) for x in litellm.callbacks)
or litellm.blocked_user_list is None
):
raise HTTPException(
status_code=400,
detail={"error": "Blocked user check was never set. This call has no effect."},
)
if isinstance(litellm.blocked_user_list, list):
for id in data.user_ids:View on GitHub (pinned to 77b7c6c40c)
Solutions
- Run the official LiteLLM enterprise Docker image, which bundles the enterprise folder
- If you build a custom image, copy the enterprise package in and make sure your enterprise license is active
- If enterprise is not licensed, stop calling /customer/unblock - enforce blocklists at your own gateway/filter layer instead
Example fix
# before pip install litellm && litellm --config config.yaml # no enterprise folder -> unblock 400s # after docker run -p 4000:4000 -v $(pwd)/config.yaml:/app/config.yaml litellm/litellm --config /app/config.yaml # image bundles enterprise code
Defensive patterns
Strategy: validation
Validate before calling
def enterprise_unblock_available() -> bool:
"""Only meaningful when run inside the same environment as the proxy."""
try:
import enterprise.enterprise_hooks.blocked_user_list # noqa: F401
return True
except ImportError:
return False Try / catch
try:
r = httpx.post(f"{base}/customer/unblock", json={"user_ids": ids}, headers=headers)
r.raise_for_status()
except httpx.HTTPStatusError as e:
if e.response.status_code == 400 and "enterprise" in e.response.text:
raise RuntimeError("blocked-user API needs the LiteLLM enterprise image") from e
raise Prevention
- Deploy enterprise features from the official Docker image, not pip installs
- Gate enterprise-only endpoints behind a capability flag in your tooling so they are never called on OSS builds
- Track which endpoints are enterprise-only in LiteLLM's docs before wiring them into automation
When it happens
Trigger: Calling POST /customer/unblock on a pip-installed litellm (pip install litellm) or a custom-built image that omits the enterprise folder, so the import of enterprise.enterprise_hooks.blocked_user_list fails.
Common situations: Self-hosting via pip instead of the official image; slim custom Dockerfiles that copy only OSS code; local dev and CI environments exercising enterprise endpoints without the enterprise image or license.
Related errors
- Only premium users can add tags to projects. You must be a L
- Trying to Customize Email Alerting {CommonProxyErrors.not_p
- Setting tag-based guardrails is only available in litellm-en
- MissingTrying to use Llama GuardMissing litellm-enterprise p
- Trying to use Secret DetectionMissing litellm-enterprise pac
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/92a14127e0dfbb99.
Report an issue: GitHub.