BerriAI/litellm · error · HTTPException
Key is not in a team. Vector stores cannot be assigned to pe
Error message
Key is not in a team. Vector stores cannot be assigned to personal keys by non-admin callers. Disallowed vector stores: {sorted(requested)}. What it means
HTTPException(403) from validate_key_vector_stores_against_team: a non-admin caller tried to set vector_stores on a personal (no team) key. Since vector-store access is granted at use-time from this list, the assignment itself is the authorization boundary and is restricted to team keys or admin callers.
Source
Thrown at litellm/proxy/management_helpers/object_permission_utils.py:724
async def validate_key_vector_stores_against_team(
object_permission: ObjectPermissionDict | None,
team_obj: Optional["LiteLLM_TeamTableCachedObj"],
is_proxy_admin: bool = False,
) -> None:
"""
Reject vector_stores requested on a personal (no team) key by a non-admin
caller. Vector store access is granted at use-time from the key's
object_permission.vector_stores list, so the assignment is the authorization
boundary. Team keys and proxy admins are unaffected.
"""
requested: Final = _extract_requested_vector_stores(object_permission)
if not requested:
return
if team_obj is not None or is_proxy_admin:
return
raise HTTPException(
status_code=status.HTTP_403_FORBIDDEN,
detail={
"error": (
"Key is not in a team. Vector stores cannot be assigned to "
"personal keys by non-admin callers. Disallowed vector stores: "
f"{sorted(requested)}."
)
},
)
def _extract_requested_search_tools(
object_permission: ObjectPermissionDict | None,
) -> list[str]:
"""Return search_tool_name values from a key's object_permission dict."""
if not object_permission or not isinstance(object_permission, dict):
return []
raw: Final = object_permission.get("search_tools")View on GitHub (pinned to 77b7c6c40c)
Solutions
- Assign the key to a team first, remove the requested vector stores, or call as a proxy admin.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/management_helpers/object_permission_utils.py:724 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/2855453c529c1302.
Report an issue: GitHub.