Skip to main content
model= is the canonical name for the model on every agent class; llm= is a deprecated alias for it.

Quick Start

1

Use the canonical name

2

The deprecated alias still works

llm= still works but emits a DeprecationWarning. Move to model= at your convenience.
3

Passing both is refused


How It Works

Every agent class routes llm= and model= through one resolver so the rule is identical everywhere.

Where It Applies

The llm= / model= pair resolves the same way on every class below.
manager_llm= on AgentTeam / AgentFlow is separate and unchanged — it is the hierarchical manager’s model and never touches the members.

Custom LLM objects

Pass any object with a get_response-compatible surface to llm= and the agent uses it as its backend instead of the OpenAI default.
The agent duck-types on get_response, so any conforming backend works — including the ScriptedModel test double from Offline Testing.
Before PraisonAI #4929, passing your own model object fell through every branch to the plain OpenAI path: self.llm became the object itself and _using_custom_llm stayed False, so every turn went to OpenAI under a model name that was really a repr(). Passing your own model did the opposite of what it means. It is now routed to your object.

Migration

No code change is required — llm= still works. Move to model= at your convenience; it is the canonical name.
Pick one. model= is the canonical name. Passing both now raises TypeError because the two are the same parameter and guessing a winner could change which vendor is billed.
On VisionAgent, AudioAgent, OCRAgent, VideoAgent, EmbeddingAgent, CodeAgent, RealtimeAgent, ImageAgent, and ContextAgent you no longer need to unwrap an LLMConfig yourself. The class stores its .model string and keeps its own base_url= / api_key=.
AgentTeam(llm=LLMConfig(...)) and AgentFlow(llm=LLMConfig(...)) unwrap the config to its .model string before filling in members. Before this fix, the raw LLMConfig was pushed into every member and each member’s chat() returned None silently. base_url, api_key, auth, and fallback_models on the config are dropped for containers today — pin those on the individual member Agent(s) if you need them.
Those four now also accept model= (canonical). The alias llm= still works.
Passing LLMConfig(...) to AgentTeam or AgentFlow today keeps only .modelbase_url, api_key, auth, and fallback_models are dropped. Pin those on the individual member Agent(s) when you need a custom endpoint, alternate credentials, or a fallback chain per member.

LLM Config

Pass an LLMConfig object to model= for base_url, api_key, and fallbacks.

Legacy Agent Parameters

Other deprecated Agent() parameters and their replacements.