Model management
In OpenAI Agents SDK, each agent must be powered by an LLM. The LLM acts as the brain of the agent, being able to read information, call tools, and generate responses. So far, we have used the default configuration when instantiating an agent. This defaults the agent’s model to GPT-4o with default model settings. In this section, we will go through how and when to modify this parameter.
Adjusting the underlying model
OpenAI Agents SDK enables you to explicitly select the underlying model you want to use. Each model has its own benefits and drawbacks, and it is advantageous to use the right model for the right type of agent that you are building. For example, GPT-4o can produce fast and accurate responses, whereas o3-pro can reason and address complex questions but is far slower.
To adjust the model, you can simply use the model parameter when instantiating an agent. This demo will show how to adjust the model that the agent uses:
agent = Agent...