From cd94c3adc1576c2485df1665b677c1c131c4294e Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Mon, 5 Aug 2024 09:58:44 -0700 Subject: [PATCH] fix(types/router.py): remove model_info pydantic field Fixes https://github.com/BerriAI/litellm/issues/5042 --- litellm/tests/test_router.py | 10 ++++++++++ litellm/types/router.py | 1 - 2 files changed, 10 insertions(+), 1 deletion(-) 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 = [