Spring AI 2.0.0-M1
Spring AI 2.0.0-M1 Release Notes
🎯 Highlights
Spring AI 2.0.0-M1 represents the first milestone of the 2.x series, built on Spring Boot 4.0 and Spring Framework 7.0. This major platform upgrade, contributed by Dmitry Bedrin with Paul Bakker from Netflix (#4774), brings modern Java capabilities and positions Spring AI for the next generation of AI application development.
This release includes 24 new features, 25 bug fixes, 7 documentation improvements, and 32 other improvements across 90 commits.
⏪ Breaking Changes
- The default temperature configuration has been removed from model implementations. Applications relying on default temperature values will need to explicitly configure temperature settings. ce1a7fc
- The default chat model for OpenAI has been updated from the previous default to gpt-5-mini. Applications relying on the implicit default may experience different behavior. 8c093f1
⚠️ Upgrading Notes
- With the removal of default temperature options, ensure your application explicitly sets temperature values in model configurations where required. ce1a7fc
- If your application depends on the default OpenAI chat model, verify that gpt-5-mini meets your requirements or explicitly configure your preferred model in application properties 8c093f1
📢 Noteworthy
- If you're building Spring AI from source on the main branch, ensure you have Java 21 or higher installed while Java 17 is still the baseline for consuming the Spring AI 2.x binaries. 8ca583d
- Spring Boot 4.0 and Spring Framework 7.0 upgrade - This release marks a major platform upgrade from Spring Boot 3.x to Spring Boot 4.0 GA and Spring Framework 7.0. Thanks to Dmitry Bedrin (@bedrin) with Paul Bakker from Netflix (@pbakker) for the comprehensive upgrade effort (#4774). This includes major version upgrades for Kotlin (2.2.21), Rest Assured (5.5.6), swagger-codegen (3.0.75), and Testcontainers (2.0.1). d5e92be, a2a5e1b
- The default chat model for OpenAI integration has been updated to gpt-5-mini, reflecting the latest recommended model from OpenAI 8c093f1
⭐ New Features
- Added Redis-based chat memory repository implementation with Spring Boot starter for persistent conversation management across sessions 95f7481
- New auto-configuration starter enabling easy setup of Redis-based chat memory with minimal configuration 99b2976
- Added text search capabilities, range query support, and HNSW index parameter tuning for improved vector search performance in Redis c160b9c
- TokenTextSplitter now supports custom punctuation marks, allowing more flexible text segmentation for different languages and text formats 9773099
- Azure Vector Store now supports custom field names, enabling integration with existing Azure AI Search indexes that use non-default field naming conventions instead of hardcoded
content,embedding, andmetadatafields 798ab17 - New finalization hook in ToolCallAdvisor enables custom logic execution after tool call loops complete, enhancing function calling workflow control #5064
🪲 Bug Fixes
- Updated outdated Milvus JSON fields documentation link in MilvusFilterExpressionConverter Javadoc #5028
- Resolved test issues with ChatClient tools using generic argument types 9e857ec
- Updated runtime hints for AWS Bedrock integration 0427650
- Enhanced error handling for JSON parsing in the MethodToolCallback class to provide better error messages and handle malformed JSON in tool/function calling scenarios. #5032 via #3924
- Corrected handling of punctuation marks in the TokenTextSplitter to ensure proper text splitting behavior. e065965
- Resolved issue where the extraBody parameter was not being properly included in OpenAI API requests, ensuring all custom parameters are now correctly transmitted. 264fc3b
📓 Documentation
- Added comprehensive documentation for the new Redis-based chat memory repository implementation aa74331
- Enhanced ChatClient documentation to include complete coverage of all available ChatMemoryRepository implementations 0463997
- Added Maven Central badge for easier discovery of latest release versions bc50b96
- New documentation covering the custom punctuation marks feature in TokenTextSplitter e59be78
- Documentation added for configuring custom field names when working with Azure AI Search indexes 757ed9e
- Updated documentation and workflow files following the removal of the Maven toolchains plugin. d890ede
- Updated Redis vector store documentation to point to the correct search query documentation
🔨 Dependency Upgrades
- Upgraded Google Generative AI SDK from previous version to 1.30.0 abd5082
- Updated Model Context Protocol (MCP) support with latest JDK and annotation versions to improve MCP integration capabilities. 28891ab, e15d318
- Cleaned up duplicate dependency entry for Azure Identity in the build configuration. 0eaf938
- Updated io.swagger.core.v3:swagger-annotations from version 2.2.30 to 2.2.38. e16d75a
- Upgraded to Spring Boot 4.0.0 GA release a2a5e1b
- Updated MCP and MCP annotations to latest versions 0bb7e5c
🔩 Build Updates
- Fixed checkstyle execution in build process 738c033
- Resolved checkstyle formatting issues across codebase c5a7042
- Improved CI/CD efficiency by generalizing the PR check workflow and enabling build caching 5ef6305
- Optimized build cache settings for improved build performance cd76cf9
- Updated build configuration to require Java 21 or higher for the main development branch. 8ca583d
- Removed Maven toolchains plugin from the build configuration with corresponding documentation updates. d890ede
- Modified visibility of toolCallingManager field to protected to allow better extensibility for custom implementations. ea5477e
🔐 Security
- Overrode protobuf-java version in milvus-store module to address CVE-2024-7254 security vulnerability. 24795dd
🙏 Contributors
Thanks to all the community contributors who made this release possible: