Skip to content

Subagents cannot easily run on a different model than the main agent #2438

Closed as not planned

Description

@imadcat

Problem

Subagents spawned via the Agent / AgentSwarm tools always run on the same model as the main agent unless the operator discovers and enables the experimental secondary-model flag (KIMI_CODE_EXPERIMENTAL_SECONDARY_MODEL), which is off by default. Even with the flag on, the model parameter only accepts the symbolic choices primary / secondary — there is no way to point a single subagent at an arbitrary configured [models] alias, and agent profiles (model_preference) cannot name a concrete model either.

Proposal

  1. Promote the secondary-model mechanism to default-on (opt out via KIMI_CODE_EXPERIMENTAL_SECONDARY_MODEL=0 or [experimental] secondary-model = false), keeping the legacy inherit-the-parent-model behavior available.
  2. Let the Agent / AgentSwarm model parameter accept any configured [models] alias in addition to primary / secondary.
  3. Let profile modelPreference / agent-file model_preference name a concrete alias, validated at spawn time.
  4. Fail loudly on unknown aliases (error listing the valid choices) instead of silently inheriting the parent's model.

I have an implementation ready covering both engines (agent-core and agent-core-v2) with tests and docs — will open the PR right away.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions