From 807965c103b5cc40e22dd7d5d2ab924ec7ccc2a2 Mon Sep 17 00:00:00 2001 From: Tomoya Tabuchi Date: Tue, 9 Jun 2026 15:52:20 +0900 Subject: [PATCH] feat(team_endpoints): Add query parameter key_limit to /team/info --- litellm/proxy/management_endpoints/team_endpoints.py | 4 ++++ litellm/proxy/utils.py | 1 + 2 files changed, 5 insertions(+) diff --git a/litellm/proxy/management_endpoints/team_endpoints.py b/litellm/proxy/management_endpoints/team_endpoints.py index 7a784ee4622..22c60e0db50 100644 --- a/litellm/proxy/management_endpoints/team_endpoints.py +++ b/litellm/proxy/management_endpoints/team_endpoints.py @@ -3470,6 +3470,9 @@ async def team_info( team_id: str = fastapi.Query( default=None, description="Team ID in the request parameters" ), + key_limit: int = fastapi.Query( + default=None, description="Limit the number of keys returned" + ), user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), ): """ @@ -3525,6 +3528,7 @@ async def team_info( table_name="key", query_type="find_all", expires=datetime.now(), + limit=key_limit, ) if keys is None: diff --git a/litellm/proxy/utils.py b/litellm/proxy/utils.py index 5ad42b5e1be..a736555cbf4 100644 --- a/litellm/proxy/utils.py +++ b/litellm/proxy/utils.py @@ -3378,6 +3378,7 @@ class PrismaClient: r.expires = r.expires.isoformat() elif query_type == "find_all" and team_id is not None: response = await VerificationTokenRepository(self).table.find_many( + take=limit, where={"team_id": team_id}, include={"litellm_budget_table": True}, )