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
This commit is contained in:
RAJVARDHAN 2026-09-20 00:42:51 +05:30 • committed by GitHub
parent d223646984
commit d87a44abc4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,