feat - enforce enforced_params as a premium feature

This commit is contained in:
Ishaan Jaff 2024-06-06 09:03:31 -07:00
parent d827557b82
commit aaf35c7966
2 changed files with 21 additions and 0 deletions

View file

@ -2863,6 +2863,16 @@ class ProxyConfig:
)
health_check_interval = general_settings.get("health_check_interval", 300)
## check if user has set a premium feature in general_settings
if (
general_settings.get("enforced_params") is not None
and premium_user is not True
):
raise ValueError(
"Trying to use `enforced_params`"
+ CommonProxyErrors.not_premium_user.value
)
router_params: dict = {
"cache_responses": litellm.cache
!= None, # cache if user passed in cache values