refactor(spend): drop explanatory docstrings on get_logged_api_key and attach_user_details
Some checks failed
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
LiteLLM Rust / rust-wheel (push) Has been cancelled
Terraform Modules / fmt, validate, test (aws) (push) Has been cancelled
Terraform Modules / fmt, validate, test (gcp) (push) Has been cancelled
Terraform Provider / gofmt, vet, build, test (push) Has been cancelled
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Has been cancelled

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
mateo 2026-09-25 00:48:16 +00:00
parent c452c74be7
commit 748518dcc2
2 changed files with 0 additions and 12 deletions

View file

@ -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-<user_id>) 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

View file

@ -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()