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(types/router.py): remove model_info pydantic field

Krrish Dholakiacd94c3adc157
diff --git a/litellm/tests/test_router.py b/litellm/tests/test_router.py
index 715ba10d581..38f274d5646 100644
--- a/litellm/tests/test_router.py
+++ b/litellm/tests/test_router.py
@@ -20,14 +20,24 @@ from unittest.mock import AsyncMock, MagicMock, patch
import httpx
from dotenv import load_dotenv
+from pydantic import BaseModel
import litellm
from litellm import Router
from litellm.router import Deployment, LiteLLM_Params, ModelInfo
+from litellm.types.router import DeploymentTypedDict
load_dotenv()
+def test_router_deployment_typing():
+ deployment_typed_dict = DeploymentTypedDict(
+ model_name="hi", litellm_params={"model": "hello-world"}
+ )
+ for value in deployment_typed_dict.items():
+ assert not isinstance(value, BaseModel)
+
+
def test_router_multi_org_list():
"""
Pass list of orgs in 1 model definition,
diff --git a/litellm/types/router.py b/litellm/types/router.py
index bb6d0d809b0..dda6968f098 100644
--- a/litellm/types/router.py
+++ b/litellm/types/router.py
@@ -335,7 +335,6 @@ class LiteLLMParamsTypedDict(TypedDict, total=False):
class DeploymentTypedDict(TypedDict):
model_name: str
litellm_params: LiteLLMParamsTypedDict
- model_info: ModelInfo
SPECIAL_MODEL_INFO_PARAMS = [