Proxy: include customer budget in responses (#5977)

This commit is contained in:
kvadros 2024-10-07 08:35:28 +04:00 committed by GitHub
parent b2fbee3923
commit e007bb65b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6029,7 +6029,8 @@ async def end_user_info(
)
user_info = await prisma_client.db.litellm_endusertable.find_first(
where={"user_id": end_user_id}
where={"user_id": end_user_id},
include={"litellm_budget_table": True}
)
if user_info is None:
@ -6271,7 +6272,9 @@ async def list_team(
detail={"error": CommonProxyErrors.db_not_connected_error.value},
)
response = await prisma_client.db.litellm_endusertable.find_many()
response = await prisma_client.db.litellm_endusertable.find_many(
include={"litellm_budget_table": True}
)
returned_response: List[LiteLLM_EndUserTable] = []
for item in response: