From d160ae1d4661fedfb2ede92b9c663d4dedd4670c Mon Sep 17 00:00:00 2001 From: "zaina.abushaban" Date: Fri, 1 Aug 2025 11:03:04 +0300 Subject: [PATCH 1/2] elaborating error for team deployment --- aixplain/modules/mixins.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/aixplain/modules/mixins.py b/aixplain/modules/mixins.py index 27c023c7..6859d8a2 100644 --- a/aixplain/modules/mixins.py +++ b/aixplain/modules/mixins.py @@ -69,6 +69,12 @@ def deploy(self) -> None: try: if hasattr(self, "tools"): [tool.deploy() for tool in self.tools] + if hasattr(self, "agents"): + undeployed_agents = [agent for agent in self.agents if agent.status != AssetStatus.ONBOARDED] + if undeployed_agents: + names = ", ".join(str(agent) for agent in undeployed_agents) + raise ValueError(f"The following agents are not deployed: {names}") + self.status = AssetStatus.ONBOARDED self.update() except Exception as e: From 93cf633bf46d4210530b5a425cd7d0b3977e2ef7 Mon Sep 17 00:00:00 2001 From: "zaina.abushaban" Date: Fri, 1 Aug 2025 18:47:16 +0300 Subject: [PATCH 2/2] added deploy instructions --- aixplain/modules/mixins.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/aixplain/modules/mixins.py b/aixplain/modules/mixins.py index 6859d8a2..9e522022 100644 --- a/aixplain/modules/mixins.py +++ b/aixplain/modules/mixins.py @@ -73,7 +73,12 @@ def deploy(self) -> None: undeployed_agents = [agent for agent in self.agents if agent.status != AssetStatus.ONBOARDED] if undeployed_agents: names = ", ".join(str(agent) for agent in undeployed_agents) - raise ValueError(f"The following agents are not deployed: {names}") + if names: + raise ValueError( + f"Agents not deployed: {names}. " + "Deploy them with `.deploy()` before running this command." + ) + self.status = AssetStatus.ONBOARDED self.update()