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
Litellm dev 02 12 2025 p1 (#8494)
Krish Dholakia305049a96827
diff --git a/docs/my-website/docs/proxy/config_settings.md b/docs/my-website/docs/proxy/config_settings.mdindex 4a10cea7abe..83b6535f753 100644--- a/docs/my-website/docs/proxy/config_settings.md+++ b/docs/my-website/docs/proxy/config_settings.md@@ -488,12 +488,12 @@ router_settings:| SLACK_DAILY_REPORT_FREQUENCY | Frequency of daily Slack reports (e.g., daily, weekly)| SLACK_WEBHOOK_URL | Webhook URL for Slack integration| SMTP_HOST | Hostname for the SMTP server-| SMTP_PASSWORD | Password for SMTP authentication+| SMTP_PASSWORD | Password for SMTP authentication (do not set if SMTP does not require auth)| SMTP_PORT | Port number for SMTP server| SMTP_SENDER_EMAIL | Email address used as the sender in SMTP transactions| SMTP_SENDER_LOGO | Logo used in emails sent via SMTP| SMTP_TLS | Flag to enable or disable TLS for SMTP connections-| SMTP_USERNAME | Username for SMTP authentication+| SMTP_USERNAME | Username for SMTP authentication (do not set if SMTP does not require auth)| SPEND_LOGS_URL | URL for retrieving spend logs| SSL_CERTIFICATE | Path to the SSL certificate file| SSL_VERIFY | Flag to enable or disable SSL certificate verificationdiff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex ded43b9d02a..30912186e53 100644--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@ -8205,6 +8205,24 @@"litellm_provider": "perplexity","mode": "chat"},+ "perplexity/sonar": {+ "max_tokens": 127072,+ "max_input_tokens": 127072,+ "max_output_tokens": 127072,+ "input_cost_per_token": 0.000001,+ "output_cost_per_token": 0.000001,+ "litellm_provider": "perplexity",+ "mode": "chat"+ },+ "perplexity/sonar-pro": {+ "max_tokens": 200000,+ "max_input_tokens": 200000,+ "max_output_tokens": 8096,+ "input_cost_per_token": 0.000003,+ "output_cost_per_token": 0.000015,+ "litellm_provider": "perplexity",+ "mode": "chat"+ },"perplexity/pplx-7b-chat": {"max_tokens": 8192,"max_input_tokens": 8192,diff --git a/litellm/proxy/utils.py b/litellm/proxy/utils.pyindex da98c2540fd..c1b2409007a 100644--- a/litellm/proxy/utils.py+++ b/litellm/proxy/utils.py@@ -2322,12 +2322,6 @@ async def send_email(receiver_email, subject, html):if smtp_host is None:raise ValueError("Trying to use SMTP, but SMTP_HOST is not set")- if smtp_username is None:- raise ValueError("Trying to use SMTP, but SMTP_USERNAME is not set")-- if smtp_password is None:- raise ValueError("Trying to use SMTP, but SMTP_PASSWORD is not set")-# Attach the body to the emailemail_message.attach(MIMEText(html, "html"))@@ -2337,8 +2331,9 @@ async def send_email(receiver_email, subject, html):if os.getenv("SMTP_TLS", "True") != "False":server.starttls()- # Login to your email account- server.login(smtp_username, smtp_password) # type: ignore+ # Login to your email account only if smtp_username and smtp_password are provided+ if smtp_username and smtp_password:+ server.login(smtp_username, smtp_password) # type: ignore# Send the emailserver.send_message(email_message)diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.jsonindex ded43b9d02a..30912186e53 100644--- a/model_prices_and_context_window.json+++ b/model_prices_and_context_window.json@@ -8205,6 +8205,24 @@"litellm_provider": "perplexity","mode": "chat"},+ "perplexity/sonar": {+ "max_tokens": 127072,+ "max_input_tokens": 127072,+ "max_output_tokens": 127072,+ "input_cost_per_token": 0.000001,+ "output_cost_per_token": 0.000001,+ "litellm_provider": "perplexity",+ "mode": "chat"+ },+ "perplexity/sonar-pro": {+ "max_tokens": 200000,+ "max_input_tokens": 200000,+ "max_output_tokens": 8096,+ "input_cost_per_token": 0.000003,+ "output_cost_per_token": 0.000015,+ "litellm_provider": "perplexity",+ "mode": "chat"+ },"perplexity/pplx-7b-chat": {"max_tokens": 8192,"max_input_tokens": 8192,diff --git a/tests/local_testing/test_mock_request.py b/tests/local_testing/test_mock_request.pyindex 16dc6084960..6842767d9d9 100644--- a/tests/local_testing/test_mock_request.py+++ b/tests/local_testing/test_mock_request.py@@ -175,4 +175,6 @@ def test_router_mock_request_with_mock_timeout_with_fallbacks():print(response)end_time = time.time()assert end_time - start_time >= 3, f"Time taken: {end_time - start_time}"- assert "gpt-35-turbo" in response.model, "Model should be azure gpt-35-turbo"+ assert (+ "gpt-3.5-turbo-0125" in response.model+ ), "Model should be azure gpt-3.5-turbo-0125"