diff --git a/autogen/agentchat/conversable_agent.py b/autogen/agentchat/conversable_agent.py index 0323be61af..5c6d693371 100644 --- a/autogen/agentchat/conversable_agent.py +++ b/autogen/agentchat/conversable_agent.py @@ -285,7 +285,7 @@ def __init__( } def _validate_name_if_api_tpye_openai(self, name: str) -> None: - if not self.llm_config or "config_list" not in self.llm_config: + if not self.llm_config or "config_list" not in self.llm_config or len(self.llm_config["config_list"]) == 0: return config_list = self.llm_config.get("config_list")