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..920725131 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] @@ -41,6 +44,8 @@ class RouterConfig(BaseModel): "latency-based-routing", ] = "simple-shuffle" + class Config: + protected_namespaces = () class ModelInfo(BaseModel): id: Optional[ @@ -141,6 +146,7 @@ class Deployment(BaseModel): class Config: extra = "allow" + protected_namespaces = () def __contains__(self, key): # Define custom behavior for the 'in' operator diff --git a/litellm/utils.py b/litellm/utils.py index affa811f3..eee7f8202 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