> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Container Default LLM

> One `llm=` on AgentTeam or AgentFlow fills in members that didn't pick a model — pinned agents keep theirs.

One `model=` on `AgentTeam` or `AgentFlow` becomes the default model for every member that never named one, while any agent that pinned its own model keeps it.

> [!NOTE]
>
> `model=` is the canonical name; `llm=` is a deprecated alias for it. Passing both raises `TypeError`. See [Model Parameter](https://praison.ai/docs/features/model-parameter.md).

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    subgraph "Container Default LLM"
        C[⚙️ Container llm=] --> D{🔍 Member named<br/>a model?}
        D -->|No| F[✅ Fill in]
        D -->|Yes| K[🔒 Keep member's model]
    end

    classDef config fill:#6366F1,stroke:#7C90A0,color:#fff
    classDef check fill:#F59E0B,stroke:#7C90A0,color:#fff
    classDef fill fill:#10B981,stroke:#7C90A0,color:#fff
    classDef keep fill:#8B0000,stroke:#7C90A0,color:#fff

    class C config
    class D check
    class F fill
    class K keep
```

## Quick Start

**1. One team, one model**

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent, AgentTeam

researcher = Agent(name="Researcher", instructions="Research.")
writer     = Agent(name="Writer",     instructions="Write.")

team = AgentTeam(
    agents=[researcher, writer],
    model="anthropic/claude-sonnet-4-5",
)
team.start("Summarise the latest AI safety research")
```

The team's `model=` flows to every member that didn't pick its own.

**2. Same rule for a flow**

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent
from praisonaiagents.workflows import AgentFlow

researcher = Agent(name="Researcher", instructions="Research.")
writer     = Agent(name="Writer",     instructions="Write.")

flow = AgentFlow(
    steps=[researcher, writer],
    model="anthropic/claude-sonnet-4-5",
)
flow.start("Summarise the latest AI safety research")
```

`AgentFlow(model=…)` fills in ready-made steps the same way `AgentTeam` does.

***

## How It Works

The container's `llm=` is a **default**, not an override. A member that named its own `llm=` / `model=` / `auth=` keeps it; a member with no model adopts the container's.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph TB
    Q{Did the Agent name<br/>its own llm/model/auth?}
    Q -->|Yes| Keep[Keep the agent's model]
    Q -->|No, and container has llm=| Fill[Adopt container llm=]
    Q -->|No, and no container llm=| Default[Agent's env-aware default<br/>OPENAI_MODEL_NAME or gpt-4o-mini]

    classDef question fill:#F59E0B,stroke:#7C90A0,color:#fff
    classDef keep    fill:#6366F1,stroke:#7C90A0,color:#fff
    classDef fill    fill:#10B981,stroke:#7C90A0,color:#fff
    classDef default fill:#189AB4,stroke:#7C90A0,color:#fff
    class Q question
    class Keep keep
    class Fill fill
    class Default default
```

A pinned member keeps its model even when the container names another:

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent, AgentTeam

pinned = Agent(name="Reasoner",   instructions="Think hard.", llm="gpt-4o")
cheap  = Agent(name="Summariser", instructions="Summarise.")

team = AgentTeam(
    agents=[pinned, cheap],
    llm="anthropic/claude-sonnet-4-5",
)
# pinned.llm == "gpt-4o"                       (kept)
# cheap.llm  == "anthropic/claude-sonnet-4-5"  (filled in)
```

> [!NOTE]
>
> `llm=` on the container is a **default**. If a member was constructed with its own `llm=` / `model=` / `auth=`, the container never overrides it. Otherwise the container's `llm=` becomes the member's model.

***

## `manager_llm` Is Separate

`manager_llm=` is the hierarchical manager's own model and never touches the members.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent, AgentTeam

member = Agent(name="Worker", instructions="Do the work.")

team = AgentTeam(
    agents=[member],
    llm="anthropic/claude-sonnet-4-5",  # member default
    manager_llm="gpt-4o",               # hierarchical manager only
)
# team.manager_llm == "gpt-4o"                       (manager keeps its own model)
# member.llm       == "anthropic/claude-sonnet-4-5"  (member fills in)
```

> [!WARNING]
>
> `manager_llm=` sets the model for the hierarchical manager agent only. It is never propagated to member agents — use `llm=` for that.

***

## AgentFlow's Fallback Is Not Propagated

`AgentFlow` falls back to `"gpt-4o-mini"` internally when it needs a model to run, but that fallback is **not** a caller's choice — so it is never pushed onto steps.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent
from praisonaiagents.workflows import AgentFlow

researcher = Agent(name="Researcher", instructions="Research.")

# No container llm= — each step keeps its own env-aware default,
# NOT the flow's "gpt-4o-mini" run-time fallback.
flow = AgentFlow(steps=[researcher])
flow.start("Summarise the latest AI safety research")
```

An `AgentFlow(steps=[…])` with no `llm=` leaves each step's model to `Agent`'s own env-aware default (`OPENAI_MODEL_NAME`, else `gpt-4o-mini`).

***

## Common Patterns

Pin one member, let the rest follow the container — no code change needed to see the split.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent, AgentTeam

reasoner = Agent(name="Reasoner",   instructions="Think hard.", llm="gpt-4o")
writer   = Agent(name="Writer",     instructions="Write.")
editor   = Agent(name="Editor",     instructions="Edit.")

team = AgentTeam(
    agents=[reasoner, writer, editor],
    llm="anthropic/claude-sonnet-4-5",
)
team.start("Draft and polish a launch post")
# reasoner calls gpt-4o; writer and editor call anthropic/claude-sonnet-4-5
```

> [card] Panel agents are skipped
>
> A panel descriptor (`panel:<name>`) is not a model name, so the fill-in leaves it alone.

> [card] `auth=` counts as pinned
>
> A subscription seat pins the vendor, so a team default of another vendor never overrides it.

> [card] List or dict rosters
>
> `AgentTeam` accepts a list or a dict (multi-group teams); both forms are filled in.

> [card] Non-Agent members skipped
>
> Members without `_apply_default_llm` are duck-typed and left untouched.

A member used before the container fills it in caches a dispatcher bound to the old model; the fill-in drops that cache so the next call rebuilds against the new model. Pinned members keep their dispatcher.

***

## Configuration Options

| Param | Container | Behaviour |
| - | - | - |
| `llm` | `AgentTeam`, `AgentFlow` | Default model for members that never named one. A member with its own `llm=` / `model=` / `auth=` keeps it. |
| `manager_llm` | `AgentTeam` | Hierarchical manager's own model. Never propagated to members. |

***

## Best Practices

> [accordion] Set the vendor once at the container level
>
> Put `llm=` on `AgentTeam` / `AgentFlow` and pin per-agent only where the job justifies a different model.

> [accordion] Give the manager its own model
>
> Use `manager_llm=` for the hierarchical manager — don't try to reuse the team default there.

> [accordion] Prefer container llm= for whole-team agreement
>
> When every member should share a vendor, one container `llm=` beats repeating `llm=` on each `Agent`.

> [accordion] Upgrade if llm= did nothing before
>
> Earlier versions stored the container `llm=` but never read it. Upgrade to the version that ships this fill-in so the parameter actually reaches members.

***

## Related

> [card] [AgentTeam Params](https://praison.ai/docs/features/agentteam-supported-params.md)
>
> Which params apply at the team level.

> [card] [Parameter Scope](https://praison.ai/docs/features/agentteam-parameter-scope.md)
>
> Team-level vs per-agent parameter scope.

> [card] [AgentTeam](https://praison.ai/docs/concepts/agentteam.md)
>
> Multi-agent teams overview.

> [card] [AgentFlow](https://praison.ai/docs/concepts/agentflow.md)
>
> Deterministic step pipelines.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.