Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

Update documentation for enable_caching_on_provider_specific_optional_params (#15885)

Sameer Kankuteb9585b1db54b
diff --git a/docs/my-website/docs/proxy/caching.md b/docs/my-website/docs/proxy/caching.md
index 9cfd796d90f..6da977c8b05 100644
--- a/docs/my-website/docs/proxy/caching.md
+++ b/docs/my-website/docs/proxy/caching.md
@@ -1018,6 +1018,21 @@ cache_params:
```
+## Provider-Specific Optional Parameters Caching
+
+By default, LiteLLM only includes standard OpenAI parameters in cache keys. However, some providers (like Vertex AI) use additional parameters that affect the output but aren't included in the standard cache key generation.
+
+### Enable Provider-Specific Parameter Caching
+
+Add this setting to your `config.yaml` to include provider-specific optional parameters in cache keys:
+
+```yaml
+litellm_settings:
+ cache: True
+ cache_params:
+ type: "redis"
+ enable_caching_on_provider_specific_optional_params: True # Include provider-specific params in cache keys
+```
## Advanced - user api key cache ttl
Configure how long the in-memory cache stores the key object (prevents db requests)
diff --git a/proxy_server_config.yaml b/proxy_server_config.yaml
index 8f125ac0390..86dd4f6002e 100644
--- a/proxy_server_config.yaml
+++ b/proxy_server_config.yaml
@@ -169,6 +169,7 @@ litellm_settings:
langfuse_secret: os.environ/LANGFUSE_PROJECT2_SECRET # Project 2
langfuse_host: https://us.cloud.langfuse.com
# cache: true # [OPTIONAL] use for caching responses
+ # enable_caching_on_provider_specific_optional_params: True # Include provider-specific params in cache keys
# cache_params: # And for shared health check
# type: redis
# host: localhost