diff --git a/litellm/proxy/_new_secret_config.yaml b/litellm/proxy/_new_secret_config.yaml index afb1b7b3aa..cd49647464 100644 --- a/litellm/proxy/_new_secret_config.yaml +++ b/litellm/proxy/_new_secret_config.yaml @@ -18,4 +18,9 @@ router_settings: general_settings: enable_jwt_auth: True litellm_jwtauth: - admin_jwt_scope: "ai.admin" \ No newline at end of file + admin_jwt_scope: "ai.admin" + # team_id_jwt_field: "client_id" # 👈 CAN BE ANY FIELD + user_id_jwt_field: "sub" # 👈 CAN BE ANY FIELD + org_id_jwt_field: "org_id" # 👈 CAN BE ANY FIELD + end_user_id_jwt_field: "customer_id" # 👈 CAN BE ANY FIELD + user_id_upsert: True \ No newline at end of file diff --git a/litellm/proxy/_types.py b/litellm/proxy/_types.py index 255e37186d..220a0d5ddb 100644 --- a/litellm/proxy/_types.py +++ b/litellm/proxy/_types.py @@ -1631,7 +1631,7 @@ class LiteLLM_UserTable(LiteLLMPydanticObjectBase): class LiteLLM_UserTableFiltered(BaseModel): # done to avoid exposing sensitive data user_id: str - user_email: str + user_email: Optional[str] = None class LiteLLM_UserTableWithKeyCount(LiteLLM_UserTable): diff --git a/litellm/proxy/management_endpoints/internal_user_endpoints.py b/litellm/proxy/management_endpoints/internal_user_endpoints.py index 43d8273dee..e9be169cdc 100644 --- a/litellm/proxy/management_endpoints/internal_user_endpoints.py +++ b/litellm/proxy/management_endpoints/internal_user_endpoints.py @@ -1240,4 +1240,5 @@ async def ui_view_users( return [LiteLLM_UserTableFiltered(**user.model_dump()) for user in users] except Exception as e: + verbose_proxy_logger.exception(f"Error searching users: {str(e)}") raise HTTPException(status_code=500, detail=f"Error searching users: {str(e)}")