You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/models/index.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,16 +19,16 @@ Use this page in the following order depending on your setup:
19
19
20
20
## OpenAI models
21
21
22
-
When you don't specify a model when initializing an `Agent`, the default model will be used. The default is currently [`gpt-4.1`](https://platform.openai.com/docs/models/gpt-4.1) for compatibility and low latency. If you have access, we recommend setting your agents to [`gpt-5.2`](https://platform.openai.com/docs/models/gpt-5.2) for higher quality while keeping explicit `model_settings`.
22
+
When you don't specify a model when initializing an `Agent`, the default model will be used. The default is currently [`gpt-4.1`](https://developers.openai.com/api/docs/models/gpt-4.1) for compatibility and low latency. If you have access, we recommend setting your agents to [`gpt-5.4`](https://developers.openai.com/api/docs/models/gpt-5.4) for higher quality while keeping explicit `model_settings`.
23
23
24
-
If you want to switch to other models like [`gpt-5.2`](https://platform.openai.com/docs/models/gpt-5.2), there are two ways to configure your agents.
24
+
If you want to switch to other models like [`gpt-5.4`](https://developers.openai.com/api/docs/models/gpt-5.4), there are two ways to configure your agents.
25
25
26
26
### Default model
27
27
28
28
First, if you want to consistently use a specific model for all agents that do not set a custom model, set the `OPENAI_DEFAULT_MODEL` environment variable before running your agents.
29
29
30
30
```bash
31
-
export OPENAI_DEFAULT_MODEL=gpt-5.2
31
+
export OPENAI_DEFAULT_MODEL=gpt-5.4
32
32
python3 my_awesome_agent.py
33
33
```
34
34
@@ -45,13 +45,13 @@ agent = Agent(
45
45
result =await Runner.run(
46
46
agent,
47
47
"Hello",
48
-
run_config=RunConfig(model="gpt-5.2"),
48
+
run_config=RunConfig(model="gpt-5.4"),
49
49
)
50
50
```
51
51
52
-
#### GPT-5.x models
52
+
#### GPT-5 models
53
53
54
-
When you use any GPT-5.x model such as [`gpt-5.2`](https://platform.openai.com/docs/models/gpt-5.2) in this way, the SDK applies default `ModelSettings`. It sets the ones that work the best for most use cases. To adjust the reasoning effort for the default model, pass your own `ModelSettings`:
54
+
When you use any GPT-5 model such as [`gpt-5.4`](https://developers.openai.com/api/docs/models/gpt-5.4) in this way, the SDK applies default `ModelSettings`. It sets the ones that work the best for most use cases. To adjust the reasoning effort for the default model, pass your own `ModelSettings`:
55
55
56
56
```python
57
57
from openai.types.shared import Reasoning
@@ -60,14 +60,14 @@ from agents import Agent, ModelSettings
60
60
my_agent = Agent(
61
61
name="My Agent",
62
62
instructions="You're a helpful agent.",
63
-
# If OPENAI_DEFAULT_MODEL=gpt-5.2 is set, passing only model_settings works.
64
-
# It's also fine to pass a GPT-5.x model name explicitly:
65
-
model="gpt-5.2",
63
+
# If OPENAI_DEFAULT_MODEL=gpt-5.4 is set, passing only model_settings works.
64
+
# It's also fine to pass a GPT-5 model name explicitly:
For lower latency, using `reasoning.effort="none"` with `gpt-5.2` is recommended. The gpt-4.1 family (including mini and nano variants) also remains a solid choice for building interactive agent apps.
70
+
For lower latency, using `reasoning.effort="none"` with `gpt-5.4` is recommended. The gpt-4.1 family (including mini and nano variants) also remains a solid choice for building interactive agent apps.
71
71
72
72
#### Non-GPT-5 models
73
73
@@ -83,7 +83,7 @@ from agents import set_default_openai_responses_transport
This affects OpenAI Responses models resolved by the default OpenAI provider (including string model names such as `"gpt-5.2"`).
86
+
This affects OpenAI Responses models resolved by the default OpenAI provider (including string model names such as `"gpt-5.4"`).
87
87
88
88
Transport selection happens when the SDK resolves a model name into a model instance. If you pass a concrete [`Model`][agents.models.interface.Model] object, its transport is already fixed: [`OpenAIResponsesWSModel`][agents.models.openai_responses.OpenAIResponsesWSModel] uses websocket, [`OpenAIResponsesModel`][agents.models.openai_responses.OpenAIResponsesModel] uses HTTP, and [`OpenAIChatCompletionsModel`][agents.models.openai_chatcompletions.OpenAIChatCompletionsModel] stays on Chat Completions. If you pass `RunConfig(model_provider=...)`, that provider controls transport selection instead of the global default.
89
89
@@ -213,7 +213,7 @@ triage_agent = Agent(
213
213
name="Triage agent",
214
214
instructions="Handoff to the appropriate agent based on the language of the request.",
215
215
handoffs=[spanish_agent, english_agent],
216
-
model="gpt-5",
216
+
model="gpt-5.4",
217
217
)
218
218
219
219
asyncdefmain():
@@ -254,7 +254,7 @@ from agents import Agent, ModelSettings
0 commit comments