Skip to content

Sub-agent model selection is ignored and the parent session model is used instead #35446

Description

@tore-unumed

Summary

When a workflow session is pinned to one model, sub-agent model selection does not appear to be honored.

I was able to reproduce this in two ways:

  1. An inline sub-agent with its own model field.
  2. A file-defined custom sub-agent with either its own model field or an explicit Task model override.

In both cases, the sub-agent is recognized and invoked correctly, but execution still uses the parent session model.

Expected behavior

If a sub-agent is configured with model: gpt-5-mini, or if the Task invocation explicitly requests gpt-5-mini, the sub-agent should run on that model.

Actual behavior

The runtime appears to resolve or acknowledge the requested sub-agent model, but then still executes on the parent session model.

Examples of the kind of log sequence I observed:

  • definitionModel="gpt-5-mini"
  • effectiveModel="gpt-5-mini"
  • later: Using model: gpt-5.4

I also observed a case where the runtime explicitly logged that it was using the session model instead of the sub-agent definition model.

Minimal reproduction shape

Parent workflow/session:

  • engine model: gpt-5.4

Sub-agent case A:

  • inline sub-agent definition includes model: gpt-5-mini
  • parent invokes that sub-agent once with a trivial prompt

Sub-agent case B:

  • file-defined custom sub-agent includes model: gpt-5-mini
  • parent invokes it via Task with an explicit model override of gpt-5-mini

What reproduces

In both cases:

  • the sub-agent is available
  • the sub-agent is invoked
  • the prompt is delivered correctly
  • the sub-agent returns a valid response
  • the actual execution model remains the parent session model

Why this seems like a framework/runtime bug

This looks like a model-routing bug rather than a prompting or config parse issue, because:

  • the sub-agent is loaded successfully
  • the requested model is visible in runtime/debug logs
  • execution still falls back to the session model

Impact

This makes it hard to use smaller/cheaper sub-agents for routing or narrow subtasks while keeping a stronger parent model for the main workflow.

Question

Is per-sub-agent model selection currently expected to work under all runtime/provider configurations, or is there a known limitation where sub-agents inherit the parent session model even when a different model is specified?

Activity

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions