feat(delegate): allow model and provider overrides via tool call#12
Conversation
Extend the delegate_task tool to accept `model` and `provider` parameters at both the top level and per-task level. This allows overriding the model and provider used by subagents dynamically at call time, seamlessly integrating with the existing runtime provider resolution system. - Add `model` and `provider` to DELEGATE_TASK_SCHEMA. - Update `delegate_task` to handle these overrides with proper fallback (task -> top-level -> config -> parent). - Clear out the ACP transport configuration when a provider override resolves to prevent sending incompatible transports to a different provider API mode. Co-authored-by: Dev-Time <8889294+Dev-Time@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
🔎 Lint report:
|
| Rule | Count |
|---|---|
invalid-argument-type |
5 |
First entries
tools/delegate_tool.py:2166: [invalid-argument-type] invalid-argument-type: Argument to function `_build_child_agent` is incorrect: Expected `str | None`, found `Unknown | str | None | list[Unknown] | list[str]`
tools/delegate_tool.py:2167: [invalid-argument-type] invalid-argument-type: Argument to function `_build_child_agent` is incorrect: Expected `str | None`, found `Unknown | str | list[str] | None | list[Unknown]`
tools/delegate_tool.py:2125: [invalid-argument-type] invalid-argument-type: Argument to function `resolve_runtime_provider` is incorrect: Expected `str | None`, found `(Any & ~None) | str | list[str]`
tools/delegate_tool.py:2125: [invalid-argument-type] invalid-argument-type: Argument to function `resolve_runtime_provider` is incorrect: Expected `str | None`, found `Any | None | str | list[str]`
tools/delegate_tool.py:2168: [invalid-argument-type] invalid-argument-type: Argument to function `_build_child_agent` is incorrect: Expected `list[str] | None`, found `Unknown | str | list[str] | None | list[Unknown]`
✅ Fixed issues (2):
| Rule | Count |
|---|---|
invalid-argument-type |
2 |
First entries
tools/delegate_tool.py:2077: [invalid-argument-type] invalid-argument-type: Argument to function `_build_child_agent` is incorrect: Expected `list[str] | None`, found `Unknown | str | list[str] | None`
tools/delegate_tool.py:2074: [invalid-argument-type] invalid-argument-type: Argument to function `_build_child_agent` is incorrect: Expected `str | None`, found `Unknown | (str & ~AlwaysFalsy) | (list[str] & ~AlwaysFalsy) | None`
Unchanged: 4947 pre-existing issues carried over.
Diagnostics are surfaced as warnings — this check never fails the build.
Specify utf-8 encoding for `open` calls in `plugins/memory/byterover/__init__.py` to fix windows footguns CI failure. Co-authored-by: Dev-Time <8889294+Dev-Time@users.noreply.github.com>
This PR adds the ability to dynamically override the model and provider used by subagents when delegating tasks. It enables passing
modelandproviderarguments either at the top-level or on a per-task basis, allowing orchestration across disparate providers and models without statically pre-configuring them inconfig.yaml.Resolves the user request to support dynamic credential overlay using the existing
hermes_cli.runtime_providersystem.Validated by running
ruff check,ruff format, and existingpytesttest suites cleanly.PR created automatically by Jules for task 14151566856218300852 started by @Dev-Time