From 7524aa386c9368c82b56356c646d4cad94fa29dd Mon Sep 17 00:00:00 2001 From: "Jugal D. Bhatt" <55304795+jugaldb@users.noreply.github.com> Date: Tue, 5 Aug 2025 15:04:46 -0700 Subject: [PATCH] [Redis IAM] Change documentation (#13306) * change docs * addde note --- docs/my-website/docs/caching/all_caches.md | 18 +----------- docs/my-website/docs/proxy/caching.md | 33 +++------------------- 2 files changed, 5 insertions(+), 46 deletions(-) diff --git a/docs/my-website/docs/caching/all_caches.md b/docs/my-website/docs/caching/all_caches.md index 829511914fb..0548c331f80 100644 --- a/docs/my-website/docs/caching/all_caches.md +++ b/docs/my-website/docs/caching/all_caches.md @@ -61,20 +61,6 @@ pip install google-cloud-iam ```python import litellm from litellm import completion -from litellm.caching.caching import Cache - -# Using Redis Cache with GCP IAM Authentication -litellm.cache = Cache( - type="redis", - host="10.128.0.2", # Your GCP Redis IP - port=6379, - gcp_service_account="projects/-/serviceAccounts/your-sa@project.iam.gserviceaccount.com", - gcp_ssl_ca_certs="./server-ca.pem", # Path to SSL CA certificate - ssl=True, - ssl_cert_reqs=None, # For self-signed certificates - ssl_check_hostname=False, # For self-signed certificates -) - # For Redis Cluster with GCP IAM from litellm.caching.redis_cluster_cache import RedisClusterCache @@ -84,7 +70,6 @@ litellm.cache = RedisClusterCache( {"host": "10.128.0.2", "port": 11008}, ], gcp_service_account="projects/-/serviceAccounts/your-sa@project.iam.gserviceaccount.com", - gcp_ssl_ca_certs="./server-ca.pem", ssl=True, ssl_cert_reqs=None, ssl_check_hostname=False, @@ -111,8 +96,7 @@ You can also set these as environment variables: export REDIS_HOST="10.128.0.2" export REDIS_PORT="6379" export REDIS_GCP_SERVICE_ACCOUNT="projects/-/serviceAccounts/your-sa@project.iam.gserviceaccount.com" -export REDIS_GCP_SSL_CA_CERTS="./server-ca.pem" -export REDIS_SSL="True" +export REDIS_SSL="False" ``` Then simply initialize: diff --git a/docs/my-website/docs/proxy/caching.md b/docs/my-website/docs/proxy/caching.md index 95d61ede2cb..1fb7385f689 100644 --- a/docs/my-website/docs/proxy/caching.md +++ b/docs/my-website/docs/proxy/caching.md @@ -210,6 +210,10 @@ but we **don't** recommend using REDIS_URL in prod. We've noticed a performance For GCP Memorystore Redis with IAM authentication, install the required dependency: +:::info +IAM authentication for redis is only supported via GCP and only on Redis Clusters for now. +::: + ```shell pip install google-cloud-iam ``` @@ -218,25 +222,6 @@ pip install google-cloud-iam -```yaml -model_list: - - model_name: gpt-3.5-turbo - litellm_params: - model: gpt-3.5-turbo - -litellm_settings: - cache: True - cache_params: - type: redis - host: "10.128.0.2" # Your GCP Redis IP - port: 6379 - gcp_service_account: "projects/-/serviceAccounts/your-sa@project.iam.gserviceaccount.com" - gcp_ssl_ca_certs: "./server-ca.pem" # Path to SSL CA certificate - ssl: true - ssl_cert_reqs: null # For self-signed certificates - ssl_check_hostname: false # For self-signed certificates -``` - For Redis Cluster with GCP IAM: ```yaml @@ -246,7 +231,6 @@ litellm_settings: type: redis redis_startup_nodes: [{"host": "10.128.0.2", "port": 6379}, {"host": "10.128.0.2", "port": 11008}] gcp_service_account: "projects/-/serviceAccounts/your-sa@project.iam.gserviceaccount.com" - gcp_ssl_ca_certs: "./server-ca.pem" ssl: true ssl_cert_reqs: null ssl_check_hostname: false @@ -258,15 +242,6 @@ litellm_settings: You can configure GCP IAM Redis authentication in your .env: -```env -REDIS_HOST="10.128.0.2" -REDIS_PORT="6379" -REDIS_GCP_SERVICE_ACCOUNT="projects/-/serviceAccounts/your-sa@project.iam.gserviceaccount.com" -REDIS_GCP_SSL_CA_CERTS="./server-ca.pem" -REDIS_SSL="True" -REDIS_SSL_CERT_REQS="None" -REDIS_SSL_CHECK_HOSTNAME="False" -``` For Redis Cluster: