Skip to content

Commit 570e530

Browse files
authored
Add support for GPT-5 model family (#2667)
1 parent b96b186 commit 570e530

File tree

3 files changed

+53
-5
lines changed

3 files changed

+53
-5
lines changed

app/backend/approaches/approach.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ class Approach(ABC):
136136
"o3": GPTReasoningModelSupport(streaming=True),
137137
"o3-mini": GPTReasoningModelSupport(streaming=True),
138138
"o4-mini": GPTReasoningModelSupport(streaming=True),
139+
"gpt-5": GPTReasoningModelSupport(streaming=True),
140+
"gpt-5-nano": GPTReasoningModelSupport(streaming=True),
141+
"gpt-5-mini": GPTReasoningModelSupport(streaming=True),
139142
}
140143
# Set a higher token limit for GPT reasoning models
141144
RESPONSE_DEFAULT_TOKEN_LIMIT = 1024

docs/deploy_features.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,16 @@ As of early June 2025, the default chat completion model is `gpt-4.1-mini`. If y
3535
For example:
3636

3737
```bash
38-
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT gpt-4o
38+
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT gpt-5-chat
3939
```
4040

41-
1. To set the GPT model to a different [available model](https://learn.microsoft.com/azure/ai-services/openai/concepts/models), run this command with the appropriate model name.
41+
1. To set the GPT model to a different [available model](https://learn.microsoft.com/azure/ai-services/openai/concepts/models), run this command with the appropriate model name. For reasoning models like gpt-5/o3/o4, check [the reasoning guide](./reasoning.md)
42+
43+
For gpt-5-chat:
44+
45+
```shell
46+
azd env set AZURE_OPENAI_CHATGPT_MODEL gpt-5-chat
47+
```
4248

4349
For gpt-4.1-mini:
4450

@@ -72,6 +78,12 @@ As of early June 2025, the default chat completion model is `gpt-4.1-mini`. If y
7278

7379
1. To set the Azure OpenAI model version from the [available versions](https://learn.microsoft.com/azure/ai-services/openai/concepts/models), run this command with the appropriate version string.
7480

81+
For gpt-5-chat:
82+
83+
```shell
84+
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_VERSION 2025-08-07
85+
```
86+
7587
For gpt-4.1-mini:
7688

7789
```bash

docs/reasoning.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ This repository includes an optional feature that uses reasoning models to gener
66

77
### Supported Models
88

9+
* gpt-5
10+
* gpt-5-mini
11+
* gpt-5-nano
912
* o4-mini
1013
* o3
1114
* o3-mini
@@ -21,6 +24,36 @@ This repository includes an optional feature that uses reasoning models to gener
2124

2225
Set the environment variables for your Azure OpenAI GPT deployments to your reasoning model
2326

27+
For gpt-5:
28+
29+
```shell
30+
azd env set AZURE_OPENAI_CHATGPT_MODEL gpt-5
31+
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT gpt-5
32+
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_VERSION 2025-08-07
33+
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_SKU GlobalStandard
34+
azd env set AZURE_OPENAI_API_VERSION 2025-04-01-preview
35+
```
36+
37+
For gpt-5-mini:
38+
39+
```shell
40+
azd env set AZURE_OPENAI_CHATGPT_MODEL gpt-5-mini
41+
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT gpt-5-mini
42+
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_VERSION 2025-08-07
43+
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_SKU GlobalStandard
44+
azd env set AZURE_OPENAI_API_VERSION 2025-04-01-preview
45+
```
46+
47+
For gpt-5-nano:
48+
49+
```shell
50+
azd env set AZURE_OPENAI_CHATGPT_MODEL gpt-5-nano
51+
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT gpt-5-nano
52+
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_VERSION 2025-08-07
53+
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_SKU GlobalStandard
54+
azd env set AZURE_OPENAI_API_VERSION 2025-04-01-preview
55+
```
56+
2457
For o4-mini:
2558

2659
```shell
@@ -63,12 +96,12 @@ This repository includes an optional feature that uses reasoning models to gener
6396

6497
2. **(Optional) Set default reasoning effort**
6598

66-
You can configure how much effort the reasoning model spends on processing and understanding the user's request. Valid options are `low`, `medium`, and `high`. Reasoning effort defaults to `medium` if not set.
99+
You can configure how much effort the reasoning model spends on processing and understanding the user's request. Valid options are `minimal` (for GPT-5 models only), `low`, `medium`, and `high`. Reasoning effort defaults to `medium` if not set.
67100

68-
Set the environment variable for reasoning effort
101+
Set the environment variable for reasoning effort:
69102

70103
```shell
71-
azd env set AZURE_OPENAI_REASONING_EFFORT medium
104+
azd env set AZURE_OPENAI_REASONING_EFFORT minimal
72105
```
73106

74107
3. **Update the infrastructure and application:**

0 commit comments

Comments
 (0)