mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
fix(key_management_endpoints.py): allow master key rotations for OSS users
Closes https://github.com/BerriAI/litellm/issues/11210
This commit is contained in:
parent
8fb2779c9e
commit
077b69eafa
1 changed files with 5 additions and 1 deletions
|
|
@ -1862,7 +1862,11 @@ async def regenerate_key_fn(
|
|||
user_api_key_cache,
|
||||
)
|
||||
|
||||
if premium_user is not True:
|
||||
is_master_key_regeneration = data and data.new_master_key is not None
|
||||
|
||||
if (
|
||||
premium_user is not True and not is_master_key_regeneration
|
||||
): # allow master key regeneration for non-premium users
|
||||
raise ValueError(
|
||||
f"Regenerating Virtual Keys is an Enterprise feature, {CommonProxyErrors.not_premium_user.value}"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue