Skip to content

[Feature]: Select an LLM profile for an individual task-tool worker #4654

Description

@georgeglarson

Existing feature request

I searched the open issues and feature requests and did not find a duplicate.

Problem or Use Case

A parent agent cannot choose a saved LLM profile for one delegated task. It must either change its own model or rely on a subagent definition with a fixed model.

That makes mixed-model delegation awkward. A parent may need to keep its current model while assigning one task to a cheaper, faster, or specialised worker.

An implementation proposal already exists in #4510. This issue records the user-facing contract that proposal needs to satisfy; it does not treat the current internal API shape as accepted.

Desired Behavior

Allow a task call to select a saved LLM profile for that worker without changing the parent agent's model.

The behavior should be explicit when a subagent definition already fixes a model. A caller-supplied profile must not be silently ignored. Profile names shown to the parent must come from the same store used to resolve them, or discovery should be omitted when that cannot be guaranteed.

Resume should preserve or replace the selected profile within the existing TaskManager lifetime. The SDK should return a clear task error if the profile is unavailable. Process-restart persistence is outside this request because task IDs are currently in memory.

Acceptance Criteria

  • A task call can select a saved LLM profile for its worker without changing the parent model.
  • An unknown or unavailable profile returns a clear task error before task state is registered; there is no silent fallback to the parent model.
  • Supplying a profile when the chosen subagent definition already fixes a model produces explicit behavior rather than silently discarding the request.
  • Any profile names advertised to the parent come from the same store used for resolution, or discovery is omitted when that cannot be guaranteed. Only names are advertised, and the model-facing disclosure is documented.
  • A bare resume keeps the selected profile within the current TaskManager lifetime; an explicit profile replaces it for that resume and later resumes.
  • Worker context and metrics remain isolated from the parent.
  • The supported SDK and agent-server version boundary is documented. Mixed-version deployments must fail clearly or reject the unsupported field before execution.
  • Creation and resume behavior are covered for file-backed, encrypted, and subscription-backed profiles, including a profile removed before resume.

Alternatives Considered

  • Change the parent's profile before and after each delegated task. This mutates the parent for a worker-only decision and makes concurrent delegation unsafe.
  • Define one subagent per model. This works for fixed roles, but turns a per-task routing choice into static configuration and does not cover saved provider settings cleanly.

Priority / Severity

Medium - Would improve experience

Estimated Scope

Medium - New feature with moderate complexity

Feature Area

  • Tools / Tool system
  • Configuration / Settings

Additional Context

Implementation proposal: #4510

The proposal does not yet satisfy every criterion above. Its current branch silently discards a caller-supplied profile when the subagent definition pins a model, advertises names from the default store when a definition may resolve from a custom store, and lacks a direct test for a profile removed before resume. Those are review items, not accepted behavior.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions