Skip to content

[Feature]: delegation-per-task-endpoint-overrides #14974

@Alexander-H9

Description

@Alexander-H9

Problem or Use Case

Expose base_url, provider, and api_key as optional per-task fields in
delegate_task, allowing each sub-agent to target a different model
endpoint.

This enables true parallel execution across multiple inference servers
(e.g. multiple Ollama instances) instead of routing all children to a
single backend.

Implementation:

  • Extend delegate_task schema with base_url, provider, api_key
  • Wire task-level overrides into _build_child_agent()
  • Apply precedence: task override → delegation config → parent fallback

This change is fully backward compatible and leverages existing internal
override support already present in _build_child_agent().

Proposed Solution

Expose per-task model routing overrides in the delegate_task tool schema, allowing each sub-agent to target a different backend.


1. Extend Task Schema

Add optional fields to each task:

{
  "base_url": "http://host:11434/v1",
  "provider": "custom",
  "api_key": "ollama"
}

### Alternatives Considered

_No response_

### Feature Type

Other

### Scope

None

### Contribution

- [ ] I'd like to implement this myself and submit a PR

### Debug Report (optional)

```shell

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/agentCore agent loop, run_agent.py, prompt buildertool/delegateSubagent delegationtype/featureNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions