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]

fix: update success-event handler to track tokens for deployment-default limits

Ephrim Stanley48cb4a83435f
diff --git a/litellm/proxy/hooks/parallel_request_limiter.py b/litellm/proxy/hooks/parallel_request_limiter.py
index 6e34c3eee13..b0046fd035b 100644
--- a/litellm/proxy/hooks/parallel_request_limiter.py
+++ b/litellm/proxy/hooks/parallel_request_limiter.py
@@ -14,6 +14,8 @@ from litellm.integrations.custom_logger import CustomLogger
from litellm.litellm_core_utils.core_helpers import _get_parent_otel_span_from_kwargs
from litellm.proxy._types import CommonProxyErrors, CurrentItemRateLimit, UserAPIKeyAuth
from litellm.proxy.auth.auth_utils import (
+ _get_deployment_default_rpm_limit,
+ _get_deployment_default_tpm_limit,
get_key_model_rpm_limit,
get_key_model_tpm_limit,
)
@@ -546,6 +548,8 @@ class _PROXY_MaxParallelRequestsHandler(CustomLogger):
"model_rpm_limit" in user_api_key_metadata
or "model_tpm_limit" in user_api_key_metadata
or user_api_key_model_max_budget is not None
+ or _get_deployment_default_tpm_limit(model_group) is not None
+ or _get_deployment_default_rpm_limit(model_group) is not None
)
):
request_count_api_key = (