{"record":{"id":"92a14127e0dfbb99","repo":"BerriAI/litellm","slug":"blocked-user-check-was-never-set-this-call-has-no","errorCode":null,"errorMessage":"Blocked user check was never set. This call has no effect.This uses the enterprise folder - only available on the Docker image.","messagePattern":"Blocked user check was never set\\. This call has no effect\\.This uses the enterprise folder - only available on the Docker image\\.","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/management_endpoints/customer_endpoints.py","lineNumber":221,"sourceCode":"async def unblock_user(data: BlockUsers):\n    \"\"\"\n    [BETA] Unblock calls with this user id\n\n    Example\n    ```\n    curl -X POST \"http://0.0.0.0:8000/user/unblock\"\n    -H \"Authorization: Bearer sk-1234\"\n    -d '{\n    \"user_ids\": [<user_id>, ...]\n    }'\n    ```\n    \"\"\"\n    try:\n        from enterprise.enterprise_hooks.blocked_user_list import (\n            _ENTERPRISE_BlockedUserList,\n        )\n    except ImportError:\n        raise HTTPException(\n            status_code=400,\n            detail={\n                \"error\": \"Blocked user check was never set. This call has no effect.\"\n                + CommonProxyErrors.missing_enterprise_package_docker.value\n            },\n        )\n\n    if (\n        not any(isinstance(x, _ENTERPRISE_BlockedUserList) for x in litellm.callbacks)\n        or litellm.blocked_user_list is None\n    ):\n        raise HTTPException(\n            status_code=400,\n            detail={\"error\": \"Blocked user check was never set. This call has no effect.\"},\n        )\n\n    if isinstance(litellm.blocked_user_list, list):\n        for id in data.user_ids:","sourceCodeStart":203,"sourceCodeEnd":239,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/customer_endpoints.py#L203-L239","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"# before\npip install litellm && litellm --config config.yaml   # no enterprise folder -> unblock 400s\n\n# after\ndocker run -p 4000:4000 -v $(pwd)/config.yaml:/app/config.yaml litellm/litellm --config /app/config.yaml   # image bundles enterprise code","handlingStrategy":"validation","validationCode":"def enterprise_unblock_available() -> bool:\n    \"\"\"Only meaningful when run inside the same environment as the proxy.\"\"\"\n    try:\n        import enterprise.enterprise_hooks.blocked_user_list  # noqa: F401\n        return True\n    except ImportError:\n        return False","typeGuard":null,"tryCatchPattern":"try:\n    r = httpx.post(f\"{base}/customer/unblock\", json={\"user_ids\": ids}, headers=headers)\n    r.raise_for_status()\nexcept httpx.HTTPStatusError as e:\n    if e.response.status_code == 400 and \"enterprise\" in e.response.text:\n        raise RuntimeError(\"blocked-user API needs the LiteLLM enterprise image\") from e\n    raise","preventionTips":["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"],"tags":["litellm","enterprise","importerror","blocked-users","licensing"],"backgroundTag":"missing-optional-dependency","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}