feat(team_endpoints): Add query parameter key_limit to /team/info

This commit is contained in:
Tomoya Tabuchi 2026-06-09 15:52:20 +09:00
parent aaf1e2444b
commit 807965c103
No known key found for this signature in database
GPG key ID: 5E5625FAC733CAF4
2 changed files with 5 additions and 0 deletions

View file

@ -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:

View file

@ -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},
)