BerriAI/litellm · error · HTTPException
Access group '{update_data.get('access_group_name', '')}' al
Error message
Access group '{update_data.get('access_group_name', '')}' already exists What it means
Error "Access group '{update_data.get('access_group_name', '')}' already exists" thrown in BerriAI/litellm.
Source
Thrown at litellm/proxy/management_endpoints/access_group_endpoints.py:495
teams_to_remove = list(old_team_ids - new_team_ids)
keys_to_add = list(new_key_ids - old_key_ids)
keys_to_remove = list(old_key_ids - new_key_ids)
record: Final = await tx.litellm_accessgrouptable.update(
where={"access_group_id": access_group_id},
data=update_data,
)
await _sync_add_access_group_to_teams(tx, teams_to_add, access_group_id)
await _sync_remove_access_group_from_teams(tx, teams_to_remove, access_group_id)
await _sync_add_access_group_to_keys(tx, keys_to_add, access_group_id)
await _sync_remove_access_group_from_keys(tx, keys_to_remove, access_group_id)
except HTTPException:
raise
except Exception as e:
# Unique constraint violation (e.g. access_group_name already exists).
if "unique constraint" in str(e).lower() or "P2002" in str(e):
raise HTTPException(
status_code=status.HTTP_409_CONFLICT,
detail=f"Access group '{update_data.get('access_group_name', '')}' already exists",
)
raise
from litellm.proxy.proxy_server import proxy_logging_obj, user_api_key_cache
await _cache_access_group_record(record)
await _patch_team_caches_add_access_group(teams_to_add, access_group_id, user_api_key_cache, proxy_logging_obj)
await _patch_team_caches_remove_access_group(
teams_to_remove, access_group_id, user_api_key_cache, proxy_logging_obj
)
await _patch_key_caches_add_access_group(keys_to_add, access_group_id, user_api_key_cache, proxy_logging_obj)
await _patch_key_caches_remove_access_group(keys_to_remove, access_group_id, user_api_key_cache, proxy_logging_obj)
return _record_to_response(record)
View on GitHub (pinned to 77b7c6c40c)
Solutions
- Choose a different access_group_name for the update.
- Leave the name unchanged if renaming is not needed.
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/access_group_endpoints.py:495 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/11e81fdaba103e76.
Report an issue: GitHub.