From d87a44abc4bc1f307460cb76405b4abd8503ba5f Mon Sep 17 00:00:00 2001 From: RAJVARDHAN <95933896+vardhans07@users.noreply.github.com> Date: Sun, 20 Sep 2026 00:42:51 +0530 Subject: [PATCH] feat(agents): support model override in agent factory and child builders (#1339) - Add model parameter to build_strix_agent - Add subagent_model parameter to make_child_factory - Forward subagent_model override to child agent instances - Closes #1339 --- strix/agents/factory.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/strix/agents/factory.py b/strix/agents/factory.py index b2fcbf08c..13e786015 100644 --- a/strix/agents/factory.py +++ b/strix/agents/factory.py @@ -650,6 +650,7 @@ def build_strix_agent( skills: list[str] | None = None, is_root: bool, scan_mode: str = "deep", + model: str | None = None, is_whitebox: bool = False, is_diff_scoped: bool = False, interactive: bool = False, @@ -715,7 +716,7 @@ def build_strix_agent( instructions=instructions, tools=tools, tool_use_behavior=_finish_tool_use_behavior, - model=None, + model=model, capabilities=[ Filesystem( configure_tools=_make_filesystem_configurator( @@ -742,6 +743,7 @@ def make_child_factory( chat_completions_tools: bool = False, strict_tool_schemas: bool = True, system_prompt_context: dict[str, Any] | None = None, + subagent_model: str | None = None, ) -> Any: """Return the runner-owned builder used by ``spawn_child_agent``. @@ -755,6 +757,7 @@ def make_child_factory( name=name, skills=skills, is_root=False, + model=subagent_model, scan_mode=scan_mode, is_whitebox=is_whitebox, is_diff_scoped=is_diff_scoped,