From 60fc70a83eca5c4d4ede128395ac5fe77b7831a5 Mon Sep 17 00:00:00 2001 From: Kailigithub Date: Tue, 26 May 2026 03:40:48 +0000 Subject: [PATCH] feat(conductor): inherit model selection from conductor agent when spawning subagents When a subagent is spawned via the conductor, it now inherits the conductor agent's current model selection (llm_no) instead of always defaulting to model index 0. This ensures subagents use the same model as the main session, which is the expected behavior when the user has switched models via /llms. If the conductor agent hasn't been initialized yet, the subagent falls back to the default model (index 0). Closes #456 --- frontends/conductor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontends/conductor.py b/frontends/conductor.py index 8a15f4e2d..e666729f6 100644 --- a/frontends/conductor.py +++ b/frontends/conductor.py @@ -177,6 +177,9 @@ def start_subagent(prompt: str) -> dict: agent = GenericAgent() agent.inc_out = True agent.verbose = False + # Inherit model selection from conductor agent + if conductor_agent is not None: + agent.next_llm(conductor_agent.llm_no) start_agent_runner(agent, f"subagent-{sid}") state = SubAgentState(id=sid, agent=agent, prompt=prompt, status="running")