Skip to content

feat(delegate): allow model and provider overrides via tool call#12

Merged
Dev-Time merged 2 commits into
mainfrom
feat-delegate-task-model-provider-override-14151566856218300852
May 26, 2026
Merged

feat(delegate): allow model and provider overrides via tool call#12
Dev-Time merged 2 commits into
mainfrom
feat-delegate-task-model-provider-override-14151566856218300852

Conversation

@Dev-Time

Copy link
Copy Markdown
Owner

This PR adds the ability to dynamically override the model and provider used by subagents when delegating tasks. It enables passing model and provider arguments either at the top-level or on a per-task basis, allowing orchestration across disparate providers and models without statically pre-configuring them in config.yaml.

Resolves the user request to support dynamic credential overlay using the existing hermes_cli.runtime_provider system.

Validated by running ruff check, ruff format, and existing pytest test suites cleanly.


PR created automatically by Jules for task 14151566856218300852 started by @Dev-Time

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>
@google-labs-jules

Copy link
Copy Markdown

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions

github-actions Bot commented May 26, 2026

Copy link
Copy Markdown

🔎 Lint report: feat-delegate-task-model-provider-override-14151566856218300852 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 9357 on HEAD, 9350 on base (🆕 +7)

🆕 New issues (5):

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>
@Dev-Time Dev-Time merged this pull request into main May 26, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant