mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
[Fix] Tag Based Routing not work with wildcard routing (#5805)
* allow using tag routing for free * only enforce tags for teams / keys
This commit is contained in:
parent
4445bfb9d7
commit
ba247d0104
3 changed files with 21 additions and 9 deletions
|
@ -207,6 +207,13 @@ async def generate_key_fn(
|
|||
|
||||
# Set tags on the new key
|
||||
if "tags" in data_json:
|
||||
from litellm.proxy.proxy_server import premium_user
|
||||
|
||||
if premium_user is not True:
|
||||
raise ValueError(
|
||||
f"Only premium users can add tags to teams. {CommonProxyErrors.not_premium_user.value}"
|
||||
)
|
||||
|
||||
if data_json["metadata"] is None:
|
||||
data_json["metadata"] = {"tags": data_json["tags"]}
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue