BerriAI/litellm · error · HTTPException
Agent '{agent_name}' is not allowed for your key/team. Conta
Error message
Agent '{agent_name}' is not allowed for your key/team. Contact proxy admin for access. What it means
Raised in A2A routing when the agent was found in the registry and the caller is not a proxy admin (admins bypass the permission check), and the key/team-level agent access check denied the request. Distinct from the registry-miss case just above it (which raises ProxyModelNotFoundError): here the agent exists, the caller just lacks permission, so the request fails with a 403-class error.
Source
Thrown at litellm/proxy/agent_endpoints/a2a_routing.py:64
# Look up agent in registry
agent: Final = global_agent_registry.get_agent_by_name(agent_name)
if agent is None:
verbose_proxy_logger.error("[A2A] Agent '%s' not found in registry", agent_name)
route_name = ROUTE_ENDPOINT_MAPPING.get(route_type, route_type)
raise ProxyModelNotFoundError(route=route_name, model_name=model_name)
# Verify the caller is permitted to use this agent (admins bypass the check)
is_admin: Final = user_api_key_dict is not None and (
user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN
or user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN.value
)
if not is_admin:
is_allowed: Final = await AgentRequestHandler.is_agent_allowed(
agent_id=agent.agent_id,
user_api_key_auth=user_api_key_dict,
)
if not is_allowed:
raise HTTPException(
status_code=403,
detail=f"Agent '{agent_name}' is not allowed for your key/team. Contact proxy admin for access.",
)
# Get API base URL from agent config
if not agent.agent_card_params or "url" not in agent.agent_card_params:
verbose_proxy_logger.error("[A2A] Agent '%s' has no URL configured", agent_name)
route_name = ROUTE_ENDPOINT_MAPPING.get(route_type, route_type)
raise ProxyModelNotFoundError(route=route_name, model_name=model_name)
# Inject API base and route to litellm
data["api_base"] = agent.agent_card_params["url"]
verbose_proxy_logger.debug("[A2A] Routing %s to %s", model_name, data["api_base"])
return getattr(litellm, f"{route_type}")(**data)
View on GitHub (pinned to 77b7c6c40c)
Solutions
- Ask the proxy admin to grant your key/team access to this agent.
Example fix
Contact admin for agent access.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/agent_endpoints/a2a_routing.py:64 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/8186aa362eda5077.
Report an issue: GitHub.