OpenHands / OpenHands/software-agent-sdk
[Feature]: Select an LLM profile for an individual task-tool worker
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 539
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 137
Description
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
TaskManagerlifetime; 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with proposal #4510 and trace the SDK task and resume entry points through the existing TaskManager lifetime and profile resolution store. Compare the implementation against each acceptance criterion, especially explicit model conflicts, unavailable profiles, discovery provenance, version boundaries, and file-backed, encrypted, and subscription-backed resume cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100