Skip to content

Commit c87d3c4

Browse files
n-o-u-r-h-a-nn-o-u-r-s-a-pbot-sdk-js
authored
feat: [Orchestration] Adding New Models (#485)
* Added 4 new Orchestration Models * Fixed Naming of the new models * Fixed spacing in release notes * Added some new models and deprecated other models as well * Deprecated the MIXTRAL_8X7B_INSTRUCT_V01 model and added its replacement. * Fixed naming of the comment about a deprecated model * Adding and Deprecating Models in OpenAiModel to match with the OrchestratonAiModel Class * Formatting * Fixed Format of OpenAiModel Class * Added changes made to OpenAiModel to release notes. * Fixed changes in OpenAiModel Class and release notes part associated with it. --------- Co-authored-by: Nourhan Shata <[email protected]> Co-authored-by: SAP Cloud SDK Bot <[email protected]>
1 parent f530ddf commit c87d3c4

File tree

3 files changed

+108
-19
lines changed

3 files changed

+108
-19
lines changed

docs/release_notes.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@
2121
- The same applies to helper methods `DpiMasking#createConfig()` and `MaskingProvider#createConfig()`.
2222
- [Orchestration] `OrchestrationTemplate.withTemplate()` has been deprecated. Please use `OrchestrationTemplate.withTemplateMessages()` instead.
2323
- [Orchestration] The method `createConfig()` is removed from `ContentFilter`, `AzureContentFilter` and `LlamaGuardFilter` and is replaced by `createInputFilterConfig()` and `createOutputFilterConfig()`.
24+
- [Orchestration] Deprecated : `LLAMA3_1_70B_INSTRUCT`, `CLAUDE_3_SONNET`, `TITAN_TEXT_LITE`, `TITAN_TEXT_EXPRESS`, `GPT_4`, `GPT_4_0613`, `MIXTRAL_8X7B_INSTRUCT_V01`.
25+
- `GPT_4` and `GPT_4_0613` are replaced by : `GPT_40`or `GPT_41`.
26+
- `CLAUDE_3_SONNET` is replaced by `CLAUDE_4_SONNET`.
27+
- `MIXTRAL_8X7B_INSTRUCT_V01` is replaced by `MISTRAL_SMALL_INSTRUCT`.
28+
- [OpenAI] Deprecated : `GPT_4`.
29+
- `GPT_4`is replaced by : `GPT_40`or `GPT_41`.
2430

2531
- [Prompt Registry] Resource group has been added as a optional parameter to all endpoints. Set it to `"default"` if it was not set before. Examples:
2632
- `client.importPromptTemplate(File)` --> `client.importPromptTemplate("default", File)`.
@@ -35,6 +41,7 @@
3541

3642
- [Orchestration] Added support for [transforming a JSON output into an entity](https://sap.github.io/ai-sdk/docs/java/orchestration/chat-completion#json_schema)
3743
- [Orchestration] Added `AzureContentFilter#promptShield()` available for input filtering.
44+
- [Orchestration] Added new models for `OrchestrationAiModel`: `GEMINI_2_5_FLASH`, `GEMINI_2_5_PRO`, `ALEPHALPHA_PHARIA_1_7B_CONTROL`, `OPENAI_O4_MINI`, `CLAUDE_4_OPUS`, `CLAUDE_4_SONNET`, `OPENAI_O3`.
3845

3946
### 📈 Improvements
4047

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,18 @@ public record OpenAiModel(@Nonnull String name, @Nullable String version) implem
4545
@Deprecated
4646
public static final OpenAiModel GPT_35_TURBO_16K = new OpenAiModel("gpt-35-turbo-16k", null);
4747

48-
/** Azure OpenAI GPT-4 model */
49-
public static final OpenAiModel GPT_4 = new OpenAiModel("gpt-4", null);
48+
/**
49+
* Azure OpenAI GPT-4 model
50+
*
51+
* @deprecated This model is deprecated on AI Core with a planned retirement on 2025-09-01. The
52+
* suggested replacement model is {@link OpenAiModel#GPT_4O} or {@link OpenAiModel#GPT_41}.
53+
*/
54+
@Deprecated public static final OpenAiModel GPT_4 = new OpenAiModel("gpt-4", null);
5055

5156
/**
5257
* Azure OpenAI GPT-4 model
5358
*
54-
* @deprecated This model is deprecated on AI Core with a planned retirement on 2025-05-13. The
55-
* suggested replacement model is {@link OpenAiModel#GPT_4O}.
59+
* @deprecated This model is deprecated on AI Core.
5660
*/
5761
@Deprecated public static final OpenAiModel GPT_4_32K = new OpenAiModel("gpt-4-32k", null);
5862

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

Lines changed: 93 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -52,25 +52,45 @@ public class OrchestrationAiModel {
5252
public static final OrchestrationAiModel MISTRAL_LARGE_INSTRUCT =
5353
new OrchestrationAiModel("mistralai--mistral-large-instruct");
5454

55-
/** MistralAI Mixtral 8x7B Instruct v01 model */
55+
/** MistralAI Mistral Small Instruct model */
56+
public static final OrchestrationAiModel MISTRAL_SMALL_INSTRUCT =
57+
new OrchestrationAiModel("mistralai--mistral-small-instruct");
58+
59+
/**
60+
* MistralAI Mixtral 8x7B Instruct v01 model
61+
*
62+
* @deprecated This model is deprecated on AI Core. The suggested replacement model is {@link
63+
* OrchestrationAiModel#MISTRAL_SMALL_INSTRUCT}.
64+
*/
65+
@Deprecated
5666
public static final OrchestrationAiModel MIXTRAL_8X7B_INSTRUCT_V01 =
5767
new OrchestrationAiModel("mistralai--mixtral-8x7b-instruct-v01");
5868

5969
/**
6070
* Meta Llama3 70B Instruct model
6171
*
62-
* @deprecated This model is deprecated on AI Core with a planned retirement on 2024-12-15. The
63-
* suggested replacement model is {@link OrchestrationAiModel#LLAMA3_1_70B_INSTRUCT}.
72+
* @deprecated This model is deprecated on AI Core.
6473
*/
6574
@Deprecated
6675
public static final OrchestrationAiModel LLAMA3_70B_INSTRUCT =
6776
new OrchestrationAiModel("meta--llama3-70b-instruct");
6877

69-
/** Meta Llama3.1 70B Instruct model */
78+
/**
79+
* Meta Llama3.1 70B Instruct model
80+
*
81+
* @deprecated This model is deprecated on AI Core with a planned retirement on 2025-07-30.
82+
*/
83+
@Deprecated
7084
public static final OrchestrationAiModel LLAMA3_1_70B_INSTRUCT =
7185
new OrchestrationAiModel("meta--llama3.1-70b-instruct");
7286

73-
/** Anthropic Claude 3 Sonnet model */
87+
/**
88+
* Anthropic Claude 3 Sonnet model
89+
*
90+
* @deprecated This model is deprecated on AI Core with a planned retirement on 2025-07-21. The
91+
* suggested replacement model is {@link OrchestrationAiModel#CLAUDE_4_SONNET}.
92+
*/
93+
@Deprecated
7494
public static final OrchestrationAiModel CLAUDE_3_SONNET =
7595
new OrchestrationAiModel("anthropic--claude-3-sonnet");
7696

@@ -90,11 +110,29 @@ public class OrchestrationAiModel {
90110
public static final OrchestrationAiModel CLAUDE_3_7_SONNET =
91111
new OrchestrationAiModel("anthropic--claude-3.7-sonnet");
92112

93-
/** Amazon Titan Text Lite model */
113+
/** Anthropic Claude 4 Opus model */
114+
public static final OrchestrationAiModel CLAUDE_4_OPUS =
115+
new OrchestrationAiModel("anthropic--claude-4-opus");
116+
117+
/** Anthropic Claude 4 Sonnet model */
118+
public static final OrchestrationAiModel CLAUDE_4_SONNET =
119+
new OrchestrationAiModel("anthropic--claude-4-sonnet");
120+
121+
/**
122+
* Amazon Titan Text Lite model
123+
*
124+
* @deprecated This model is deprecated on AI Core with a planned retirement on 2025-08-15.
125+
*/
126+
@Deprecated
94127
public static final OrchestrationAiModel TITAN_TEXT_LITE =
95128
new OrchestrationAiModel("amazon--titan-text-lite");
96129

97-
/** Amazon Titan Text Express model */
130+
/**
131+
* Amazon Titan Text Express model
132+
*
133+
* @deprecated This model is deprecated on AI Core with a planned retirement on 2025-08-15.
134+
*/
135+
@Deprecated
98136
public static final OrchestrationAiModel TITAN_TEXT_EXPRESS =
99137
new OrchestrationAiModel("amazon--titan-text-express");
100138

@@ -112,7 +150,7 @@ public class OrchestrationAiModel {
112150
/**
113151
* Azure OpenAI GPT-3.5 Turbo model
114152
*
115-
* @deprecated This model is deprecated on AI Core with a planned retirement on 2025-02-13. The
153+
* @deprecated This model is deprecated on AI Core with a planned retirement on 2025-09-01. The
116154
* suggested replacement model is {@link OrchestrationAiModel#GPT_4O_MINI}.
117155
*/
118156
@Deprecated
@@ -121,8 +159,7 @@ public class OrchestrationAiModel {
121159
/**
122160
* Azure OpenAI GPT-3.5 Turbo model
123161
*
124-
* @deprecated This model is deprecated on AI Core with a planned retirement on 2025-02-13. The
125-
* suggested replacement model is {@link OrchestrationAiModel#GPT_4O_MINI}.
162+
* @deprecated This model is deprecated on AI Core.
126163
*/
127164
@Deprecated
128165
public static final OrchestrationAiModel GPT_35_TURBO_16K =
@@ -131,25 +168,48 @@ public class OrchestrationAiModel {
131168
/**
132169
* Azure OpenAI GPT-3.5 Turbo model
133170
*
134-
* @deprecated This model is deprecated on AI Core with a planned retirement on 2025-02-22. The
171+
* @deprecated This model is deprecated on AI Core with a planned retirement on 2025-09-01. The
135172
* suggested replacement model is {@link OrchestrationAiModel#GPT_4O_MINI}.
136173
*/
137174
@Deprecated
138175
public static final OrchestrationAiModel GPT_35_TURBO_0125 =
139176
new OrchestrationAiModel("gpt-35-turbo-0125");
140177

141-
/** Azure OpenAI GPT-4 model */
142-
public static final OrchestrationAiModel GPT_4 = new OrchestrationAiModel("gpt-4");
178+
/**
179+
* Azure OpenAI GPT-4 model
180+
*
181+
* @deprecated This model is deprecated on AI Core with a planned retirement on 2025-09-01. The
182+
* suggested replacement model is {@link OrchestrationAiModel#GPT_4O} or {@link
183+
* OrchestrationAiModel#GPT_41}.
184+
*/
185+
@Deprecated public static final OrchestrationAiModel GPT_4 = new OrchestrationAiModel("gpt-4");
186+
187+
/** Azure OpenAI GPT-4.1-mini model */
188+
public static final OrchestrationAiModel GPT_41_MINI = new OrchestrationAiModel("gpt-4.1-mini");
189+
190+
/** Azure OpenAI GPT-4.1 model */
191+
public static final OrchestrationAiModel GPT_41 = new OrchestrationAiModel("gpt-4.1");
192+
193+
/** Azure OpenAI GPT-4.1-nano model */
194+
public static final OrchestrationAiModel GPT_41_NANO = new OrchestrationAiModel("gpt-4.1-nano");
143195

144196
/**
145197
* Azure OpenAI GPT-4 model
146198
*
147-
* @deprecated This model is deprecated on AI Core with a planned retirement on 2025-05-13. The
148-
* suggested replacement model is {@link OrchestrationAiModel#GPT_4O}.
199+
* @deprecated This model is deprecated on AI Core.
149200
*/
150201
@Deprecated
151202
public static final OrchestrationAiModel GPT_4_32K = new OrchestrationAiModel("gpt-4-32k");
152203

204+
/**
205+
* Azure OpenAI GPT-4 version 0613 model
206+
*
207+
* @deprecated This model is deprecated on AI Core.The suggested replacement model is {@link
208+
* OrchestrationAiModel#GPT_4O} or {@link OrchestrationAiModel#GPT_41}.
209+
*/
210+
@Deprecated
211+
public static final OrchestrationAiModel GPT_4_0613 = new OrchestrationAiModel("gpt-4-0613");
212+
153213
/** Azure OpenAI GPT-4o model */
154214
public static final OrchestrationAiModel GPT_4O = new OrchestrationAiModel("gpt-4o");
155215

@@ -162,6 +222,12 @@ public class OrchestrationAiModel {
162222
/** Azure OpenAI o3-mini model */
163223
public static final OrchestrationAiModel OPENAI_O3_MINI = new OrchestrationAiModel("o3-mini");
164224

225+
/** Azure OpenAI o4-mini model */
226+
public static final OrchestrationAiModel OPENAI_O4_MINI = new OrchestrationAiModel("o4-mini");
227+
228+
/** Azure OpenAI o3 model */
229+
public static final OrchestrationAiModel OPENAI_O3 = new OrchestrationAiModel("o3");
230+
165231
/**
166232
* Google Cloud Platform Gemini 1.0 Pro model
167233
*
@@ -189,6 +255,18 @@ public class OrchestrationAiModel {
189255
public static final OrchestrationAiModel GEMINI_2_0_FLASH_LITE =
190256
new OrchestrationAiModel("gemini-2.0-flash-lite");
191257

258+
/** Google Cloud Platform Gemini 2.5 Flash model */
259+
public static final OrchestrationAiModel GEMINI_2_5_FLASH =
260+
new OrchestrationAiModel("gemini-2.5-flash");
261+
262+
/** Google Cloud Platform Gemini 2.5 Pro model */
263+
public static final OrchestrationAiModel GEMINI_2_5_PRO =
264+
new OrchestrationAiModel("gemini-2.5-pro");
265+
266+
/** Alephalpha-pharia-1-7b-control model */
267+
public static final OrchestrationAiModel ALEPHALPHA_PHARIA_1_7B_CONTROL =
268+
new OrchestrationAiModel("alephalpha-pharia-1-7b-control");
269+
192270
/** DeepSeek-R1 */
193271
public static final OrchestrationAiModel DEEPSEEK_R1 =
194272
new OrchestrationAiModel("deepseek-ai--deepseek-r1");

0 commit comments

Comments
 (0)