diff --git a/litellm/types/completion.py b/litellm/types/completion.py index 5eac90575..5302d16b9 100644 --- a/litellm/types/completion.py +++ b/litellm/types/completion.py @@ -32,5 +32,5 @@ class CompletionRequest(BaseModel): model_list: Optional[List[str]] = None class Config: - # allow kwargs extra = "allow" + protected_namespaces = () \ No newline at end of file diff --git a/litellm/types/router.py b/litellm/types/router.py index dc29bb949..16f7413d2 100644 --- a/litellm/types/router.py +++ b/litellm/types/router.py @@ -41,6 +41,8 @@ class RouterConfig(BaseModel): "latency-based-routing", ] = "simple-shuffle" + class Config: + protected_namespaces = () class ModelInfo(BaseModel): id: Optional[ @@ -141,7 +143,8 @@ class Deployment(BaseModel): class Config: extra = "allow" - + protected_namespaces = () + def __contains__(self, key): # Define custom behavior for the 'in' operator return hasattr(self, key) diff --git a/litellm/utils.py b/litellm/utils.py index 6a58d56db..4bf877b0d 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -236,6 +236,7 @@ class HiddenParams(OpenAIObject): class Config: extra = "allow" + protected_namespaces = () def get(self, key, default=None): # Custom .get() method to access attributes with a default value if the attribute doesn't exist