From 23555f8fc1785018c58aea383a9dbe46bd97a30a Mon Sep 17 00:00:00 2001 From: youkwan <144937481+youkwan@users.noreply.github.com> Date: Wed, 17 Dec 2025 22:51:28 +0800 Subject: [PATCH] fix: prevent shared state between client instances --- aisuite/client.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/aisuite/client.py b/aisuite/client.py index 1c46c002..a0a1a346 100644 --- a/aisuite/client.py +++ b/aisuite/client.py @@ -21,7 +21,7 @@ class Client: def __init__( self, - provider_configs: dict = {}, + provider_configs: dict | None = None, extra_param_mode: Literal["strict", "warn", "permissive"] = "warn", ): """ @@ -47,7 +47,10 @@ def __init__( - "permissive": Allow all params without validation (testing) """ self.providers = {} - self.provider_configs = provider_configs + if provider_configs: + self.provider_configs = provider_configs + else: + self.provider_configs = {} self.extra_param_mode = extra_param_mode self.param_validator = ParamValidator(extra_param_mode) self._chat = None