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 Azure RPM calculation formula (#19513)
Emerson Gomesc8669cf8fa2e
diff --git a/litellm/utils.py b/litellm/utils.pyindex 11389dd1af9..8e5fa9f566f 100644--- a/litellm/utils.py+++ b/litellm/utils.py@@ -4720,7 +4720,7 @@ def calculate_max_parallel_requests(elif rpm is not None:return rpmelif tpm is not None:- calculated_rpm = int(tpm / 1000 / 6)+ calculated_rpm = int(tpm / 1000 * 6)if calculated_rpm == 0:calculated_rpm = 1return calculated_rpmdiff --git a/tests/local_testing/test_router_max_parallel_requests.py b/tests/local_testing/test_router_max_parallel_requests.pyindex ff5c2104c57..ab827b057e3 100644--- a/tests/local_testing/test_router_max_parallel_requests.py+++ b/tests/local_testing/test_router_max_parallel_requests.py@@ -54,7 +54,7 @@ def test_scenario(max_parallel_requests, tpm, rpm, default_max_parallel_requestselif rpm is not None:assert rpm == calculated_max_parallel_requestselif tpm is not None:- calculated_rpm = int(tpm / 1000 / 6)+ calculated_rpm = int(tpm / 1000 * 6)if calculated_rpm == 0:calculated_rpm = 1print(@@ -107,7 +107,7 @@ def test_setting_mpr_limits_per_model(elif rpm is not None:assert rpm == mpr_client._valueelif tpm is not None:- calculated_rpm = int(tpm / 1000 / 6)+ calculated_rpm = int(tpm / 1000 * 6)if calculated_rpm == 0:calculated_rpm = 1print(