From 0d2a362db1dca84b636b705b45308f5c2652d462 Mon Sep 17 00:00:00 2001 From: AxelRay <110029405+axelray-dev@users.noreply.github.com> Date: Wed, 7 Oct 2026 05:27:48 +0800 Subject: [PATCH] fix: preserve token row query behavior --- litellm/proxy/management_endpoints/common_daily_activity.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/management_endpoints/common_daily_activity.py b/litellm/proxy/management_endpoints/common_daily_activity.py index d03de9f2e21..f75da7a4d3d 100644 --- a/litellm/proxy/management_endpoints/common_daily_activity.py +++ b/litellm/proxy/management_endpoints/common_daily_activity.py @@ -625,8 +625,8 @@ async def get_user_api_key_filter( api_key: str | None, ) -> list[str]: """Return the key digests that should scope a user activity query.""" - active_keys: Final[Sequence[_UserApiKeyRecord]] = await VerificationTokenRepository(prisma_client).find_by_user_id( - user_id + active_keys: Final[Sequence[_UserApiKeyRecord]] = await VerificationTokenRepository(prisma_client).table.find_many( + where={"user_id": user_id}, ) deleted_keys: Final = await _get_deleted_keys_for_user(prisma_client, user_id) user_api_keys: Final = list(