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
pass cache_control in tool call
Ishaan Jaff54102a660d7c
diff --git a/litellm/llms/anthropic.py b/litellm/llms/anthropic.pyindex c9f7856e9be..19fca056bdf 100644--- a/litellm/llms/anthropic.py+++ b/litellm/llms/anthropic.py@@ -975,6 +975,8 @@ class AnthropicChatCompletion(BaseLLM):else: # assume openai tool callnew_tool = tool["function"]new_tool["input_schema"] = new_tool.pop("parameters") # rename key+ if "cache_control" in tool:+ new_tool["cache_control"] = tool["cache_control"]anthropic_tools.append(new_tool)optional_params["tools"] = anthropic_tools