fix(types/router.py): remove model_info pydantic field
Fixes https://github.com/BerriAI/litellm/issues/5042
This commit is contained in:
parent
8fa39b058d
commit
cd94c3adc1
@ -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,
|
||||
|
||||
@ -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 = [
|
||||
|
||||
Loading…
Reference in New Issue
Block a user