mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-13 23:11:40 +00:00
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
2 changed files with 10 additions and 1 deletions
|
|
@ -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…
Add table
Reference in a new issue