From 5554e2c3599b628df5a7a04598af9901119ec3b8 Mon Sep 17 00:00:00 2001 From: unclecode Date: Mon, 8 Apr 2024 12:49:40 +0800 Subject: [PATCH] Continue fixing the issue #2832: Add protected_namespaces to another to Config class within the router.py --- litellm/types/router.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/litellm/types/router.py b/litellm/types/router.py index 16f7413d223..920725131a0 100644 --- a/litellm/types/router.py +++ b/litellm/types/router.py @@ -12,6 +12,9 @@ class ModelConfig(BaseModel): tpm: int rpm: int + class Config: + protected_namespaces = () + class RouterConfig(BaseModel): model_list: List[ModelConfig] @@ -144,7 +147,7 @@ class Deployment(BaseModel): class Config: extra = "allow" protected_namespaces = () - + def __contains__(self, key): # Define custom behavior for the 'in' operator return hasattr(self, key)