mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
Support deleting keys by key_alias (#7552)
* feat(key_management_endpoints.py): allow deleting keys based on key alias easier for proxy admin to delete known bad key * fix(key_management_event_hooks.py): fix linting error * docs(key_management_endpoints.py): document new key_aliases param * fix(key_management_endpoints.py): return deleted keys to user fixes return when passing key aliases
This commit is contained in:
parent
ce97e7e054
commit
34a9833b85
4 changed files with 72 additions and 26 deletions
|
@ -142,7 +142,7 @@ class KeyManagementEventHooks:
|
|||
|
||||
# Enterprise Feature - Audit Logging. Enable with litellm.store_audit_logs = True
|
||||
# we do this after the first for loop, since first for loop is for validation. we only want this inserted after validation passes
|
||||
if litellm.store_audit_logs is True:
|
||||
if litellm.store_audit_logs is True and data.keys is not None:
|
||||
# make an audit log for each team deleted
|
||||
for key in data.keys:
|
||||
key_row = await prisma_client.get_data( # type: ignore
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue