Improve MistralAiApi Jackson mapping for message content#5585
Open
nicolaskrier wants to merge 1 commit intospring-projects:mainfrom
Open
Improve MistralAiApi Jackson mapping for message content#5585nicolaskrier wants to merge 1 commit intospring-projects:mainfrom
nicolaskrier wants to merge 1 commit intospring-projects:mainfrom
Conversation
c8aa779 to
220088c
Compare
6563ab1 to
830333d
Compare
nicolaskrier
commented
Mar 20, 2026
c5c1c6c to
9a30eae
Compare
6cd972a to
2dfbc35
Compare
2dfbc35 to
f734bfb
Compare
6e3a147 to
8f501d1
Compare
b438062 to
9e7cedf
Compare
afb55f9 to
778ddec
Compare
5a27aaf to
7678190
Compare
- Define different type of chunk instead of media content - Verify that new chunks allow reasoning models support - Introduce reasoning_effort request parameter for reasoning models - Remove unnecessary null checks in MistralAiChatModel - Improve existing Javadoc - Polish integration tests and unit tests Signed-off-by: Nicolas Krier <7557886+nicolaskrier@users.noreply.github.com>
7678190 to
a2ff51d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
reasoning_effortrequest parameter for reasoning models,MistralAiChatModel,Explanations
This PR aligns the Jackson mapping with the content types defined in the Mistral AI OpenAPI Specifications. The changes ensure null safety matches the OpenAPI Specifications requirements and introduce support for new content types used by Magistral 1.2 models. New reasoning on demand feature for Mistral Small 4 and Mistral Medium 3.5 models is also added in order to cover all Mistral reasoning models.
Proposed milestone
2.0.0-M6
Related work
spring-ai-mistral-ainull-safe #5354,ThinkingAssistantMessageclass reusable for each AI vendor #5698.Remaining tasks
MistralAiApi.ChatCompletionMessageunit tests demonstratingcontentattribute serialization and deserialization,MistralAiApi.ChatCompletionMessage.ContentSerializerunit tests,MistralAiApi.ChatCompletionMessage.ContentDeserializerunit tests,MistralAiApi.ChatCompletionMessage.extractContentunit tests,MistralAiApi.ChatCompletionMessage.extractThinkingContentunit tests,MistralAiApireasoning_effortparameter support for Mistral Small 4 and Mistral Medium 3.5,MistralAiChatOptionsreasoning_effortparameter support,MistralAiApiintegration tests demonstrating Mistral Small 4 and Mistral Medium 3.5 reasoning on demand feature,MistralAiApiintegration test includingMistralAiApi.ChatCompletionMessage.ImageUrlChunk,MistralAiApiintegration test includingMistralAiApi.ChatCompletionMessage.ReferenceChunk.