feat(delegation): support per-call child model overrides - #50465
feat(delegation): support per-call child model overrides#50465JiraiyaETH wants to merge 1 commit into
Conversation
663feca to
b3545de
Compare
|
Related: #47295, #32711 (feature requests for per-call model routing in delegate_task), and the open competing PRs #48867, #50015, #17756, #12715 (and others) that implement the basic per-call/per-task model override. This PR is a superset — it adds |
|
We do not want this |
@teknium1 Many users do, and I'd love to have a discussion around this. At the very least, we could gate the allowed behavior behind an opt-in config option, maybe something like `delegation.dynamic_subagents: true' (defaults to false). There are benefits to allowing this, such as having higher model/reasoning effort planning/review subagents for projects with larger sets of dependencies or security implications. Thoughts? |
Summary
delegate_taskmodel overrides viamodel={provider, model}reasoning_effortoverridesAIAgent._dispatch_delegate_taskValidation
python -m py_compile tools/delegate_tool.py run_agent.py tests/tools/test_delegate.pypython -m pytest tests/tools/test_delegate.py::TestDelegateRequirements::test_schema_valid tests/tools/test_delegate.py::TestDelegationProviderIntegration::test_per_call_model_override_reaches_child_agent tests/tools/test_delegate.py::TestDelegationProviderIntegration::test_per_call_model_only_override_reuses_delegation_provider tests/tools/test_delegate.py::TestDelegationProviderIntegration::test_per_call_model_only_override_can_inherit_parent_provider tests/tools/test_delegate.py::TestDelegationProviderIntegration::test_batch_mode_can_mix_per_task_models tests/tools/test_delegate.py::TestDelegationProviderIntegration::test_single_task_reasoning_effort_reaches_child_agent tests/tools/test_delegate.py::TestDelegationReasoningEffort::test_per_call_reasoning_effort_overrides_config tests/tools/test_delegate.py::TestDispatchDelegateTask::test_agent_dispatch_forwards_model_and_reasoning -o 'addopts=' -q→ 8 passedpython -m pytest tests/tools/test_delegate.py -o 'addopts=' -q -k 'not heartbeat_does_not_trip_idle_stale_while_inside_tool'→ 146 passed, 1 deselectedpython -m pytest tests/cli/test_cli_interrupt_subagent.py tests/run_agent/test_tool_executor_contextvar_propagation.py -o 'addopts=' -q→ 6 passedopenai-codex/gpt-5.4-mini→GPT54_MINI_DIRECT_OKDEEPSEEK_PARENT_OVERRIDE_OKBATCH_SYNC_DEEPSEEK_OK,BATCH_SYNC_GPT54_OKKnown unrelated test failure
tests/tools/test_delegate.py::TestDelegateHeartbeat::test_heartbeat_does_not_trip_idle_stale_while_inside_toolis currently failing onorigin/mainas well as this branch. Verified in a separate disposable verifier worktree reset toorigin/main:This PR leaves that heartbeat test untouched.