diff --git a/auto-configurations/models/spring-ai-autoconfigure-model-mistral-ai/src/main/java/org/springframework/ai/model/mistralai/autoconfigure/MistralAiChatProperties.java b/auto-configurations/models/spring-ai-autoconfigure-model-mistral-ai/src/main/java/org/springframework/ai/model/mistralai/autoconfigure/MistralAiChatProperties.java
index 4177a7e86f8..5479db24c33 100644
--- a/auto-configurations/models/spring-ai-autoconfigure-model-mistral-ai/src/main/java/org/springframework/ai/model/mistralai/autoconfigure/MistralAiChatProperties.java
+++ b/auto-configurations/models/spring-ai-autoconfigure-model-mistral-ai/src/main/java/org/springframework/ai/model/mistralai/autoconfigure/MistralAiChatProperties.java
@@ -35,7 +35,7 @@ public class MistralAiChatProperties extends MistralAiParentProperties {
public static final String CONFIG_PREFIX = "spring.ai.mistralai.chat";
- public static final String DEFAULT_CHAT_MODEL = MistralAiApi.ChatModel.SMALL.getValue();
+ public static final String DEFAULT_CHAT_MODEL = MistralAiApi.ChatModel.MISTRAL_SMALL.getValue();
private static final Double DEFAULT_TOP_P = 1.0;
diff --git a/auto-configurations/models/spring-ai-autoconfigure-model-mistral-ai/src/test/java/org/springframework/ai/model/mistralai/autoconfigure/tool/PaymentStatusBeanIT.java b/auto-configurations/models/spring-ai-autoconfigure-model-mistral-ai/src/test/java/org/springframework/ai/model/mistralai/autoconfigure/tool/PaymentStatusBeanIT.java
index 69f0e153a8e..5bad7da82e5 100644
--- a/auto-configurations/models/spring-ai-autoconfigure-model-mistral-ai/src/test/java/org/springframework/ai/model/mistralai/autoconfigure/tool/PaymentStatusBeanIT.java
+++ b/auto-configurations/models/spring-ai-autoconfigure-model-mistral-ai/src/test/java/org/springframework/ai/model/mistralai/autoconfigure/tool/PaymentStatusBeanIT.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -60,7 +60,8 @@ class PaymentStatusBeanIT {
void functionCallTest() {
this.contextRunner
- .withPropertyValues("spring.ai.mistralai.chat.options.model=" + MistralAiApi.ChatModel.LARGE.getValue())
+ .withPropertyValues(
+ "spring.ai.mistralai.chat.options.model=" + MistralAiApi.ChatModel.MISTRAL_LARGE.getValue())
.run(context -> {
MistralAiChatModel chatModel = context.getBean(MistralAiChatModel.class);
diff --git a/auto-configurations/models/spring-ai-autoconfigure-model-mistral-ai/src/test/java/org/springframework/ai/model/mistralai/autoconfigure/tool/PaymentStatusBeanOpenAiIT.java b/auto-configurations/models/spring-ai-autoconfigure-model-mistral-ai/src/test/java/org/springframework/ai/model/mistralai/autoconfigure/tool/PaymentStatusBeanOpenAiIT.java
index 1ebb98af66a..87f29a964d7 100644
--- a/auto-configurations/models/spring-ai-autoconfigure-model-mistral-ai/src/test/java/org/springframework/ai/model/mistralai/autoconfigure/tool/PaymentStatusBeanOpenAiIT.java
+++ b/auto-configurations/models/spring-ai-autoconfigure-model-mistral-ai/src/test/java/org/springframework/ai/model/mistralai/autoconfigure/tool/PaymentStatusBeanOpenAiIT.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -68,7 +68,8 @@ class PaymentStatusBeanOpenAiIT {
void functionCallTest() {
this.contextRunner
- .withPropertyValues("spring.ai.openai.chat.options.model=" + MistralAiApi.ChatModel.SMALL.getValue())
+ .withPropertyValues(
+ "spring.ai.openai.chat.options.model=" + MistralAiApi.ChatModel.MISTRAL_SMALL.getValue())
.run(context -> {
OpenAiChatModel chatModel = context.getBean(OpenAiChatModel.class);
diff --git a/auto-configurations/models/spring-ai-autoconfigure-model-mistral-ai/src/test/java/org/springframework/ai/model/mistralai/autoconfigure/tool/PaymentStatusPromptIT.java b/auto-configurations/models/spring-ai-autoconfigure-model-mistral-ai/src/test/java/org/springframework/ai/model/mistralai/autoconfigure/tool/PaymentStatusPromptIT.java
index 065f7a20468..665f6857d34 100644
--- a/auto-configurations/models/spring-ai-autoconfigure-model-mistral-ai/src/test/java/org/springframework/ai/model/mistralai/autoconfigure/tool/PaymentStatusPromptIT.java
+++ b/auto-configurations/models/spring-ai-autoconfigure-model-mistral-ai/src/test/java/org/springframework/ai/model/mistralai/autoconfigure/tool/PaymentStatusPromptIT.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -56,7 +56,8 @@ public class PaymentStatusPromptIT {
@Test
void functionCallTest() {
this.contextRunner
- .withPropertyValues("spring.ai.mistralai.chat.options.model=" + MistralAiApi.ChatModel.SMALL.getValue())
+ .withPropertyValues(
+ "spring.ai.mistralai.chat.options.model=" + MistralAiApi.ChatModel.MISTRAL_SMALL.getValue())
.run(context -> {
MistralAiChatModel chatModel = context.getBean(MistralAiChatModel.class);
diff --git a/auto-configurations/models/spring-ai-autoconfigure-model-mistral-ai/src/test/java/org/springframework/ai/model/mistralai/autoconfigure/tool/WeatherServicePromptIT.java b/auto-configurations/models/spring-ai-autoconfigure-model-mistral-ai/src/test/java/org/springframework/ai/model/mistralai/autoconfigure/tool/WeatherServicePromptIT.java
index ad1f052f714..00c5313e5a6 100644
--- a/auto-configurations/models/spring-ai-autoconfigure-model-mistral-ai/src/test/java/org/springframework/ai/model/mistralai/autoconfigure/tool/WeatherServicePromptIT.java
+++ b/auto-configurations/models/spring-ai-autoconfigure-model-mistral-ai/src/test/java/org/springframework/ai/model/mistralai/autoconfigure/tool/WeatherServicePromptIT.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -62,7 +62,8 @@ public class WeatherServicePromptIT {
@Test
void promptFunctionCall() {
this.contextRunner
- .withPropertyValues("spring.ai.mistralai.chat.options.model=" + MistralAiApi.ChatModel.LARGE.getValue())
+ .withPropertyValues(
+ "spring.ai.mistralai.chat.options.model=" + MistralAiApi.ChatModel.MISTRAL_LARGE.getValue())
.run(context -> {
MistralAiChatModel chatModel = context.getBean(MistralAiChatModel.class);
@@ -91,7 +92,8 @@ void promptFunctionCall() {
@Test
void functionCallWithPortableFunctionCallingOptions() {
this.contextRunner
- .withPropertyValues("spring.ai.mistralai.chat.options.model=" + MistralAiApi.ChatModel.LARGE.getValue())
+ .withPropertyValues(
+ "spring.ai.mistralai.chat.options.model=" + MistralAiApi.ChatModel.MISTRAL_LARGE.getValue())
.run(context -> {
MistralAiChatModel chatModel = context.getBean(MistralAiChatModel.class);
diff --git a/models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/MistralAiChatModel.java b/models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/MistralAiChatModel.java
index 431c25afc19..7be03f2ebf2 100644
--- a/models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/MistralAiChatModel.java
+++ b/models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/MistralAiChatModel.java
@@ -570,7 +570,7 @@ public static final class Builder {
.temperature(0.7)
.topP(1.0)
.safePrompt(false)
- .model(MistralAiApi.ChatModel.SMALL.getValue())
+ .model(MistralAiApi.ChatModel.MISTRAL_SMALL.getValue())
.build();
private ToolCallingManager toolCallingManager = DEFAULT_TOOL_CALLING_MANAGER;
diff --git a/models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/api/MistralAiApi.java b/models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/api/MistralAiApi.java
index e55987e91f2..823340cff19 100644
--- a/models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/api/MistralAiApi.java
+++ b/models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/api/MistralAiApi.java
@@ -248,9 +248,7 @@ public enum ChatCompletionFinishReason {
/**
* List of well-known Mistral chat models.
*
- * @see Mistral AI Models
- * Overview
+ * @see Mistral AI Models
*/
public enum ChatModel implements ChatModelDescription {
@@ -259,15 +257,17 @@ public enum ChatModel implements ChatModelDescription {
MAGISTRAL_MEDIUM("magistral-medium-latest"),
MISTRAL_MEDIUM("mistral-medium-latest"),
CODESTRAL("codestral-latest"),
- LARGE("mistral-large-latest"),
+ DEVSTRAL_MEDIUM("devstral-medium-latest"),
+ MISTRAL_LARGE("mistral-large-latest"),
PIXTRAL_LARGE("pixtral-large-latest"),
- MINISTRAL_3B_LATEST("ministral-3b-latest"),
- MINISTRAL_8B_LATEST("ministral-8b-latest"),
// Free Models
+ MINISTRAL_3B("ministral-3b-latest"),
+ MINISTRAL_8B("ministral-8b-latest"),
+ MINISTRAL_14B("ministral-14b-latest"),
MAGISTRAL_SMALL("magistral-small-latest"),
DEVSTRAL_SMALL("devstral-small-latest"),
- SMALL("mistral-small-latest"),
- PIXTRAL("pixtral-12b-2409"),
+ MISTRAL_SMALL("mistral-small-latest"),
+ PIXTRAL_12B("pixtral-12b-latest"),
// Free Models - Research
OPEN_MISTRAL_NEMO("open-mistral-nemo");
// @formatter:on
@@ -292,9 +292,7 @@ public String getName() {
/**
* List of well-known Mistral embedding models.
*
- * @see Mistral AI Models
- * Overview
+ * @see Mistral AI Models
*/
public enum EmbeddingModel {
diff --git a/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiChatClientIT.java b/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiChatClientIT.java
index a02bc33cd84..571b705d0e6 100644
--- a/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiChatClientIT.java
+++ b/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiChatClientIT.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -226,7 +226,7 @@ void functionCallTest() {
// @formatter:off
String response = ChatClient.create(this.chatModel).prompt()
- .options(MistralAiChatOptions.builder().model(MistralAiApi.ChatModel.SMALL).toolChoice(ToolChoice.AUTO).build())
+ .options(MistralAiChatOptions.builder().model(MistralAiApi.ChatModel.MISTRAL_SMALL).toolChoice(ToolChoice.AUTO).build())
.user(u -> u.text("What's the weather like in San Francisco, Tokyo, and Paris? Use parallel function calling if required. Response should be in Celsius."))
.toolCallbacks(FunctionToolCallback.builder("getCurrentWeather", new MockWeatherService())
.description("Get the weather in location")
@@ -248,7 +248,7 @@ void defaultFunctionCallTest() {
// @formatter:off
String response = ChatClient.builder(this.chatModel)
- .defaultOptions(MistralAiChatOptions.builder().model(MistralAiApi.ChatModel.SMALL).build())
+ .defaultOptions(MistralAiChatOptions.builder().model(MistralAiApi.ChatModel.MISTRAL_SMALL).build())
.defaultToolCallbacks(FunctionToolCallback.builder("getCurrentWeather", new MockWeatherService())
.description("Get the weather in location")
.inputType(MockWeatherService.Request.class)
@@ -270,7 +270,7 @@ void streamFunctionCallTest() {
// @formatter:off
Flux response = ChatClient.create(this.chatModel).prompt()
- .options(MistralAiChatOptions.builder().model(MistralAiApi.ChatModel.SMALL).build())
+ .options(MistralAiChatOptions.builder().model(MistralAiApi.ChatModel.MISTRAL_SMALL).build())
.user("What's the weather like in San Francisco, Tokyo, and Paris? Use parallel function calling if required. Response should be in Celsius.")
.toolCallbacks(FunctionToolCallback.builder("getCurrentWeather", new MockWeatherService())
.description("Get the weather in location")
@@ -291,7 +291,7 @@ void streamFunctionCallTest() {
@Test
void validateCallResponseMetadata() {
// String model = MistralAiApi.ChatModel.OPEN_MISTRAL_7B.getName();
- String model = MistralAiApi.ChatModel.PIXTRAL.getName();
+ String model = MistralAiApi.ChatModel.PIXTRAL_12B.getName();
// String model = MistralAiApi.ChatModel.PIXTRAL_LARGE.getName();
// @formatter:off
ChatResponse response = ChatClient.create(this.chatModel).prompt()
diff --git a/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiChatModelIT.java b/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiChatModelIT.java
index 38112b1e992..75d34be60be 100644
--- a/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiChatModelIT.java
+++ b/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiChatModelIT.java
@@ -16,7 +16,6 @@
package org.springframework.ai.mistralai;
-import java.io.IOException;
import java.net.URI;
import java.util.ArrayList;
import java.util.Arrays;
@@ -224,7 +223,7 @@ void functionCallTest() {
List messages = new ArrayList<>(List.of(userMessage));
var promptOptions = MistralAiChatOptions.builder()
- .model(MistralAiApi.ChatModel.SMALL.getValue())
+ .model(MistralAiApi.ChatModel.MISTRAL_SMALL.getValue())
.toolCallbacks(List.of(FunctionToolCallback.builder("getCurrentWeather", new MockWeatherService())
.description("Get the weather in location")
.inputType(MockWeatherService.Request.class)
@@ -249,7 +248,7 @@ void streamFunctionCallTest() {
List messages = new ArrayList<>(List.of(userMessage));
var promptOptions = MistralAiChatOptions.builder()
- .model(MistralAiApi.ChatModel.SMALL.getValue())
+ .model(MistralAiApi.ChatModel.MISTRAL_SMALL.getValue())
.toolCallbacks(List.of(FunctionToolCallback.builder("getCurrentWeather", new MockWeatherService())
.description("Get the weather in location")
.inputType(MockWeatherService.Request.class)
@@ -291,7 +290,7 @@ void multiModalityEmbeddedImage(String modelName) {
@ParameterizedTest(name = "{0} : {displayName} ")
@ValueSource(strings = { "pixtral-large-latest" })
- void multiModalityImageUrl(String modelName) throws IOException {
+ void multiModalityImageUrl(String modelName) {
var userMessage = UserMessage.builder()
.text("Explain what do you see on this picture?")
.media(List.of(Media.builder()
@@ -309,7 +308,7 @@ void multiModalityImageUrl(String modelName) throws IOException {
}
@Test
- void streamingMultiModalityImageUrl() throws IOException {
+ void streamingMultiModalityImageUrl() {
var userMessage = UserMessage.builder()
.text("Explain what do you see on this picture?")
.media(List.of(Media.builder()
@@ -341,7 +340,7 @@ void streamFunctionCallUsageTest() {
List messages = new ArrayList<>(List.of(userMessage));
var promptOptions = MistralAiChatOptions.builder()
- .model(MistralAiApi.ChatModel.SMALL.getValue())
+ .model(MistralAiApi.ChatModel.MISTRAL_SMALL.getValue())
.toolCallbacks(List.of(FunctionToolCallback.builder("getCurrentWeather", new MockWeatherService())
.description("Get the weather in location")
.inputType(MockWeatherService.Request.class)
diff --git a/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiChatModelObservationIT.java b/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiChatModelObservationIT.java
index 03ac09d993c..2397cbd33e5 100644
--- a/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiChatModelObservationIT.java
+++ b/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiChatModelObservationIT.java
@@ -70,7 +70,7 @@ void beforeEach() {
@Test
void observationForChatOperation() {
var options = MistralAiChatOptions.builder()
- .model(MistralAiApi.ChatModel.SMALL.getValue())
+ .model(MistralAiApi.ChatModel.MISTRAL_SMALL.getValue())
.maxTokens(2048)
.stop(List.of("this-is-the-end"))
.temperature(0.7)
@@ -94,7 +94,7 @@ void observationForChatOperation() {
@Test
void observationForStreamingChatOperation() {
var options = MistralAiChatOptions.builder()
- .model(MistralAiApi.ChatModel.SMALL.getValue())
+ .model(MistralAiApi.ChatModel.MISTRAL_SMALL.getValue())
.maxTokens(2048)
.stop(List.of("this-is-the-end"))
.temperature(0.7)
@@ -131,12 +131,12 @@ private void validate(ChatResponseMetadata responseMetadata) {
.doesNotHaveAnyRemainingCurrentObservation()
.hasObservationWithNameEqualTo(DefaultChatModelObservationConvention.DEFAULT_NAME)
.that()
- .hasContextualNameEqualTo("chat " + MistralAiApi.ChatModel.SMALL.getValue())
+ .hasContextualNameEqualTo("chat " + MistralAiApi.ChatModel.MISTRAL_SMALL.getValue())
.hasLowCardinalityKeyValue(LowCardinalityKeyNames.AI_OPERATION_TYPE.asString(),
AiOperationType.CHAT.value())
.hasLowCardinalityKeyValue(LowCardinalityKeyNames.AI_PROVIDER.asString(), AiProvider.MISTRAL_AI.value())
.hasLowCardinalityKeyValue(LowCardinalityKeyNames.REQUEST_MODEL.asString(),
- MistralAiApi.ChatModel.SMALL.getValue())
+ MistralAiApi.ChatModel.MISTRAL_SMALL.getValue())
.hasLowCardinalityKeyValue(LowCardinalityKeyNames.RESPONSE_MODEL.asString(),
StringUtils.hasText(responseMetadata.getModel()) ? responseMetadata.getModel()
: KeyValue.NONE_VALUE)
diff --git a/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiChatOptionsTests.java b/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiChatOptionsTests.java
index 22f4b36d5e4..c23750e0bc0 100644
--- a/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiChatOptionsTests.java
+++ b/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiChatOptionsTests.java
@@ -61,9 +61,9 @@ void testBuilderWithAllFields() {
@Test
void testBuilderWithEnum() {
MistralAiChatOptions optionsWithEnum = MistralAiChatOptions.builder()
- .model(MistralAiApi.ChatModel.MINISTRAL_8B_LATEST)
+ .model(MistralAiApi.ChatModel.MINISTRAL_8B)
.build();
- assertThat(optionsWithEnum.getModel()).isEqualTo(MistralAiApi.ChatModel.MINISTRAL_8B_LATEST.getValue());
+ assertThat(optionsWithEnum.getModel()).isEqualTo(MistralAiApi.ChatModel.MINISTRAL_8B.getValue());
}
@Test
diff --git a/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiRetryTests.java b/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiRetryTests.java
index f3d38e813ed..0bca6da127c 100644
--- a/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiRetryTests.java
+++ b/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiRetryTests.java
@@ -83,7 +83,7 @@ public void beforeEach() {
.temperature(0.7)
.topP(1.0)
.safePrompt(false)
- .model(MistralAiApi.ChatModel.SMALL.getValue())
+ .model(MistralAiApi.ChatModel.MISTRAL_SMALL.getValue())
.build())
.retryTemplate(this.retryTemplate)
.build();
diff --git a/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiTestConfiguration.java b/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiTestConfiguration.java
index 24a1661811a..4ca49940c4a 100644
--- a/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiTestConfiguration.java
+++ b/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiTestConfiguration.java
@@ -58,7 +58,8 @@ public MistralAiEmbeddingModel mistralAiEmbeddingModel(MistralAiApi api) {
public MistralAiChatModel mistralAiChatModel(MistralAiApi mistralAiApi) {
return MistralAiChatModel.builder()
.mistralAiApi(mistralAiApi)
- .defaultOptions(MistralAiChatOptions.builder().model(MistralAiApi.ChatModel.SMALL.getValue()).build())
+ .defaultOptions(
+ MistralAiChatOptions.builder().model(MistralAiApi.ChatModel.MISTRAL_SMALL.getValue()).build())
.build();
}
diff --git a/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/api/MistralAiApiIT.java b/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/api/MistralAiApiIT.java
index b913714d3e0..404d2f62328 100644
--- a/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/api/MistralAiApiIT.java
+++ b/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/api/MistralAiApiIT.java
@@ -48,7 +48,7 @@ public class MistralAiApiIT {
void chatCompletionEntity() {
ChatCompletionMessage chatCompletionMessage = new ChatCompletionMessage("Hello world", Role.USER);
ResponseEntity response = this.mistralAiApi.chatCompletionEntity(new ChatCompletionRequest(
- List.of(chatCompletionMessage), MistralAiApi.ChatModel.SMALL.getValue(), 0.8, false));
+ List.of(chatCompletionMessage), MistralAiApi.ChatModel.MISTRAL_SMALL.getValue(), 0.8, false));
assertThat(response).isNotNull();
assertThat(response.getBody()).isNotNull();
@@ -65,7 +65,7 @@ void chatCompletionEntityWithSystemMessage() {
""", Role.SYSTEM);
ResponseEntity response = this.mistralAiApi.chatCompletionEntity(new ChatCompletionRequest(
- List.of(systemMessage, userMessage), MistralAiApi.ChatModel.SMALL.getValue(), 0.8, false));
+ List.of(systemMessage, userMessage), MistralAiApi.ChatModel.MISTRAL_SMALL.getValue(), 0.8, false));
assertThat(response).isNotNull();
assertThat(response.getBody()).isNotNull();
@@ -75,7 +75,7 @@ void chatCompletionEntityWithSystemMessage() {
void chatCompletionStream() {
ChatCompletionMessage chatCompletionMessage = new ChatCompletionMessage("Hello world", Role.USER);
Flux response = this.mistralAiApi.chatCompletionStream(new ChatCompletionRequest(
- List.of(chatCompletionMessage), MistralAiApi.ChatModel.SMALL.getValue(), 0.8, true));
+ List.of(chatCompletionMessage), MistralAiApi.ChatModel.MISTRAL_SMALL.getValue(), 0.8, true));
assertThat(response).isNotNull();
assertThat(response.collectList().block()).isNotNull();
diff --git a/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/api/tool/MistralAiApiToolFunctionCallIT.java b/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/api/tool/MistralAiApiToolFunctionCallIT.java
index 7c689433b0d..a4ba4778c16 100644
--- a/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/api/tool/MistralAiApiToolFunctionCallIT.java
+++ b/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/api/tool/MistralAiApiToolFunctionCallIT.java
@@ -48,7 +48,7 @@
@EnabledIfEnvironmentVariable(named = "MISTRAL_AI_API_KEY", matches = ".+")
public class MistralAiApiToolFunctionCallIT {
- static final String MISTRAL_AI_CHAT_MODEL = MistralAiApi.ChatModel.LARGE.getValue();
+ static final String MISTRAL_AI_CHAT_MODEL = MistralAiApi.ChatModel.MISTRAL_LARGE.getValue();
private final Logger logger = LoggerFactory.getLogger(MistralAiApiToolFunctionCallIT.class);
diff --git a/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/api/tool/PaymentStatusFunctionCallingIT.java b/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/api/tool/PaymentStatusFunctionCallingIT.java
index aba86d7b795..622ba613ae8 100644
--- a/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/api/tool/PaymentStatusFunctionCallingIT.java
+++ b/models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/api/tool/PaymentStatusFunctionCallingIT.java
@@ -78,7 +78,7 @@ private static T jsonToObject(String json, Class targetClass) {
@Test
@SuppressWarnings("null")
- public void toolFunctionCall() throws JsonProcessingException {
+ public void toolFunctionCall() {
var transactionJsonSchema = """
{
@@ -109,8 +109,9 @@ public void toolFunctionCall() throws JsonProcessingException {
MistralAiApi mistralApi = MistralAiApi.builder().apiKey(System.getenv("MISTRAL_AI_API_KEY")).build();
- ResponseEntity response = mistralApi.chatCompletionEntity(new ChatCompletionRequest(messages,
- MistralAiApi.ChatModel.LARGE.getValue(), List.of(paymentStatusTool, paymentDateTool), ToolChoice.AUTO));
+ ResponseEntity response = mistralApi
+ .chatCompletionEntity(new ChatCompletionRequest(messages, MistralAiApi.ChatModel.MISTRAL_LARGE.getValue(),
+ List.of(paymentStatusTool, paymentDateTool), ToolChoice.AUTO));
ChatCompletionMessage responseMessage = response.getBody().choices().get(0).message();
@@ -135,7 +136,7 @@ public void toolFunctionCall() throws JsonProcessingException {
}
response = mistralApi
- .chatCompletionEntity(new ChatCompletionRequest(messages, MistralAiApi.ChatModel.LARGE.getValue()));
+ .chatCompletionEntity(new ChatCompletionRequest(messages, MistralAiApi.ChatModel.MISTRAL_LARGE.getValue()));
var responseContent = response.getBody().choices().get(0).message().content();
logger.info("Final response: " + responseContent);