From 2ca05aba464ae2f76a86c158ad2250a708b6f39c Mon Sep 17 00:00:00 2001 From: I538344 Date: Mon, 6 Oct 2025 11:29:25 +0200 Subject: [PATCH 1/2] feat: [Orchestration] Added MistralAI model --- .../orchestration/OrchestrationAiModel.java | 20 +++++++++++++++++-- .../SpringAiAgenticWorkflowService.java | 1 - .../SpringAiOrchestrationService.java | 1 - 3 files changed, 18 insertions(+), 4 deletions(-) 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 38c61e69b..e91a0de40 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 @@ -62,6 +62,10 @@ public class OrchestrationAiModel { public static final OrchestrationAiModel MISTRAL_SMALL_INSTRUCT = new OrchestrationAiModel("mistralai--mistral-small-instruct"); + /** MistralAI Mistral Medium Instruct model */ + public static final OrchestrationAiModel MISTRAL_MEDIUM_INSTRUCT = + new OrchestrationAiModel("mistralai--mistral-medium-instruct"); + /** * MistralAI Mixtral 8x7B Instruct v01 model * @@ -104,11 +108,23 @@ public class OrchestrationAiModel { public static final OrchestrationAiModel CLAUDE_3_HAIKU = new OrchestrationAiModel("anthropic--claude-3-haiku"); - /** Anthropic Claude 3 Opus model */ + /** + * Anthropic Claude 3 Opus model + * + * @deprecated This model is deprecated on AI Core. The suggested replacement model is {@link + * OrchestrationAiModel#CLAUDE_4_OPUS}. + */ + @Deprecated public static final OrchestrationAiModel CLAUDE_3_OPUS = new OrchestrationAiModel("anthropic--claude-3-opus"); - /** Anthropic Claude 3.5 Sonnet model */ + /** + * Anthropic Claude 3.5 Sonnet model + * + * @deprecated This model is deprecated on AI Core. The suggested replacement model is {@link + * OrchestrationAiModel#CLAUDE_4_SONNET}. + */ + @Deprecated public static final OrchestrationAiModel CLAUDE_3_5_SONNET = new OrchestrationAiModel("anthropic--claude-3.5-sonnet"); diff --git a/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/SpringAiAgenticWorkflowService.java b/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/SpringAiAgenticWorkflowService.java index 009582489..1d0af4bcf 100644 --- a/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/SpringAiAgenticWorkflowService.java +++ b/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/SpringAiAgenticWorkflowService.java @@ -48,7 +48,6 @@ public ChatResponse runAgent(@Nonnull final String userInput) { val options = new OrchestrationChatOptions(config); options.setToolCallbacks( List.of(ToolCallbacks.from(new WeatherMethod(), new RestaurantMethod()))); - options.setInternalToolExecutionEnabled(true); // Prompts for the chain workflow final List systemPrompts = diff --git a/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/SpringAiOrchestrationService.java b/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/SpringAiOrchestrationService.java index c7ec8bbac..369d5a53d 100644 --- a/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/SpringAiOrchestrationService.java +++ b/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/SpringAiOrchestrationService.java @@ -203,7 +203,6 @@ public ChatResponse toolCallingMcp() { // GPT-4o-mini doesn't work too well with the file system tool, so we use 4o here val options = new OrchestrationChatOptions(config.withLlmConfig(GPT_4O)); options.setToolCallbacks(List.of(toolCallbackProvider.getToolCallbacks())); - options.setInternalToolExecutionEnabled(true); val sys = new SystemMessage( From db8c4c470930a73f8b16f5d312c0f3e080cfbdbb Mon Sep 17 00:00:00 2001 From: I538344 Date: Mon, 6 Oct 2025 11:33:07 +0200 Subject: [PATCH 2/2] feat: [Orchestration] Added MistralAI model --- docs/release_notes.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/release_notes.md b/docs/release_notes.md index a71ae2db9..20a0ef6f8 100644 --- a/docs/release_notes.md +++ b/docs/release_notes.md @@ -40,12 +40,15 @@ + SAPDocumentTranslationOutputTargetLanguage.create("de-DE")) .sourceLanguage("en-US"))); ``` +- [Orchestration] Deprecated models `OrchestrationAiModel.CLAUDE_3_OPUS` and `OrchestrationAiModel.CLAUDE_3_5_SONNET`. + - Replacement are respectively `OrchestrationAiModel.CLAUDE_4_OPUS` and `OrchestrationAiModel.CLAUDE_4_SONNET`. ### ✨ New Functionality - [Orchestration] Added embedding generation support with new `OrchestrationClient#embed()` methods. - Added `OrchestrationEmbeddingModel` with `TEXT_EMBEDDING_3_SMALL`, `TEXT_EMBEDDING_3_LARGE`, `AMAZON_TITAN_EMBED_TEXT` and `NVIDIA_LLAMA_32_NV_EMBEDQA_1B` embedding models. - Introduced `OrchestrationEmbeddingRequest` for building requests fluently and `OrchestrationEmbeddingResponse#getEmbeddingVectors()` to retrieve embeddings. +- [Orchestration] Added new model `OrchestrationAiModel.MISTRAL_MEDIUM_INSTRUCT`. ### 📈 Improvements