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
fix: restore tolerant auth attribute access in compact summary checks
mateo-berri08ae8648e0b5
diff --git a/basedpyright-code-budget.json b/basedpyright-code-budget.jsonindex e85e3701539..521b4315e6e 100644--- a/basedpyright-code-budget.json+++ b/basedpyright-code-budget.json@@ -1,6 +1,6 @@{"reportAny": {- "limit": 22941+ "limit": 22947},"reportArgumentType": {"limit": 2579diff --git a/litellm/llms/anthropic/experimental_pass_through/context_management/editors/compact.py b/litellm/llms/anthropic/experimental_pass_through/context_management/editors/compact.pyindex 34d981e2e55..a7c462a8fb0 100644--- a/litellm/llms/anthropic/experimental_pass_through/context_management/editors/compact.py+++ b/litellm/llms/anthropic/experimental_pass_through/context_management/editors/compact.py@@ -158,11 +158,11 @@ async def _check_summary_model_access(return Truekey_models: Final = list(getattr(user_api_key_auth, "models", None) or [])- team_id: Final = user_api_key_auth.team_id+ team_id: Final = getattr(user_api_key_auth, "team_id", None)team_model_aliases: Final = getattr(user_api_key_auth, "team_model_aliases", None)team_models: Final = list(getattr(user_api_key_auth, "team_models", None) or [])- user_id: Final = user_api_key_auth.user_id- project_id: Final = user_api_key_auth.project_id+ user_id: Final = getattr(user_api_key_auth, "user_id", None)+ project_id: Final = getattr(user_api_key_auth, "project_id", None)checks: Final[tuple[tuple[Literal["key", "team"], list[str]], ...]] = (("key", key_models),@@ -348,7 +348,7 @@ async def _check_summary_model_budget(return Falseend_user_model_max_budget: Final = getattr(user_api_key_auth, "end_user_model_max_budget", None)- end_user_id: Final = user_api_key_auth.end_user_id+ end_user_id: Final = getattr(user_api_key_auth, "end_user_id", None)if isinstance(end_user_model_max_budget, dict) and end_user_model_max_budget and end_user_id is not None:try:await model_max_budget_limiter.is_end_user_within_model_budget(