Skip to content

Commit 6465576

Browse files
authored
chore: Fix integration tests (#630)
* Add missing model * Add missing model
1 parent 7338f1a commit 6465576

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ public class OrchestrationAiModel {
140140
public static final OrchestrationAiModel CLAUDE_4_SONNET =
141141
new OrchestrationAiModel("anthropic--claude-4-sonnet");
142142

143+
/** Anthropic Claude 4.5 Sonnet model */
144+
public static final OrchestrationAiModel CLAUDE_4_5_SONNET =
145+
new OrchestrationAiModel("anthropic--claude-4.5-sonnet");
146+
143147
/**
144148
* Amazon Titan Text Lite model
145149
*

sample-code/spring-app/src/test/java/com/sap/ai/sdk/app/controllers/OrchestrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ void testOutputFilteringLenient() {
296296
assertThat(response.getContent()).isNotEmpty();
297297

298298
var filterResult = response.getOriginalResponse().getIntermediateResults().getOutputFiltering();
299-
assertThat(filterResult.getMessage()).containsPattern("0 of \\d+ choices failed");
299+
assertThat(filterResult.getMessage()).containsPattern("Choice 0: Output Filter was skipped");
300300
}
301301

302302
@Test

sample-code/spring-app/src/test/java/com/sap/ai/sdk/app/controllers/SpringAiOrchestrationTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ void testOutputFilteringStrict() {
104104
.getOriginalResponse()
105105
.getIntermediateResults()
106106
.getOutputFiltering();
107-
assertThat(filterResult.getMessage()).containsPattern("1 of 1 choices failed");
107+
assertThat(filterResult.getMessage())
108+
.contains("Choice 0: LLM response filtered due to safety violations");
108109
}
109110

110111
@Test
@@ -122,7 +123,7 @@ void testOutputFilteringLenient() {
122123
.getOriginalResponse()
123124
.getIntermediateResults()
124125
.getOutputFiltering();
125-
assertThat(filterResult.getMessage()).containsPattern("0 of \\d+ choices failed");
126+
assertThat(filterResult.getMessage()).contains("Choice 0: Output Filter was skipped");
126127
}
127128

128129
@Test

0 commit comments

Comments
 (0)