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 routesllm= and model= through one resolver so the rule is identical everywhere.
Where It Applies
Thellm= / 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 aget_response-compatible surface to llm= and the agent uses it as its backend instead of the OpenAI default.
get_response, so any conforming backend works — including the ScriptedModel test double from Offline Testing.
Migration
I use llm= in every example
I use llm= in every example
No code change is required —
llm= still works. Move to model= at your convenience; it is the canonical name.I pass both llm= and model= today
I pass both llm= and model= today
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.I pass an LLMConfig to a specialised agent
I pass an LLMConfig to a specialised agent
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=.I pass an LLMConfig to a container (AgentTeam / AgentFlow)
I pass an LLMConfig to a container (AgentTeam / AgentFlow)
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.I use CodeAgent(llm=…), RealtimeAgent(llm=…), AgentTeam(llm=…), or AgentFlow(llm=…)
I use CodeAgent(llm=…), RealtimeAgent(llm=…), AgentTeam(llm=…), or AgentFlow(llm=…)
Those four now also accept
model= (canonical). The alias llm= still works.Related
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.
