Skip to content

fix(delegate_task): accept caller-supplied model override#34472

Open
jiuri7758258-coder wants to merge 1 commit into
NousResearch:mainfrom
jiuri7758258-coder:fix/delegate-task-model-override
Open

fix(delegate_task): accept caller-supplied model override#34472
jiuri7758258-coder wants to merge 1 commit into
NousResearch:mainfrom
jiuri7758258-coder:fix/delegate-task-model-override

Conversation

@jiuri7758258-coder

Copy link
Copy Markdown

The delegate_task tool schema advertises a model parameter but the function
signature and handler lambda ignored it, so subagents always inherited the parent's
model regardless of what the caller specified.

Changes

  • Add model param to delegate_task() signature
  • Pass model arg through the handler lambda
  • Override creds['model'] with caller-supplied model after credential resolution
  • Support per-task model overrides in the tasks array
  • Propagate per-task provider alongside model

Fixes the model-router skill pattern where delegate_task(model={...})
silently fell back to the parent model.

The delegate_task tool schema advertises a 'model' parameter but
the function signature and handler lambda ignored it.

- Add model param to delegate_task() signature
- Pass model arg through handler lambda
- Override creds['model'] with caller-supplied model
- Support per-task model overrides
- Propagate per-task provider alongside model
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists tool/delegate Subagent delegation comp/agent Core agent loop, run_agent.py, prompt builder labels May 29, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #23769 and #25530 (both open, same fix for delegate_task model override). Part of a larger cluster including #19719, #16163, #17756 — tracked by #14974. The oldest open PR with identical scope is #23769.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder P2 Medium — degraded but workaround exists tool/delegate Subagent delegation type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants