Skip to content

Commit f89e5ec

Browse files
committed
docs(readme): add GPT-5 mini/nano; usage note for reasoning effort; enums updated
1 parent 9505901 commit f89e5ec

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ auto response2 = client.sendRequest(OpenAI::Model::GPT_4_1_Mini, "Summarize this
132132
```
133133

134134
**Available models:**
135+
- GPT_5, GPT_5_Mini, GPT_5_Nano
135136
- O3, O3_Mini
136137
- O1, O1_Mini, O1_Preview, O1_Pro
137138
- O4_Mini, O4_Mini_Deep_Research
@@ -307,6 +308,9 @@ The library provides type-safe model selection using the `OpenAI::Model` enum:
307308

308309
```cpp
309310
// Available model enums
311+
OpenAI::Model::GPT_5 // gpt-5 - Next-generation model (reasoning)
312+
OpenAI::Model::GPT_5_Mini // gpt-5-mini - Cost-effective GPT-5
313+
OpenAI::Model::GPT_5_Nano // gpt-5-nano - Fastest GPT-5
310314
OpenAI::Model::GPT_4_1 // gpt-4.1 - Latest model with superior coding and structured outputs
311315
OpenAI::Model::GPT_4_1_Mini // gpt-4.1-mini - Balanced performance and cost
312316
OpenAI::Model::GPT_4_1_Nano // gpt-4.1-nano - Fastest and cheapest option

include/openai/OpenAITypes.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ namespace OpenAI {
1818
*/
1919
enum class Model {
2020
// GPT-5 series (Latest - 2025)
21-
GPT_5, // gpt-5 - Next-generation model
21+
GPT_5, // gpt-5 - Next-generation model
22+
GPT_5_Mini, // gpt-5-mini - Smaller, cost-effective variant
23+
GPT_5_Nano, // gpt-5-nano - Fastest and cheapest GPT-5 variant
2224

2325
// O3 series (Latest - 2025)
2426
O3, // o3 - Latest reasoning model
@@ -61,6 +63,10 @@ inline std::string toString(Model model) {
6163
switch (model) {
6264
case Model::GPT_5:
6365
return "gpt-5";
66+
case Model::GPT_5_Mini:
67+
return "gpt-5-mini";
68+
case Model::GPT_5_Nano:
69+
return "gpt-5-nano";
6470
case Model::O3:
6571
return "o3";
6672
case Model::O3_Mini:
@@ -102,6 +108,8 @@ inline std::string toString(Model model) {
102108
*/
103109
inline Model modelFromString(const std::string& modelStr) {
104110
if (modelStr == "gpt-5") return Model::GPT_5;
111+
if (modelStr == "gpt-5-mini") return Model::GPT_5_Mini;
112+
if (modelStr == "gpt-5-nano") return Model::GPT_5_Nano;
105113
if (modelStr == "o3") return Model::O3;
106114
if (modelStr == "o3-mini") return Model::O3_Mini;
107115
if (modelStr == "o1") return Model::O1;
@@ -126,6 +134,8 @@ inline Model modelFromString(const std::string& modelStr) {
126134
inline bool supportsStructuredOutputs(Model model) {
127135
switch (model) {
128136
case Model::GPT_5:
137+
case Model::GPT_5_Mini:
138+
case Model::GPT_5_Nano:
129139
case Model::O3:
130140
case Model::O3_Mini:
131141
case Model::O1:

0 commit comments

Comments
 (0)