From 7789ec324ef723dd2b2f1818a7a9c312230d4399 Mon Sep 17 00:00:00 2001 From: Nourhan Shata Date: Wed, 4 Feb 2026 20:44:00 +0100 Subject: [PATCH 1/4] update models + release notes --- docs/release_notes.md | 8 ++++++-- .../sap/ai/sdk/orchestration/OrchestrationAiModel.java | 8 +++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/release_notes.md b/docs/release_notes.md index e16ac20e9..8c79deeda 100644 --- a/docs/release_notes.md +++ b/docs/release_notes.md @@ -13,11 +13,15 @@ ### ✨ New Functionality - [RPT] Introducing `RptClient` for Tabular AI backed by SAP RPT models `SAP_RPT_1_SMALL` and `SAP_RPT_1_LARGE`. +- [Orchestration] Deprecated `ALEPHALPHA_PHARIA_1_7B_CONTROL` model from `OrchestrationAiModel` with replacement model + `MISTRAL_SMALL_INSTRUCT`. ### 📈 Improvements -- [Orchestration] Added new API `OrchestrationTemplateReference#withScope` to support prompt templates with resource-group scope. -- [Orchestration] Chat completion calls now can have multiple module configs to support [fallback modules](https://sap.github.io/ai-sdk/docs/java/orchestration/chat-completion). +- [Orchestration] Added new API `OrchestrationTemplateReference#withScope` to support prompt templates with + resource-group scope. +- [Orchestration] Chat completion calls now can have multiple module configs to + support [fallback modules](https://sap.github.io/ai-sdk/docs/java/orchestration/chat-completion). ### 🐛 Fixed Issues diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationAiModel.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationAiModel.java index 27e6a6a85..99a231491 100644 --- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationAiModel.java +++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationAiModel.java @@ -334,7 +334,13 @@ public class OrchestrationAiModel { public static final OrchestrationAiModel GEMINI_2_5_PRO = new OrchestrationAiModel("gemini-2.5-pro"); - /** Alephalpha-pharia-1-7b-control model */ + /** + * Alephalpha-pharia-1-7b-control model + * + * @deprecated This model is deprecated on AI Core with a planned retirement on 2025-10-31.The + * suggested replacement model is {@link OrchestrationAiModel#MISTRAL_SMALL_INSTRUCT}. + */ + @Deprecated public static final OrchestrationAiModel ALEPHALPHA_PHARIA_1_7B_CONTROL = new OrchestrationAiModel("alephalpha-pharia-1-7b-control"); From 78094f96175483b55825d888522281d2baa54e9a Mon Sep 17 00:00:00 2001 From: Nourhan Shata Date: Thu, 5 Feb 2026 15:11:17 +0100 Subject: [PATCH 2/4] deprecating gpt-4o-mini --- docs/release_notes.md | 4 ++++ .../sap/ai/sdk/foundationmodels/openai/OpenAiModel.java | 9 +++++++-- .../sap/ai/sdk/orchestration/OrchestrationAiModel.java | 8 +++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/release_notes.md b/docs/release_notes.md index 8c79deeda..18f386364 100644 --- a/docs/release_notes.md +++ b/docs/release_notes.md @@ -15,6 +15,10 @@ - [RPT] Introducing `RptClient` for Tabular AI backed by SAP RPT models `SAP_RPT_1_SMALL` and `SAP_RPT_1_LARGE`. - [Orchestration] Deprecated `ALEPHALPHA_PHARIA_1_7B_CONTROL` model from `OrchestrationAiModel` with replacement model `MISTRAL_SMALL_INSTRUCT`. +- [Orchestration] Deprecated `GPT_4O_MINI` model from `OrchestrationAiModel` with replacement model + `GPT_5_MINI`. +- [Orchestration] Deprecated `GPT_4O_MINI` model from `OpenAiModel` with replacement model + `GPT_5_MINI`. ### 📈 Improvements diff --git a/foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiModel.java b/foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiModel.java index 35d8152d5..4c3e797db 100644 --- a/foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiModel.java +++ b/foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiModel.java @@ -63,8 +63,13 @@ public record OpenAiModel(@Nonnull String name, @Nullable String version) implem /** Azure OpenAI GPT-4o model */ public static final OpenAiModel GPT_4O = new OpenAiModel("gpt-4o", null); - /** Azure OpenAI GPT-4o Mini model */ - public static final OpenAiModel GPT_4O_MINI = new OpenAiModel("gpt-4o-mini", null); + /** + * Azure OpenAI GPT-4o Mini model + * + * @deprecated This model is deprecated on AI Core.The suggested replacement model is {@link + * OpenAiModel#GPT_5_MINI}. + */ + @Deprecated public static final OpenAiModel GPT_4O_MINI = new OpenAiModel("gpt-4o-mini", null); /** Azure OpenAI GPT-o3 Mini model */ public static final OpenAiModel O3_MINI = new OpenAiModel("o3-mini", null); diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationAiModel.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationAiModel.java index 99a231491..deb8acb2c 100644 --- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationAiModel.java +++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationAiModel.java @@ -259,7 +259,13 @@ public class OrchestrationAiModel { /** Azure OpenAI GPT-4o model */ public static final OrchestrationAiModel GPT_4O = new OrchestrationAiModel("gpt-4o"); - /** Azure OpenAI GPT-4o-mini model */ + /** + * Azure OpenAI GPT-4o-mini model + * + * @deprecated This model is deprecated on AI Core.The suggested replacement model is {@link + * OrchestrationAiModel#GPT_5_MINI}. + */ + @Deprecated public static final OrchestrationAiModel GPT_4O_MINI = new OrchestrationAiModel("gpt-4o-mini"); /** Azure OpenAI o1 model */ From d110f053f5b591d4cb49b13c12a19440dc2ac9ff Mon Sep 17 00:00:00 2001 From: Nourhan Shata Date: Thu, 5 Feb 2026 15:44:48 +0100 Subject: [PATCH 3/4] extra updates --- docs/release_notes.md | 19 ++++++++--------- .../foundationmodels/openai/OpenAiModel.java | 8 +++++-- .../orchestration/OrchestrationAiModel.java | 21 ++++++++++++++++--- 3 files changed, 33 insertions(+), 15 deletions(-) diff --git a/docs/release_notes.md b/docs/release_notes.md index 18f386364..3a0faa162 100644 --- a/docs/release_notes.md +++ b/docs/release_notes.md @@ -13,19 +13,18 @@ ### ✨ New Functionality - [RPT] Introducing `RptClient` for Tabular AI backed by SAP RPT models `SAP_RPT_1_SMALL` and `SAP_RPT_1_LARGE`. -- [Orchestration] Deprecated `ALEPHALPHA_PHARIA_1_7B_CONTROL` model from `OrchestrationAiModel` with replacement model - `MISTRAL_SMALL_INSTRUCT`. -- [Orchestration] Deprecated `GPT_4O_MINI` model from `OrchestrationAiModel` with replacement model - `GPT_5_MINI`. -- [Orchestration] Deprecated `GPT_4O_MINI` model from `OpenAiModel` with replacement model - `GPT_5_MINI`. +- [Orchestration] Deprecated `ALEPHALPHA_PHARIA_1_7B_CONTROL` model from `OrchestrationAiModel` with replacement model `MISTRAL_SMALL_INSTRUCT`. +- [Orchestration] Deprecated `GPT_4O_MINI` model from `OrchestrationAiModel` with replacement model `GPT_5_MINI`. +- [Orchestration] Deprecated `GEMINI_2_0_FLASH` model from `OrchestrationAiModel`. +- [Orchestration] Deprecated `GEMINI_2_0_FLASH_LITE` model from `OrchestrationAiModel`. +- [Orchestration] Deprecated `CLAUDE_3_7_SONNET` model from `OrchestrationAiModel`. +- [Orchestration] Deprecated `GPT_4O_MINI` model from `OpenAiModel` with replacement model `GPT_5_MINI`. +- [Orchestration] Deprecated `DALL_E_3` model from `OpenAiModel`. ### 📈 Improvements -- [Orchestration] Added new API `OrchestrationTemplateReference#withScope` to support prompt templates with - resource-group scope. -- [Orchestration] Chat completion calls now can have multiple module configs to - support [fallback modules](https://sap.github.io/ai-sdk/docs/java/orchestration/chat-completion). +- [Orchestration] Added new API `OrchestrationTemplateReference#withScope` to support prompt templates with resource-group scope. +- [Orchestration] Chat completion calls now can have multiple module configs to support [fallback modules](https://sap.github.io/ai-sdk/docs/java/orchestration/chat-completion). ### 🐛 Fixed Issues diff --git a/foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiModel.java b/foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiModel.java index 4c3e797db..af943692b 100644 --- a/foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiModel.java +++ b/foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiModel.java @@ -16,8 +16,12 @@ */ public record OpenAiModel(@Nonnull String name, @Nullable String version) implements AiModel { - /** internal [Azure OpenAI dall-e-3 model] */ - public static final OpenAiModel DALL_E_3 = new OpenAiModel("dall-e-3", null); + /** + * internal [Azure OpenAI dall-e-3 model] + * + * @deprecated This model is deprecated on AI Core. + */ + @Deprecated public static final OpenAiModel DALL_E_3 = new OpenAiModel("dall-e-3", null); /** * Azure OpenAI GPT-3.5 Turbo model diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationAiModel.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationAiModel.java index deb8acb2c..28b8f1427 100644 --- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationAiModel.java +++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationAiModel.java @@ -132,7 +132,12 @@ public class OrchestrationAiModel { public static final OrchestrationAiModel CLAUDE_3_5_SONNET = new OrchestrationAiModel("anthropic--claude-3.5-sonnet"); - /** Anthropic Claude 3.7 Sonnet model */ + /** + * Anthropic Claude 3.7 Sonnet model + * + * @deprecated This model is deprecated on AI Core with a planned retirement on 2025-04-28. + */ + @Deprecated public static final OrchestrationAiModel CLAUDE_3_7_SONNET = new OrchestrationAiModel("anthropic--claude-3.7-sonnet"); @@ -320,11 +325,21 @@ public class OrchestrationAiModel { public static final OrchestrationAiModel GEMINI_1_5_FLASH = new OrchestrationAiModel("gemini-1.5-flash"); - /** Google Cloud Platform Gemini 2.0 Flash model */ + /** + * Google Cloud Platform Gemini 2.0 Flash model + * + * @deprecated This model is deprecated on AI Core with a planned retirement on 2026-02-05. + */ + @Deprecated public static final OrchestrationAiModel GEMINI_2_0_FLASH = new OrchestrationAiModel("gemini-2.0-flash"); - /** Google Cloud Platform Gemini 2.0 Flash-Lite model */ + /** + * Google Cloud Platform Gemini 2.0 Flash-Lite model + * + * @deprecated This model is deprecated on AI Core with a planned retirement on 2026-02-25. + */ + @Deprecated public static final OrchestrationAiModel GEMINI_2_0_FLASH_LITE = new OrchestrationAiModel("gemini-2.0-flash-lite"); From 2009489e4fb46d266e4d0004724ea2ab830af30b Mon Sep 17 00:00:00 2001 From: Nourhan Shata Date: Thu, 5 Feb 2026 16:13:15 +0100 Subject: [PATCH 4/4] using gpt-5-mini instead --- .../app/controllers/PromptRegistryController.java | 2 +- .../com/sap/ai/sdk/app/services/OpenAiService.java | 14 +++++++------- .../ai/sdk/app/services/SpringAiOpenAiService.java | 2 +- .../com/sap/ai/sdk/app/controllers/OpenAiTest.java | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/controllers/PromptRegistryController.java b/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/controllers/PromptRegistryController.java index 8ff8329a1..37387f1fa 100644 --- a/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/controllers/PromptRegistryController.java +++ b/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/controllers/PromptRegistryController.java @@ -128,7 +128,7 @@ List deleteTemplate() { @GetMapping("/promptRegistryToSpringAi") Generation promptRegistryToSpringAi() { - val openAiClient = new OpenAiChatModel(OpenAiClient.forModel(OpenAiModel.GPT_4O_MINI)); + val openAiClient = new OpenAiChatModel(OpenAiClient.forModel(OpenAiModel.GPT_5_MINI)); val repository = new InMemoryChatMemoryRepository(); val memory = MessageWindowChatMemory.builder().chatMemoryRepository(repository).build(); val advisor = MessageChatMemoryAdvisor.builder(memory).build(); diff --git a/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/OpenAiService.java b/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/OpenAiService.java index 957099c46..1b84e56f6 100644 --- a/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/OpenAiService.java +++ b/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/OpenAiService.java @@ -1,7 +1,7 @@ package com.sap.ai.sdk.app.services; import static com.sap.ai.sdk.foundationmodels.openai.OpenAiModel.GPT_4O; -import static com.sap.ai.sdk.foundationmodels.openai.OpenAiModel.GPT_4O_MINI; +import static com.sap.ai.sdk.foundationmodels.openai.OpenAiModel.GPT_5_MINI; import static com.sap.ai.sdk.foundationmodels.openai.OpenAiModel.TEXT_EMBEDDING_3_SMALL; import com.sap.ai.sdk.core.AiCoreService; @@ -34,7 +34,7 @@ public class OpenAiService { */ @Nonnull public OpenAiChatCompletionResponse chatCompletion(@Nonnull final String prompt) { - return OpenAiClient.forModel(GPT_4O_MINI) + return OpenAiClient.forModel(GPT_5_MINI) .chatCompletion(new OpenAiChatCompletionRequest(prompt)); } @@ -50,13 +50,13 @@ public OpenAiChatCompletionResponse messagesHistory(@Nonnull final String previo messagesList.add(OpenAiMessage.user(previousMessage)); final OpenAiChatCompletionResponse result = - OpenAiClient.forModel(GPT_4O_MINI) + OpenAiClient.forModel(GPT_5_MINI) .chatCompletion(new OpenAiChatCompletionRequest(messagesList)); messagesList.add(result.getMessage()); messagesList.add(OpenAiMessage.user("What is the typical food there?")); - return OpenAiClient.forModel(GPT_4O_MINI) + return OpenAiClient.forModel(GPT_5_MINI) .chatCompletion(new OpenAiChatCompletionRequest(messagesList)); } @@ -71,7 +71,7 @@ public Stream streamChatCompletionDeltas( @Nonnull final String message) { final var request = new OpenAiChatCompletionRequest(OpenAiMessage.user(message)); - return OpenAiClient.forModel(GPT_4O_MINI).streamChatCompletionDeltas(request); + return OpenAiClient.forModel(GPT_5_MINI).streamChatCompletionDeltas(request); } /** @@ -82,7 +82,7 @@ public Stream streamChatCompletionDeltas( */ @Nonnull public Stream streamChatCompletion(@Nonnull final String message) { - return OpenAiClient.forModel(GPT_4O_MINI) + return OpenAiClient.forModel(GPT_5_MINI) .withSystemPrompt("Be a good, honest AI and answer the following question:") .streamChatCompletion(message); } @@ -115,7 +115,7 @@ public OpenAiChatCompletionResponse chatCompletionImage(@Nonnull final String li @Nonnull public OpenAiChatCompletionResponse chatCompletionToolExecution( @Nonnull final String location, @Nonnull final String unit) { - final OpenAiClient client = OpenAiClient.forModel(GPT_4O_MINI); + final OpenAiClient client = OpenAiClient.forModel(GPT_5_MINI); final var messages = new ArrayList(); messages.add(OpenAiMessage.user("What's the weather in %s in %s?".formatted(location, unit))); diff --git a/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/SpringAiOpenAiService.java b/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/SpringAiOpenAiService.java index 49cbeff06..aaf89d798 100644 --- a/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/SpringAiOpenAiService.java +++ b/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/SpringAiOpenAiService.java @@ -31,7 +31,7 @@ public class SpringAiOpenAiService { private final OpenAiSpringEmbeddingModel embeddingClient = new OpenAiSpringEmbeddingModel(OpenAiClient.forModel(OpenAiModel.TEXT_EMBEDDING_3_SMALL)); private final ChatModel chatClient = - new OpenAiChatModel(OpenAiClient.forModel(OpenAiModel.GPT_4O_MINI)); + new OpenAiChatModel(OpenAiClient.forModel(OpenAiModel.GPT_5_MINI)); /** * Embeds a list of strings using the OpenAI embedding model. diff --git a/sample-code/spring-app/src/test/java/com/sap/ai/sdk/app/controllers/OpenAiTest.java b/sample-code/spring-app/src/test/java/com/sap/ai/sdk/app/controllers/OpenAiTest.java index 2b860ebd7..5548ce2cb 100644 --- a/sample-code/spring-app/src/test/java/com/sap/ai/sdk/app/controllers/OpenAiTest.java +++ b/sample-code/spring-app/src/test/java/com/sap/ai/sdk/app/controllers/OpenAiTest.java @@ -1,6 +1,6 @@ package com.sap.ai.sdk.app.controllers; -import static com.sap.ai.sdk.foundationmodels.openai.OpenAiModel.GPT_4O_MINI; +import static com.sap.ai.sdk.foundationmodels.openai.OpenAiModel.GPT_5_MINI; import static com.sap.ai.sdk.foundationmodels.openai.generated.model.ChatCompletionResponseMessageRole.ASSISTANT; import static org.assertj.core.api.Assertions.assertThat; @@ -56,7 +56,7 @@ void streamChatCompletion() { final var usageRef = new AtomicReference(); final var filledDeltaCount = new AtomicInteger(0); - OpenAiClient.forModel(GPT_4O_MINI) + OpenAiClient.forModel(GPT_5_MINI) .streamChatCompletionDeltas(prompt) // foreach consumes all elements, closing the stream at the end .forEach(