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
Merge pull request #37623 from BerriAI/litellm_lit_5875_anthropic_prompt_cache_key
Mateo Wang80d878f8db58
diff --cc litellm/llms/anthropic/experimental_pass_through/adapters/transformation.pyindex c6bfdb79002,974a3b4bb73..34c2d837127--- a/litellm/llms/anthropic/experimental_pass_through/adapters/transformation.py+++ b/litellm/llms/anthropic/experimental_pass_through/adapters/transformation.py@@@ -2,10 -2,12 +2,12 @@@ import copimport hashlibimport jsonfrom collections.abc import AsyncIterator, Iterator, Mapping-from typing import TYPE_CHECKING, Any, Final, Literal, cast+from typing import TYPE_CHECKING, Any, Final, Literal, TypeVar, cast+ import litellmfrom litellm.llms.anthropic.experimental_pass_through.utils import (is_reasoning_auto_summary_enabled,+ prompt_cache_key_from_user_id,)# OpenAI has a 64-character limit for function/tool names