66import static com .github .tomakehurst .wiremock .client .WireMock .urlPathEqualTo ;
77import static org .assertj .core .api .Assertions .assertThat ;
88
9+ import com .sap .ai .sdk .core .model .AiModelBaseDataAllowedScenariosInner ;
910import com .sap .ai .sdk .core .model .AiModelVersion ;
1011import com .sap .ai .sdk .core .model .AiScenarioLabel ;
12+ import java .util .Map ;
1113import lombok .val ;
1214import org .apache .hc .core5 .http .HttpStatus ;
1315import org .junit .jupiter .api .Test ;
@@ -156,15 +158,37 @@ void getScenarioModels() {
156158 "count": 1,
157159 "resources": [
158160 {
161+ "accessType": "Remote",
162+ "allowedScenarios": [
163+ {
164+ "executableId": "aicore-opensource",
165+ "scenarioId": "foundation-models"
166+ },
167+ {
168+ "executableId": "orchestration",
169+ "scenarioId": "orchestration"
170+ }
171+ ],
159172 "description": "Mistral mixtral-8x7b-instruct-v01 model",
173+ "displayName": "Mistral FooBar",
160174 "executableId": "aicore-opensource",
161175 "model": "mistralai--mixtral-8x7b-instruct-v01",
176+ "provider": "Mistral",
162177 "versions": [
163178 {
179+ "capabilities": ["text-generation"],
180+ "orchestrationCapabilities": [],
181+ "contextLength": 8000,
182+ "cost": [
183+ {"inputCost": "0.00086"},
184+ {"outputCost": "0.00158"}
185+ ],
164186 "deprecated": false,
187+ "inputTypes": ["text"],
165188 "isLatest": true,
166189 "name": "202407",
167- "retirementDate": ""
190+ "retirementDate": "",
191+ "streamingSupported": true
168192 }
169193 ]
170194 }
@@ -182,11 +206,29 @@ void getScenarioModels() {
182206 assertThat (scenario .getDescription ()).isEqualTo ("Mistral mixtral-8x7b-instruct-v01 model" );
183207 assertThat (scenario .getExecutableId ()).isEqualTo ("aicore-opensource" );
184208 assertThat (scenario .getModel ()).isEqualTo ("mistralai--mixtral-8x7b-instruct-v01" );
209+ assertThat (scenario .getAccessType ()).isEqualTo ("Remote" );
210+ assertThat (scenario .getDisplayName ()).isEqualTo ("Mistral FooBar" );
211+ assertThat (scenario .getProvider ()).isEqualTo ("Mistral" );
212+ assertThat (scenario .getAllowedScenarios ())
213+ .containsExactly (
214+ AiModelBaseDataAllowedScenariosInner .create ()
215+ .scenarioId ("foundation-models" )
216+ .executableId ("aicore-opensource" ),
217+ AiModelBaseDataAllowedScenariosInner .create ()
218+ .scenarioId ("orchestration" )
219+ .executableId ("orchestration" ));
185220
186221 AiModelVersion aiModelVersion = scenario .getVersions ().get (0 );
187222 assertThat (aiModelVersion .getName ()).isEqualTo ("202407" );
188223 assertThat (aiModelVersion .isIsLatest ()).isTrue ();
189224 assertThat (aiModelVersion .isDeprecated ()).isFalse ();
190225 assertThat (aiModelVersion .getRetirementDate ()).isEmpty ();
226+ assertThat (aiModelVersion .getCapabilities ()).containsExactly ("text-generation" );
227+ assertThat (aiModelVersion .getOrchestrationCapabilities ()).isEmpty ();
228+ assertThat (aiModelVersion .getContextLength ()).isEqualTo (8000 );
229+ assertThat (aiModelVersion .getInputTypes ()).containsExactly ("text" );
230+ assertThat (aiModelVersion .isStreamingSupported ()).isTrue ();
231+ assertThat (aiModelVersion .getCost ())
232+ .containsExactly (Map .of ("inputCost" , "0.00086" ), Map .of ("outputCost" , "0.00158" ));
191233 }
192234}
0 commit comments