BerriAI/litellm · error · Exception

Project={project_object.project_id} is blocked. Update via `

Error message

Project={project_object.project_id} is blocked. Update via `/project/update` if you're an admin.

What it means

Raised in _run_project_checks during the proxy auth pre-call pipeline when the request's key resolves to a LiteLLM project whose row has blocked=True. Blocking a project is an admin action used to freeze spend or disable a workspace; the message points admins at /project/update to reverse it. The exception aborts the request before any model call.

Source

Thrown at litellm/proxy/auth/auth_checks.py:484

async def _run_project_checks(
    project_object: LiteLLM_ProjectTableCachedObj | None,
    _model: str | list[str] | None,
    llm_router: Router | None,
    skip_budget_checks: bool,
    valid_token: UserAPIKeyAuth | None,
    proxy_logging_obj: ProxyLogging,
) -> None:
    """
    Run all project-level checks: blocked, model access, budget, soft budget.
    Extracted from common_checks() to keep statement count manageable.
    """
    if project_object is None:
        return

    # 1.1. If project is blocked
    if project_object.blocked is True:
        raise Exception(
            f"Project={project_object.project_id} is blocked. Update via `/project/update` if you're an admin."
        )

    # 2.2 If project can call model
    if _model and len(project_object.models) > 0:
        can_project_access_model(
            model=_model,
            project_object=project_object,
            llm_router=llm_router,
        )

    if not skip_budget_checks:
        # 3.0.2. If project is in budget
        await _project_max_budget_check(
            project_object=project_object,
            valid_token=valid_token,
            proxy_logging_obj=proxy_logging_obj,
        )

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Ask a proxy admin to unblock: POST /project/update with the project_id
  2. Switch the client to a key bound to a different, unblocked project
  3. If you are the operator, check the key's project via /key/info to confirm which project is blocking

Example fix

# admin unblocks the project
curl -X POST http://localhost:4000/project/update \
  -H "Authorization: Bearer sk-admin" \
  -d '{"project_id": "my-project", "blocked": false}'
Defensive patterns

Strategy: try-catch

Try / catch

try:
    resp = client.chat.completions.create(model="gpt-4o", messages=messages)
except Exception as e:
    if "is blocked" in str(e) and "project" in str(e):
        raise RuntimeError("project disabled by admin - switch keys") from e
    raise

Prevention

When it happens

Trigger: Any authenticated LLM or spend-incurring route called with a virtual key bound to a project_id whose project row was set blocked=true via the admin API/UI.

Common situations: An org admin blocks a project for policy or budget reasons while CI jobs or apps still run on its keys; a test project is disabled after a POC and old keys keep hitting it.

Related errors


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/9468359b02983cf1. Report an issue: GitHub.