diff --git a/litellm/proxy/litellm_pre_call_utils.py b/litellm/proxy/litellm_pre_call_utils.py index 83a38036452..56f647d5acc 100644 --- a/litellm/proxy/litellm_pre_call_utils.py +++ b/litellm/proxy/litellm_pre_call_utils.py @@ -1604,13 +1604,6 @@ class LiteLLMProxyRequestSetup: @staticmethod def get_logged_api_key(user_api_key_dict: UserAPIKeyAuth) -> str | None: - """ - The value spend rows and logging callbacks attribute a request to. - - A CLI session token is a per-login random secret, so the key is the - session's stable alias (cli-session-) instead: every login of - one user rolls up to one key and the live token never lands in a row. - """ if user_api_key_dict.is_session_token and user_api_key_dict.key_alias: return user_api_key_dict.key_alias return user_api_key_dict.api_key diff --git a/litellm/proxy/spend_tracking/key_metadata_recovery.py b/litellm/proxy/spend_tracking/key_metadata_recovery.py index acf076ed8d9..2dfeb4678d7 100644 --- a/litellm/proxy/spend_tracking/key_metadata_recovery.py +++ b/litellm/proxy/spend_tracking/key_metadata_recovery.py @@ -219,11 +219,6 @@ async def attach_user_details( prisma_client: PrismaClient, recovered: Mapping[str, KeyMetadataDict], ) -> Mapping[str, KeyMetadataDict]: - """ - Fill user_email from the owner's user row, and for a cli-session key also - the team the CLI login attaches on its own: the user's only team. A user in - several teams picks one per login, so the alias claims none for them. - """ needing_details: Final = frozenset( user_id for api_key, meta in recovered.items()