Skip to content

Commit

Permalink
fix premium user check for tags on keys (#5826)
Browse files Browse the repository at this point in the history
  • Loading branch information
ishaan-jaff committed Sep 21, 2024
1 parent d100b32 commit 39e872c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ async def generate_key_fn(
if "tags" in data_json:
from litellm.proxy.proxy_server import premium_user

if premium_user is not True:
if premium_user is not True and data_json["tags"] is not None:
raise ValueError(
f"Only premium users can add tags to teams. {CommonProxyErrors.not_premium_user.value}"
f"Only premium users can add tags to keys. {CommonProxyErrors.not_premium_user.value}"
)

if data_json["metadata"] is None:
Expand Down

0 comments on commit 39e872c

Please sign in to comment.