forked from phoenix/litellm-mirror
feat - enforce enforced_params as a premium feature
This commit is contained in:
parent
d827557b82
commit
aaf35c7966
2 changed files with 21 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue