{"record":{"id":"428053f0bde62768","repo":"BerriAI/litellm","slug":"team-team-object-team-id-is-blocked-update-via","errorCode":null,"errorMessage":"Team={team_object.team_id} is blocked. Update via `/team/unblock` if you're an admin.","messagePattern":"Team=(.+?) is blocked\\. Update via `/team/unblock` if you're an admin\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"litellm/proxy/auth/auth_checks.py","lineNumber":739,"sourceCode":"    from litellm.proxy.proxy_server import prisma_client, user_api_key_cache\n\n    _model: Final[str | list[str] | None] = get_model_from_request(\n        request_data=request_body,\n        route=route,\n        request_headers=_safe_get_request_headers(request=request),\n        request_query_params=_safe_get_request_query_params(request=request),\n        llm_router=llm_router,\n        request=request,\n    )\n\n    skip_all_budget_checks: Final = skip_budget_checks or (\n        route not in BUDGET_ENFORCED_SIDE_EFFECT_ROUTES\n        and (route in MODEL_DISCOVERY_ROUTES or not RouteChecks.is_llm_api_route(route=route))\n    )\n\n    # 1. If team is blocked\n    if team_object is not None and team_object.blocked is True:\n        raise Exception(f\"Team={team_object.team_id} is blocked. Update via `/team/unblock` if you're an admin.\")\n\n    # 2. If team can call model (or key's access_group_ids grant it)\n    if _model and team_object:\n        with tracer.trace(\"litellm.proxy.auth.common_checks.can_team_access_model\"):\n            try:\n                await can_team_access_model(\n                    model=_model,\n                    team_object=team_object,\n                    llm_router=llm_router,\n                    team_model_aliases=(valid_token.team_model_aliases if valid_token else None),\n                )\n            except ProxyException as team_denial:\n                if team_denial.type != ProxyErrorTypes.team_model_access_denied:\n                    raise\n                if not await _key_access_group_grants_model(\n                    model=_model,\n                    valid_token=valid_token,\n                    team_object=team_object,","sourceCodeStart":721,"sourceCodeEnd":757,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/auth/auth_checks.py#L721-L757","documentation":"Raised in the first step of common_checks when the authenticated key resolves to a team whose row has blocked=True. Blocking a team is an admin action (spend freeze, policy); the message directs admins to /team/unblock. The exception aborts the request before model-access or budget checks run.","triggerScenarios":"Any LLM call made with a key whose team_id points at a team row with blocked=true. Note budget checks may be skipped for discovery routes, but the blocked-team check still runs for every request.","commonSituations":"A team exceeded budget and an admin blocked it while automated pipelines keep using team keys; a team was disabled during reorganization but its keys were never rotated.","solutions":["Ask a proxy admin to unblock: POST /team/unblock with the team_id","Rotate the client to a key on an active team","Verify which team the key belongs to via /key/info before escalating"],"exampleFix":"# admin unblocks the team\ncurl -X POST http://localhost:4000/team/unblock \\\n  -H \"Authorization: Bearer sk-admin\" \\\n  -d '{\"team_id\": \"my-team\"}'","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    resp = client.chat.completions.create(model=\"gpt-4o\", messages=messages)\nexcept Exception as e:\n    if \"is blocked\" in str(e) and \"Team=\" in str(e):\n        raise RuntimeError(\"team blocked by admin - rotate to an active team key\") from e\n    raise","preventionTips":["When blocking a team, disable its keys in the same operation","Automate key rotation so pipelines can move to another team quickly","Alert on repeated blocked-team errors to catch disabled workspaces"],"tags":["team","blocked","auth","admin-action","litellm-proxy"],"backgroundTag":"resource-access-blocked","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}