From 8f140cb5eea3286f2919f6895ca5445172df96ec Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Mon, 10 Jun 2024 16:42:19 -0700 Subject: [PATCH] fix(utils.py): make sure redis caching works with aws kms encryption --- litellm/proxy/_super_secret_config.yaml | 3 ++- litellm/utils.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/_super_secret_config.yaml b/litellm/proxy/_super_secret_config.yaml index e82e0252b..450d77b0a 100644 --- a/litellm/proxy/_super_secret_config.yaml +++ b/litellm/proxy/_super_secret_config.yaml @@ -56,10 +56,11 @@ router_settings: litellm_settings: success_callback: ["langfuse"] + cache: True general_settings: alerting: ["email"] key_management_system: "aws_kms" key_management_settings: - hosted_keys: ["LITELLM_MASTER_KEY", "DATABASE_URL"] + hosted_keys: ["LITELLM_MASTER_KEY", "DATABASE_URL", "REDIS_SSL_URL", "REDIS_HOST", "REDIS_PORT", "REDIS_PASSWORD"] diff --git a/litellm/utils.py b/litellm/utils.py index 895ef617a..5794df74f 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -10263,6 +10263,8 @@ def get_secret( # Extract and decode the plaintext plaintext = response["Plaintext"] secret = plaintext.decode("utf-8") + if isinstance(secret, str): + secret = secret.strip() elif key_manager == KeyManagementSystem.AWS_SECRET_MANAGER.value: try: get_secret_value_response = client.get_secret_value(