diff --git a/enterprise/enterprise_hooks/secret_detection.py b/enterprise/enterprise_hooks/secret_detection.py index befacc07b8..2289858bd5 100644 --- a/enterprise/enterprise_hooks/secret_detection.py +++ b/enterprise/enterprise_hooks/secret_detection.py @@ -32,6 +32,7 @@ from litellm._logging import verbose_proxy_logger litellm.set_verbose = True +GUARDRAIL_NAME = "hide_secrets" _custom_plugins_path = "file://" + os.path.join( os.path.dirname(os.path.abspath(__file__)), "secrets_plugins" @@ -466,8 +467,8 @@ class _ENTERPRISE_SecretDetection(CustomLogger): async def should_run_check(self, user_api_key_dict: UserAPIKeyAuth) -> bool: if user_api_key_dict.permissions is not None: - if "secret_detection" in user_api_key_dict.permissions: - if user_api_key_dict.permissions["secret_detection"] is False: + if GUARDRAIL_NAME in user_api_key_dict.permissions: + if user_api_key_dict.permissions[GUARDRAIL_NAME] is False: return False return True