Skip to content

Commit 80ed6cd

Browse files
n-o-u-r-h-a-nJonas-Isrbot-sdk-js
authored
chore: update models list (#747)
* update models + release notes * deprecating gpt-4o-mini * extra updates * using gpt-5-mini instead * Update orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationAiModel.java Co-authored-by: Jonas-Isr <jonas.israel@sap.com> * Update foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiModel.java Co-authored-by: Jonas-Isr <jonas.israel@sap.com> * Update docs/release_notes.md Co-authored-by: Jonas-Isr <jonas.israel@sap.com> * removing all usages of GPT_4O_MINI * Formatting * chore: retrigger CI * fixing usages of GPT_4O_MINI in json files * fixing tests * Formatting * chore: retrigger CI --------- Co-authored-by: Jonas-Isr <jonas.israel@sap.com> Co-authored-by: SAP Cloud SDK Bot <cloudsdk@sap.com>
1 parent ce7f0ca commit 80ed6cd

21 files changed

Lines changed: 94 additions & 57 deletions

File tree

docs/release_notes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
### ✨ New Functionality
1414

1515
- [RPT] Introducing `RptClient` for Tabular AI backed by SAP RPT models `SAP_RPT_1_SMALL` and `SAP_RPT_1_LARGE`.
16+
- [Orchestration] Deprecated `ALEPHALPHA_PHARIA_1_7B_CONTROL` model from `OrchestrationAiModel` with replacement model `MISTRAL_SMALL_INSTRUCT`.
17+
- [Orchestration] Deprecated `GPT_4O_MINI` model from `OrchestrationAiModel` with replacement model `GPT_5_MINI`.
18+
- [Orchestration] Deprecated `GPT_4O_MINI` model from `OpenAiModel` with replacement model `GPT_5_MINI`.
19+
- [Orchestration] Deprecated models `GEMINI_2_0_FLASH`, `GEMINI_2_0_FLASH_LITE` and `CLAUDE_3_7_SONNET` from `OrchestrationAiModel`.
20+
- [Orchestration] Deprecated `DALL_E_3` model from `OpenAiModel`.
1621

1722
### 📈 Improvements
1823

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiModel.java

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@
1616
*/
1717
public record OpenAiModel(@Nonnull String name, @Nullable String version) implements AiModel {
1818

19-
/** internal [Azure OpenAI dall-e-3 model] */
20-
public static final OpenAiModel DALL_E_3 = new OpenAiModel("dall-e-3", null);
19+
/**
20+
* internal [Azure OpenAI dall-e-3 model]
21+
*
22+
* @deprecated This model is deprecated on AI Core.
23+
*/
24+
@Deprecated public static final OpenAiModel DALL_E_3 = new OpenAiModel("dall-e-3", null);
2125

2226
/**
2327
* Azure OpenAI GPT-3.5 Turbo model
@@ -63,8 +67,13 @@ public record OpenAiModel(@Nonnull String name, @Nullable String version) implem
6367
/** Azure OpenAI GPT-4o model */
6468
public static final OpenAiModel GPT_4O = new OpenAiModel("gpt-4o", null);
6569

66-
/** Azure OpenAI GPT-4o Mini model */
67-
public static final OpenAiModel GPT_4O_MINI = new OpenAiModel("gpt-4o-mini", null);
70+
/**
71+
* Azure OpenAI GPT-4o Mini model
72+
*
73+
* @deprecated This model is deprecated on AI Core. The suggested replacement model is {@link
74+
* OpenAiModel#GPT_5_MINI}.
75+
*/
76+
@Deprecated public static final OpenAiModel GPT_4O_MINI = new OpenAiModel("gpt-4o-mini", null);
6877

6978
/** Azure OpenAI GPT-o3 Mini model */
7079
public static final OpenAiModel O3_MINI = new OpenAiModel("o3-mini", null);

orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationAiModel.java

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,12 @@ public class OrchestrationAiModel {
132132
public static final OrchestrationAiModel CLAUDE_3_5_SONNET =
133133
new OrchestrationAiModel("anthropic--claude-3.5-sonnet");
134134

135-
/** Anthropic Claude 3.7 Sonnet model */
135+
/**
136+
* Anthropic Claude 3.7 Sonnet model
137+
*
138+
* @deprecated This model is deprecated on AI Core with a planned retirement on 2025-04-28.
139+
*/
140+
@Deprecated
136141
public static final OrchestrationAiModel CLAUDE_3_7_SONNET =
137142
new OrchestrationAiModel("anthropic--claude-3.7-sonnet");
138143

@@ -259,7 +264,13 @@ public class OrchestrationAiModel {
259264
/** Azure OpenAI GPT-4o model */
260265
public static final OrchestrationAiModel GPT_4O = new OrchestrationAiModel("gpt-4o");
261266

262-
/** Azure OpenAI GPT-4o-mini model */
267+
/**
268+
* Azure OpenAI GPT-4o-mini model
269+
*
270+
* @deprecated This model is deprecated on AI Core.The suggested replacement model is {@link
271+
* OrchestrationAiModel#GPT_5_MINI}.
272+
*/
273+
@Deprecated
263274
public static final OrchestrationAiModel GPT_4O_MINI = new OrchestrationAiModel("gpt-4o-mini");
264275

265276
/** Azure OpenAI o1 model */
@@ -314,11 +325,21 @@ public class OrchestrationAiModel {
314325
public static final OrchestrationAiModel GEMINI_1_5_FLASH =
315326
new OrchestrationAiModel("gemini-1.5-flash");
316327

317-
/** Google Cloud Platform Gemini 2.0 Flash model */
328+
/**
329+
* Google Cloud Platform Gemini 2.0 Flash model
330+
*
331+
* @deprecated This model is deprecated on AI Core with a planned retirement on 2026-02-05.
332+
*/
333+
@Deprecated
318334
public static final OrchestrationAiModel GEMINI_2_0_FLASH =
319335
new OrchestrationAiModel("gemini-2.0-flash");
320336

321-
/** Google Cloud Platform Gemini 2.0 Flash-Lite model */
337+
/**
338+
* Google Cloud Platform Gemini 2.0 Flash-Lite model
339+
*
340+
* @deprecated This model is deprecated on AI Core with a planned retirement on 2026-02-25.
341+
*/
342+
@Deprecated
322343
public static final OrchestrationAiModel GEMINI_2_0_FLASH_LITE =
323344
new OrchestrationAiModel("gemini-2.0-flash-lite");
324345

@@ -334,7 +355,13 @@ public class OrchestrationAiModel {
334355
public static final OrchestrationAiModel GEMINI_2_5_PRO =
335356
new OrchestrationAiModel("gemini-2.5-pro");
336357

337-
/** Alephalpha-pharia-1-7b-control model */
358+
/**
359+
* Alephalpha-pharia-1-7b-control model
360+
*
361+
* @deprecated This model is deprecated on AI Core with a planned retirement on 2025-10-31. The
362+
* suggested replacement model is {@link OrchestrationAiModel#MISTRAL_SMALL_INSTRUCT}.
363+
*/
364+
@Deprecated
338365
public static final OrchestrationAiModel ALEPHALPHA_PHARIA_1_7B_CONTROL =
339366
new OrchestrationAiModel("alephalpha-pharia-1-7b-control");
340367

orchestration/src/test/java/com/sap/ai/sdk/orchestration/OrchestrationUnitTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import static com.sap.ai.sdk.orchestration.AzureFilterThreshold.ALLOW_SAFE_LOW_MEDIUM;
2020
import static com.sap.ai.sdk.orchestration.OrchestrationAiModel.GEMINI_2_5_FLASH;
2121
import static com.sap.ai.sdk.orchestration.OrchestrationAiModel.GPT_4O;
22-
import static com.sap.ai.sdk.orchestration.OrchestrationAiModel.GPT_4O_MINI;
22+
import static com.sap.ai.sdk.orchestration.OrchestrationAiModel.GPT_5_MINI;
2323
import static com.sap.ai.sdk.orchestration.OrchestrationAiModel.Parameter.*;
2424
import static com.sap.ai.sdk.orchestration.OrchestrationTemplateReference.ScopeEnum.RESOURCE_GROUP;
2525
import static com.sap.ai.sdk.orchestration.model.AzureThreshold.NUMBER_0;
@@ -909,7 +909,7 @@ void testStreamingErrorHandlingBadRequest() throws IOException {
909909

910910
val wrongConfig =
911911
new OrchestrationModuleConfig()
912-
.withLlmConfig(GPT_4O_MINI.withVersion("wrong-version"))
912+
.withLlmConfig(GPT_5_MINI.withVersion("wrong-version"))
913913
.withInputFiltering(new AzureContentFilter().hate(AzureFilterThreshold.ALLOW_SAFE));
914914
val prompt = new OrchestrationPrompt("HelloWorld!");
915915

@@ -1033,7 +1033,7 @@ void testMultiMessage() throws IOException {
10331033
post("/v2/completion")
10341034
.willReturn(aResponse().withStatus(SC_OK).withBodyFile("multiMessageResponse.json")));
10351035

1036-
var llmWithImageSupportConfig = new OrchestrationModuleConfig().withLlmConfig(GPT_4O_MINI);
1036+
var llmWithImageSupportConfig = new OrchestrationModuleConfig().withLlmConfig(GPT_5_MINI);
10371037

10381038
var messageWithTwoTexts =
10391039
Message.system("Please answer in exactly two sentences.")
@@ -1125,7 +1125,7 @@ void testResponseFormatJsonSchema() throws IOException {
11251125
.withBodyFile("jsonSchemaResponse.json")
11261126
.withHeader("Content-Type", "application/json")));
11271127

1128-
val config = new OrchestrationModuleConfig().withLlmConfig(GPT_4O_MINI);
1128+
val config = new OrchestrationModuleConfig().withLlmConfig(GPT_5_MINI);
11291129

11301130
val schema =
11311131
ResponseJsonSchema.fromType(Translation.class)
@@ -1211,7 +1211,7 @@ void testResponseFormatJsonObject() throws IOException {
12111211
.withBodyFile("jsonObjectResponse.json")
12121212
.withHeader("Content-Type", "application/json")));
12131213

1214-
val config = new OrchestrationModuleConfig().withLlmConfig(GPT_4O_MINI);
1214+
val config = new OrchestrationModuleConfig().withLlmConfig(GPT_5_MINI);
12151215

12161216
val configWithJsonResponse =
12171217
config.withTemplateConfig(TemplateConfig.create().withJsonResponse());
@@ -1238,7 +1238,7 @@ void testResponseFormatText() throws IOException {
12381238
.withBodyFile("responseFormatTextResponse.json")
12391239
.withHeader("Content-Type", "application/json")));
12401240

1241-
val llmWithImageSupportConfig = new OrchestrationModuleConfig().withLlmConfig(GPT_4O_MINI);
1241+
val llmWithImageSupportConfig = new OrchestrationModuleConfig().withLlmConfig(GPT_5_MINI);
12421242

12431243
val template = Message.user("What is 'apple' in German?");
12441244
val templatingConfig =
@@ -1524,7 +1524,7 @@ void testFallbackModules() throws IOException {
15241524

15251525
final var workingConfig =
15261526
new OrchestrationModuleConfig()
1527-
.withLlmConfig(GPT_4O_MINI.withParam(TEMPERATURE, 0.0))
1527+
.withLlmConfig(GPT_5_MINI.withParam(TEMPERATURE, 0.0))
15281528
.withInputFiltering(llamaFilter)
15291529
.withGrounding(groundingConfig);
15301530
final var brokenConfig =

orchestration/src/test/resources/__files/jsonObjectResponse.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"id": "chatcmpl-Azm2iclgMiLcQHP3cGQANArkxoiGx",
1616
"object": "chat.completion",
1717
"created": 1739286048,
18-
"model": "gpt-4o-mini-2024-07-18",
18+
"model": "gpt-5-mini-2024-07-18",
1919
"system_fingerprint": "fp_f3927aa00d",
2020
"choices": [
2121
{

orchestration/src/test/resources/__files/jsonSchemaResponse.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"id": "chatcmpl-AzmCw5QZBi6zQkJPQhvsyjW4Fe90c",
1616
"object": "chat.completion",
1717
"created": 1739286682,
18-
"model": "gpt-4o-mini-2024-07-18",
18+
"model": "gpt-5-mini-2024-07-18",
1919
"system_fingerprint": "fp_f3927aa00d",
2020
"choices": [
2121
{

orchestration/src/test/resources/__files/multiMessageResponse.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"id": "chatcmpl-AyGx4yLYUH79TK81i21BaABoUpf4v",
4141
"object": "chat.completion",
4242
"created": 1738928206,
43-
"model": "gpt-4o-mini-2024-07-18",
43+
"model": "gpt-5-mini-2024-07-18",
4444
"system_fingerprint": "fp_f3927aa00d",
4545
"choices": [
4646
{

orchestration/src/test/resources/__files/responseFormatTextResponse.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"id": "chatcmpl-AzmS9fd4aGRUdEVsQufpFXSVStfck",
3939
"object": "chat.completion",
4040
"created": 1739287625,
41-
"model": "gpt-4o-mini-2024-07-18",
41+
"model": "gpt-5-mini-2024-07-18",
4242
"system_fingerprint": "fp_f3927aa00d",
4343
"choices": [
4444
{

orchestration/src/test/resources/fallbackRequest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"tools" : [ ]
5656
},
5757
"model" : {
58-
"name" : "gpt-4o-mini",
58+
"name" : "gpt-5-mini",
5959
"version" : "latest",
6060
"params" : {
6161
"temperature" : 0.0

orchestration/src/test/resources/jsonObjectRequest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"modules": {
44
"prompt_templating": {
55
"model": {
6-
"name": "gpt-4o-mini",
6+
"name": "gpt-5-mini",
77
"params": {},
88
"version": "latest",
99
"timeout" : 600,

0 commit comments

Comments
 (0)