BerriAI/litellm · error · HTTPException
Only proxy admins can create, update, or delete agents. Your
Error message
Only proxy admins can create, update, or delete agents. Your role={user_api_key_dict.user_role} What it means
Raised by _check_agent_management_permission when a caller attempts the agent create/update/delete endpoints with any role other than PROXY_ADMIN. Agent definitions can rewrite routing and credentials, so writes are admin-only by design; the caller's actual role is embedded in the message. Read-only endpoints are unaffected.
Source
Thrown at litellm/proxy/agent_endpoints/endpoints.py:162
copy.keys = None
if copy.litellm_params:
copy.litellm_params = _get_masked_values(
copy.litellm_params,
unmasked_length=4,
number_of_asterisks=4,
)
redacted.append(copy)
return redacted
def _check_agent_management_permission(user_api_key_dict: UserAPIKeyAuth) -> None:
"""
Raises HTTP 403 if the caller does not have permission to create, update,
or delete agents. Only PROXY_ADMIN users are allowed to perform these
write operations.
"""
if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN:
raise HTTPException(
status_code=403,
detail={
"error": f"Only proxy admins can create, update, or delete agents. Your role={user_api_key_dict.user_role}"
},
)
AGENT_HEALTH_CHECK_TIMEOUT_SECONDS: Final = float(os.environ.get("LITELLM_AGENT_HEALTH_CHECK_TIMEOUT", "5.0"))
AGENT_HEALTH_CHECK_GATHER_TIMEOUT_SECONDS = float(os.environ.get("LITELLM_AGENT_HEALTH_CHECK_GATHER_TIMEOUT", "30.0"))
class _AgentHealthResult(TypedDict, total=False):
agent_id: Required[str]
healthy: Required[bool]
error: str
async def _check_agent_url_health(View on GitHub (pinned to 77b7c6c40c)
Solutions
- Use a key with the PROXY_ADMIN role to manage agents.
Example fix
Retry with an admin key.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/agent_endpoints/endpoints.py:162 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/9d4eeb208b145b17.
Report an issue: GitHub.