BerriAI/litellm · error · HTTPException
A toolset with that name already exists.
Error message
A toolset with that name already exists.
What it means
Uniqueness guard on toolset update: the DB raised UniqueViolationError because the new toolset_name collides with an existing toolset; converted to HTTP 409. The message is generic when the payload carries no toolset_name.
Source
Thrown at litellm/proxy/management_endpoints/mcp_management_endpoints.py:2931
):
prisma_client: Final = get_prisma_client_or_throw("Database not connected. Connect a database to your proxy")
if LitellmUserRoles.PROXY_ADMIN != user_api_key_dict.user_role:
raise HTTPException(
status_code=status.HTTP_403_FORBIDDEN,
detail={"error": "Only proxy admins can update MCP toolsets."},
)
touched_by: Final = (
get_audit_log_changed_by(
litellm_changed_by=litellm_changed_by,
user_api_key_dict=user_api_key_dict,
litellm_proxy_admin_name=LITELLM_PROXY_ADMIN_NAME,
)
or LITELLM_PROXY_ADMIN_NAME
)
try:
result: Final = await update_mcp_toolset(prisma_client, payload, touched_by)
except UniqueViolationError:
raise HTTPException(
status_code=status.HTTP_409_CONFLICT,
detail={
"error": (
f"A toolset named '{payload.toolset_name}' already exists."
if payload.toolset_name
else "A toolset with that name already exists."
)
},
)
if result is None:
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
detail={"error": f"Toolset '{payload.toolset_id}' not found."},
)
from litellm.proxy._experimental.mcp_server.mcp_server_manager import (
global_mcp_server_manager,
)
View on GitHub (pinned to 77b7c6c40c)
Solutions
- Choose a different toolset name, or update the existing toolset.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/mcp_management_endpoints.py:2931 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/e88446136f92100e.
Report an issue: GitHub.