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 branch 'litellm_internal_staging' of https://github.com/BerriAI/litellm into litellm_decrease_anys_fable_round3
mateo-berri19b5381e6399
diff --cc basedpyright-code-budget.jsonindex ef85dc83de0,a7ec31f2ffd..1ce71c5bd2c--- a/basedpyright-code-budget.json+++ b/basedpyright-code-budget.json@@@ -1,12 -1,12 +1,12 @@@{"reportAny": {- "limit": 20751- "limit": 22343++ "limit": 19955},"reportArgumentType": {- "limit": 2570- "limit": 2578++ "limit": 2566},"reportAssignmentType": {- "limit": 321- "limit": 323++ "limit": 320},"reportAttributeAccessIssue": {"limit": 488@@@ -24,7 -24,7 +24,7 @@@"limit": 19},"reportExplicitAny": {- "limit": 6363- "limit": 6991++ "limit": 6049},"reportFunctionMemberAccess": {"limit": 7@@@ -54,10 -54,10 +54,10 @@@"limit": 0},"reportMissingParameterType": {- "limit": 5669- "limit": 5681++ "limit": 5663},"reportMissingTypeArgument": {- "limit": 15573- "limit": 15605++ "limit": 15557},"reportMissingTypeStubs": {"limit": 40@@@ -99,19 -99,19 +99,19 @@@"limit": 0},"reportUnknownArgumentType": {- "limit": 44673- "limit": 44709++ "limit": 44655},"reportUnknownLambdaType": {- "limit": 110- "limit": 112++ "limit": 109},"reportUnknownMemberType": {- "limit": 39080- "limit": 39154++ "limit": 39043},"reportUnknownParameterType": {- "limit": 19906- "limit": 19944++ "limit": 19887},"reportUnknownVariableType": {- "limit": 30640- "limit": 30772++ "limit": 30574},"reportUnnecessaryCast": {"limit": 117@@@ -123,7 -123,7 +123,7 @@@"limit": 5},"reportUnnecessaryIsInstance": {- "limit": 841- "limit": 851++ "limit": 836},"reportUntypedBaseClass": {"limit": 0diff --cc litellm/proxy/guardrails/guardrail_registry.pyindex 8c2151842e7,f6d348c1045..d29ec555a80--- a/litellm/proxy/guardrails/guardrail_registry.py+++ b/litellm/proxy/guardrails/guardrail_registry.py@@@ -1,13 -1,14 +1,14 @@@# litellm/proxy/guardrails/guardrail_registry.py+ import asyncioimport importlibimport os-from collections.abc import Callable, Iterator, Mapping+from collections.abc import Callable, Iterator, Mapping, Sequencefrom datetime import datetime, timezonefrom itertools import chain, count-from typing import Any, Final, Literal, Optional, Protocol, cast+from typing import Final, Literal, Optional, Protocol, cast-from pydantic import ValidationError+from pydantic import BaseModel, ValidationErrorimport litellmfrom litellm import Routerdiff --cc ruff-strict-budget.jsonindex e1f14a453c4,096e039b8aa..dadbf33cbfe--- a/ruff-strict-budget.json+++ b/ruff-strict-budget.json@@@ -1,6 -1,6 +1,6 @@@{"ANN001": {- "limit": 3014- "limit": 3026++ "limit": 3020},"ANN002": {"limit": 71@@@ -12,19 -12,19 +12,19 @@@"limit": 2017},"ANN202": {- "limit": 851- "limit": 854++ "limit": 852},"ANN204": {"limit": 711},"ANN205": {- "limit": 112- "limit": 114++ "limit": 113},"ANN206": {"limit": 133},"ANN401": {- "limit": 1086- "limit": 1290++ "limit": 1188},"ASYNC230": {"limit": 11@@@ -234,7 -234,7 +234,7 @@@"limit": 5},"TID251": {- "limit": 1208- "limit": 1216++ "limit": 1212},"TRY002": {"limit": 524diff --cc type-discipline-budget.jsonindex 411ff624af2,e7cfff93aa4..6f77a621a9e--- a/type-discipline-budget.json+++ b/type-discipline-budget.json@@@ -1,9 -1,9 +1,9 @@@{"LIT001": {- "limit": 22728- "limit": 22892++ "limit": 22809},"LIT002": {- "limit": 26872- "limit": 26886++ "limit": 26878},"LIT003": {"limit": 269@@@ -15,7 -15,7 +15,7 @@@"limit": 0},"LIT006": {- "limit": 1067- "limit": 1071++ "limit": 1069},"LIT007": {"limit": 0@@@ -27,10 -27,10 +27,10 @@@"limit": 0},"LIT010": {- "limit": 16692- "limit": 16699++ "limit": 16695},"LIT011": {- "limit": 5586- "limit": 5590++ "limit": 5588},"LIT012": {"limit": 4519