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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
caching use file_checksum
Ishaan Jaff467c506e3388
diff --git a/litellm/caching.py b/litellm/caching.pyindex 6ed6eb9fdbb..e23bd5bfc72 100644--- a/litellm/caching.py+++ b/litellm/caching.py@@ -10,6 +10,7 @@import astimport asyncioimport hashlib+import ioimport jsonimport loggingimport time@@ -1889,8 +1890,10 @@ class Cache:metadata = kwargs.get("metadata", {})litellm_params = kwargs.get("litellm_params", {})+ # get checksum of file contentparam_value = (- getattr(file, "name", None)+ metadata.get("file_checksum")+ or getattr(file, "name", None)or metadata.get("file_name")or litellm_params.get("file_name"))