Merge pull request #2150 from BerriAI/litellm_fix_bug_litellm_verification_token_increase

[FIX] BUG where extra tokens created in litellm verification token table
This commit is contained in:
Ishaan Jaff 2024-02-23 07:44:21 -08:00 committed by GitHub
commit e049858266
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1884,6 +1884,11 @@ async def generate_key_helper_fn(
table_name="user", table_name="user",
update_key_values=update_key_values, update_key_values=update_key_values,
) )
if user_id == litellm_proxy_budget_name:
# do not create a key for litellm_proxy_budget_name
# we only need to ensure this exists in the user table
# the LiteLLM_VerificationToken table will increase in size if we don't do this check
return key_data
## CREATE KEY ## CREATE KEY
verbose_proxy_logger.debug(f"prisma_client: Creating Key={key_data}") verbose_proxy_logger.debug(f"prisma_client: Creating Key={key_data}")