From 3742da086db0d95f4c2f82e9c143b3a5eee1a623 Mon Sep 17 00:00:00 2001 From: CI-DEV <154627941+IlumCI@users.noreply.github.com> Date: Fri, 3 Oct 2025 20:26:57 +0300 Subject: [PATCH] Update ma_utils.py --- swarms/structs/ma_utils.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/swarms/structs/ma_utils.py b/swarms/structs/ma_utils.py index 51980e35..09639d36 100644 --- a/swarms/structs/ma_utils.py +++ b/swarms/structs/ma_utils.py @@ -131,11 +131,9 @@ def set_random_models_for_agents( return random.choice(model_names) if isinstance(agents, list): - return [ + for agent in agents: setattr(agent, "model_name", random.choice(model_names)) - or agent - for agent in agents - ] + return agents else: setattr(agents, "model_name", random.choice(model_names)) return agents