Skip to content

feat(delegate): Model routing per subagent #2048

Closed

Description

@simonrosenberg

Summary

Sub-agents currently inherit the parent LLM with model_copy(update={"stream": False}) (impl.py line ~122). There's no way to specify a different model for specific sub-agent types, meaning expensive models are used even for simple tasks.

Proposed Solution

Add per-subagent model selection so that different agent types can use appropriate models (e.g. cheaper/faster models for exploration, more capable models for complex reasoning).

Key Requirements

  • Add model parameter to delegation/agent registration
  • Override the LLM configuration when spawning sub-agents with a specified model
  • Support model specification in both programmatic and file-based agent definitions
  • Validate model availability at agent spawn time

Key Files

  • openhands-sdk/openhands/sdk/llm/llm.py — LLM configuration
  • openhands-tools/openhands/tools/delegate/registration.py — Agent registration
  • openhands-tools/openhands/tools/delegate/impl.py — Agent spawning with model_copy()

Acceptance Criteria

  • Model can be specified per sub-agent type
  • Sub-agents use the specified model instead of inheriting parent's
  • Falls back to parent model when not specified
  • Model validation at spawn time with clear error messages

Activity

  1. added
    behavior-initiative
    and removed
    behavior-initiative
    on Feb 14, 2026
  2. simonrosenberg commented on Feb 16, 2026

    @simonrosenberg
    MemberAuthor

    I am closing this issue since it will be tackled by this issue #2049

  3. enyst commented on Feb 16, 2026

    @enyst
    Member

    Strictly speaking, maybe it should be closed as duplicate, then. Since it's not yet completed - just a thought though, definitely no big deal!

    I'm thinking at the understanding of readers who come across it, searching in issues. We had sometimes confusions created, because people met an issue "closed as completed" and they were like, but it doesn't work - and reported a bug.

    But in this case, your comment should do it, Simon, and the comment also has a link, so I don't think we need more.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions