Skip to content

Commit 4b3986b

Browse files
cguo-oaiseratch
andauthored
docs: Upgrading to GPT-5.2 (#2188)
Co-authored-by: Kazuhiro Sera <[email protected]>
1 parent 71fa12c commit 4b3986b

File tree

18 files changed

+46
-52
lines changed

18 files changed

+46
-52
lines changed

docs/agents.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ By using the `clone()` method on an agent, you can duplicate an Agent, and optio
163163
pirate_agent = Agent(
164164
name="Pirate",
165165
instructions="Write like a pirate",
166-
model="gpt-4.1",
166+
model="gpt-5.2",
167167
)
168168

169169
robot_agent = pirate_agent.clone(

docs/ja/agents.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ agent = Agent[UserContext](
167167
pirate_agent = Agent(
168168
name="Pirate",
169169
instructions="Write like a pirate",
170-
model="gpt-4.1",
170+
model="gpt-5.2",
171171
)
172172

173173
robot_agent = pirate_agent.clone(
@@ -286,4 +286,4 @@ agent = Agent(
286286

287287
!!! note
288288

289-
無限ループを防ぐため、フレームワークはツール呼び出し後に `tool_choice` を自動的に "auto" にリセットします。この挙動は [`agent.reset_tool_choice`][agents.agent.Agent.reset_tool_choice] で設定できます。無限ループの原因は、ツール結果が LLM に送られ、`tool_choice` によって LLM がさらに別のツール呼び出しを生成し続けるためです。
289+
無限ループを防ぐため、フレームワークはツール呼び出し後に `tool_choice` を自動的に "auto" にリセットします。この挙動は [`agent.reset_tool_choice`][agents.agent.Agent.reset_tool_choice] で設定できます。無限ループの原因は、ツール結果が LLM に送られ、`tool_choice` によって LLM がさらに別のツール呼び出しを生成し続けるためです。

docs/ja/models/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ Agents SDK には、2 種類の OpenAI モデルが標準でサポートされ
1111

1212
## OpenAI モデル
1313

14-
`Agent` を初期化する際にモデルを指定しない場合、デフォルトのモデルが使用されます。現在のデフォルトは [`gpt-4.1`](https://platform.openai.com/docs/models/gpt-4.1) で、エージェント型ワークフローの予測可能性と低レイテンシのバランスに優れています
14+
`Agent` を初期化する際にモデルを指定しない場合、デフォルトのモデルが使用されます。現在のデフォルトは互換性のため [`gpt-4.1`](https://platform.openai.com/docs/models/gpt-4.1) です。利用可能であれば、より高品質のために [`gpt-5.2`](https://platform.openai.com/docs/models/gpt-5.2) に設定することを推奨します
1515

16-
[`gpt-5`](https://platform.openai.com/docs/models/gpt-5) などの他のモデルに切り替えたい場合は、次のセクションの手順に従ってください。
16+
[`gpt-5.2`](https://platform.openai.com/docs/models/gpt-5.2) などの他のモデルに切り替えたい場合は、次のセクションの手順に従ってください。
1717

1818
### 既定の OpenAI モデル
1919

@@ -189,4 +189,4 @@ BadRequestError: Error code: 400 - {'error': {'message': "'response_format.type'
189189

190190
- サポートしていない `tools` を理解しないプロバイダーには送らない
191191
- テキスト専用モデルを呼び出す前に、マルチモーダル入力を除外する
192-
- 構造化 JSON 出力をサポートしないプロバイダーでは、無効な JSON が出力される場合があることに注意する
192+
- 構造化 JSON 出力をサポートしないプロバイダーでは、無効な JSON が出力される場合があることに注意する

docs/ja/voice/quickstart.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ spanish_agent = Agent(
7676
instructions=prompt_with_handoff_instructions(
7777
"You're speaking to a human, so be polite and concise. Speak in Spanish.",
7878
),
79-
model="gpt-4.1",
79+
model="gpt-5.2",
8080
)
8181

8282
agent = Agent(
8383
name="Assistant",
8484
instructions=prompt_with_handoff_instructions(
8585
"You're speaking to a human, so be polite and concise. If the user speaks in Spanish, handoff to the spanish agent.",
8686
),
87-
model="gpt-4.1",
87+
model="gpt-5.2",
8888
handoffs=[spanish_agent],
8989
tools=[get_weather],
9090
)
@@ -160,15 +160,15 @@ spanish_agent = Agent(
160160
instructions=prompt_with_handoff_instructions(
161161
"You're speaking to a human, so be polite and concise. Speak in Spanish.",
162162
),
163-
model="gpt-4.1",
163+
model="gpt-5.2",
164164
)
165165

166166
agent = Agent(
167167
name="Assistant",
168168
instructions=prompt_with_handoff_instructions(
169169
"You're speaking to a human, so be polite and concise. If the user speaks in Spanish, handoff to the spanish agent.",
170170
),
171-
model="gpt-4.1",
171+
model="gpt-5.2",
172172
handoffs=[spanish_agent],
173173
tools=[get_weather],
174174
)
@@ -195,4 +195,4 @@ if __name__ == "__main__":
195195
asyncio.run(main())
196196
```
197197

198-
この例を実行すると、エージェントがあなたに話しかけます!自分でエージェントに話しかけられるデモは、[examples/voice/static](https://github.com/openai/openai-agents-python/tree/main/examples/voice/static) の例をご覧ください。
198+
この例を実行すると、エージェントがあなたに話しかけます!自分でエージェントに話しかけられるデモは、[examples/voice/static](https://github.com/openai/openai-agents-python/tree/main/examples/voice/static) の例をご覧ください。

docs/ko/agents.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ agent = Agent[UserContext](
167167
pirate_agent = Agent(
168168
name="Pirate",
169169
instructions="Write like a pirate",
170-
model="gpt-4.1",
170+
model="gpt-5.2",
171171
)
172172

173173
robot_agent = pirate_agent.clone(
@@ -286,4 +286,4 @@ agent = Agent(
286286

287287
!!! note
288288

289-
무한 루프를 방지하기 위해, 프레임워크는 도구 호출 후 `tool_choice` 를 자동으로 "auto" 로 리셋합니다. 이 동작은 [`agent.reset_tool_choice`][agents.agent.Agent.reset_tool_choice] 로 설정할 수 있습니다. 무한 루프는 도구 결과가 LLM 으로 전달되고, `tool_choice` 때문에 LLM 이 다시 도구 호출을 생성하는 과정이 반복되면서 발생합니다.
289+
무한 루프를 방지하기 위해, 프레임워크는 도구 호출 후 `tool_choice` 를 자동으로 "auto" 로 리셋합니다. 이 동작은 [`agent.reset_tool_choice`][agents.agent.Agent.reset_tool_choice] 로 설정할 수 있습니다. 무한 루프는 도구 결과가 LLM 으로 전달되고, `tool_choice` 때문에 LLM 이 다시 도구 호출을 생성하는 과정이 반복되면서 발생합니다.

docs/ko/models/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ Agents SDK는 OpenAI 모델을 다음 두 가지 방식으로 즉시 지원합
1111

1212
## OpenAI 모델
1313

14-
`Agent`를 초기화할 때 모델을 지정하지 않으면 기본 모델이 사용됩니다. 현재 기본값은 [`gpt-4.1`](https://platform.openai.com/docs/models/gpt-4.1)로, 에이전트형 워크플로에 대한 예측 가능성과 낮은 지연 시간의 균형이 뛰어납니다.
14+
`Agent`를 초기화할 때 모델을 지정하지 않으면 기본 모델이 사용됩니다. 현재 기본값은 [`gpt-4.1`](https://platform.openai.com/docs/models/gpt-4.1)로, 에이전트형 워크플로에 대한 예측 가능성과 낮은 지연 시간의 균형이 뛰어납니다. 접근 권한이 있다면 더 높은 품질을 위해 [`gpt-5.2`](https://platform.openai.com/docs/models/gpt-5.2)로 설정하는 것을 권장합니다.
1515

16-
[`gpt-5`](https://platform.openai.com/docs/models/gpt-5)와 같은 다른 모델로 전환하려면 다음 섹션의 단계를 따르세요.
16+
[`gpt-5.2`](https://platform.openai.com/docs/models/gpt-5.2)와 같은 다른 모델로 전환하려면 다음 섹션의 단계를 따르세요.
1717

1818
### 기본 OpenAI 모델
1919

@@ -189,4 +189,4 @@ BadRequestError: Error code: 400 - {'error': {'message': "'response_format.type'
189189

190190
- 지원하지 않는 제공자에게 이해하지 못하는 `tools`를 보내지 않기
191191
- 텍스트 전용 모델을 호출하기 전에 멀티모달 입력을 필터링하기
192-
- structured JSON 출력을 지원하지 않는 제공자는 때때로 잘못된 JSON을 생성할 수 있음을 인지하기
192+
- structured JSON 출력을 지원하지 않는 제공자는 때때로 잘못된 JSON을 생성할 수 있음을 인지하기

docs/ko/voice/quickstart.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ spanish_agent = Agent(
7676
instructions=prompt_with_handoff_instructions(
7777
"You're speaking to a human, so be polite and concise. Speak in Spanish.",
7878
),
79-
model="gpt-4.1",
79+
model="gpt-5.2",
8080
)
8181

8282
agent = Agent(
8383
name="Assistant",
8484
instructions=prompt_with_handoff_instructions(
8585
"You're speaking to a human, so be polite and concise. If the user speaks in Spanish, handoff to the spanish agent.",
8686
),
87-
model="gpt-4.1",
87+
model="gpt-5.2",
8888
handoffs=[spanish_agent],
8989
tools=[get_weather],
9090
)
@@ -160,15 +160,15 @@ spanish_agent = Agent(
160160
instructions=prompt_with_handoff_instructions(
161161
"You're speaking to a human, so be polite and concise. Speak in Spanish.",
162162
),
163-
model="gpt-4.1",
163+
model="gpt-5.2",
164164
)
165165

166166
agent = Agent(
167167
name="Assistant",
168168
instructions=prompt_with_handoff_instructions(
169169
"You're speaking to a human, so be polite and concise. If the user speaks in Spanish, handoff to the spanish agent.",
170170
),
171-
model="gpt-4.1",
171+
model="gpt-5.2",
172172
handoffs=[spanish_agent],
173173
tools=[get_weather],
174174
)
@@ -195,4 +195,4 @@ if __name__ == "__main__":
195195
asyncio.run(main())
196196
```
197197

198-
이 예제를 실행하면 에이전트가 말합니다! 직접 에이전트와 대화할 수 있는 데모는 [examples/voice/static](https://github.com/openai/openai-agents-python/tree/main/examples/voice/static)에서 확인하세요.
198+
이 예제를 실행하면 에이전트가 말합니다! 직접 에이전트와 대화할 수 있는 데모는 [examples/voice/static](https://github.com/openai/openai-agents-python/tree/main/examples/voice/static)에서 확인하세요.

docs/models/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ The Agents SDK comes with out-of-the-box support for OpenAI models in two flavor
77

88
## OpenAI models
99

10-
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), which offers a strong balance of predictability for agentic workflows and low latency.
10+
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`.
1111

12-
If you want to switch to other models like [`gpt-5`](https://platform.openai.com/docs/models/gpt-5), follow the steps in the next section.
12+
If you want to switch to other models like [`gpt-5.2`](https://platform.openai.com/docs/models/gpt-5.2), follow the steps in the next section.
1313

1414
### Default OpenAI model
1515

docs/voice/quickstart.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ spanish_agent = Agent(
7272
instructions=prompt_with_handoff_instructions(
7373
"You're speaking to a human, so be polite and concise. Speak in Spanish.",
7474
),
75-
model="gpt-4.1",
75+
model="gpt-5.2",
7676
)
7777

7878
agent = Agent(
7979
name="Assistant",
8080
instructions=prompt_with_handoff_instructions(
8181
"You're speaking to a human, so be polite and concise. If the user speaks in Spanish, handoff to the spanish agent.",
8282
),
83-
model="gpt-4.1",
83+
model="gpt-5.2",
8484
handoffs=[spanish_agent],
8585
tools=[get_weather],
8686
)
@@ -156,15 +156,15 @@ spanish_agent = Agent(
156156
instructions=prompt_with_handoff_instructions(
157157
"You're speaking to a human, so be polite and concise. Speak in Spanish.",
158158
),
159-
model="gpt-4.1",
159+
model="gpt-5.2",
160160
)
161161

162162
agent = Agent(
163163
name="Assistant",
164164
instructions=prompt_with_handoff_instructions(
165165
"You're speaking to a human, so be polite and concise. If the user speaks in Spanish, handoff to the spanish agent.",
166166
),
167-
model="gpt-4.1",
167+
model="gpt-5.2",
168168
handoffs=[spanish_agent],
169169
tools=[get_weather],
170170
)

docs/zh/agents.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ agent = Agent[UserContext](
167167
pirate_agent = Agent(
168168
name="Pirate",
169169
instructions="Write like a pirate",
170-
model="gpt-4.1",
170+
model="gpt-5.2",
171171
)
172172

173173
robot_agent = pirate_agent.clone(
@@ -286,4 +286,4 @@ agent = Agent(
286286

287287
!!! note
288288

289-
为防止无限循环,框架会在一次工具调用后自动将 `tool_choice` 重置为 "auto"。该行为可通过 [`agent.reset_tool_choice`][agents.agent.Agent.reset_tool_choice] 配置。产生无限循环的原因是工具结果会被发送给 LLM,而由于 `tool_choice` 的设置,LLM 会再次生成工具调用,如此往复。
289+
为防止无限循环,框架会在一次工具调用后自动将 `tool_choice` 重置为 "auto"。该行为可通过 [`agent.reset_tool_choice`][agents.agent.Agent.reset_tool_choice] 配置。产生无限循环的原因是工具结果会被发送给 LLM,而由于 `tool_choice` 的设置,LLM 会再次生成工具调用,如此往复。

0 commit comments

Comments
 (0)