Skip to content

Spring AI 2.0.0-M1

Pre-release
Pre-release

Choose a tag to compare

@ilayaperumalg ilayaperumalg released this 11 Dec 21:52
· 7 commits to main since this release

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
  • Official OpenAI Java SDK integration - Added native integration with the official OpenAI Java SDK for improved compatibility and functionality 15df47d

⭐ 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, and metadata fields 798ab17
  • New finalization hook in ToolCallAdvisor enables custom logic execution after tool call loops complete, enhancing function calling workflow control #5064
  • Added comprehensive Claude Skills integration including support for the Files API, enabling advanced file handling capabilities with Anthropic's Claude models. bd90625
  • Added support for ISNULL and ISNOTNULL filter expressions in vector store queries, enabling better null value handling in metadata filtering. 0b87c78
  • Added ThinkingLevel configuration option to control extended thinking capabilities in supported models, allowing fine-grained control over reasoning depth. 740a61c
  • Added safety ratings to response metadata for Vertex AI Gemini models, providing visibility into content safety assessments. 2710cab
  • Made ToolCallAdvisor extensible by introducing hook methods, allowing developers to customize tool calling behavior and implement custom logic around function execution. #5004
  • Added support for the latest Claude 4.5 models including Opus and Haiku variants with updated model enums and documentation 01ace16
  • Google GenAI integration now supports thought signatures when using Gemini 3 Pro for function calling, enabling more advanced reasoning capabilities 3cb0879
  • GemFire Vector Store now supports authentication via username and password credentials 839e6ed
  • Enhanced OpenSearch vector store to omit explicit IDs when manageDocumentIds=false, improving compatibility with AWS OpenSearch Serverless deployments. Includes additional unit and integration tests. d82eec3
  • Added native integration with the official OpenAI Java SDK for improved compatibility and functionality 15df47d
  • ChatClient now supports native structured output, enabling direct conversion of chat responses to typed objects 195c4fd
  • Added prompt_tokens_details tracking for ZhipuAI model and updated default chat options for tests 89a3b32
  • Exposed seed parameter in Vertex AI configuration for reproducible results 4f1ab6a
  • Added Spring Boot web and REST client dependencies explicitly to model starters for better compatibility #4949 via #4948
  • Introduced auto-configuration support for AWS Bedrock profiles and replaced deprecated functionality 552263d
  • McpClientAutoConfiguration now supports optional handlers registry, improving flexibility in MCP client configuration #4920 via #4917
  • ClientMcp handlers registries now support beans with unresolvable types, enhancing compatibility with various Spring configurations #4918 via #4917
  • New Spring Boot starter added for Azure Cosmos DB chat memory repository, enabling easier integration of chat conversation history with Cosmos DB. ef8f413

πŸͺ² 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
  • Corrected MariaDB schema validator to properly handle escaped spaces, eliminating false positive validation errors. 9acc2d7
  • Resolved native compilation problems when using GraalVM with Java 22, ensuring proper native image generation for Spring AI applications. a49e159
  • Addressed issue-4999 by removing the use of DEFAULT_TEMPERATURE to resolve configuration issues fe9e781
  • Resolved issue where OpenAI GPT models running on Amazon Bedrock were returning null responses. 050b9f1
  • Added missing OCIGenAiInferenceClientAutoConfiguration to Spring Boot autoconfiguration imports, ensuring proper auto-configuration for Oracle Cloud Infrastructure GenAI integration. 3e0040f
  • Added several missing auto-configuration classes to autoconfiguration import, improving Spring Boot integration. 258b6bc
  • Resolved issues in OpenSearchVectorStoreIT to ensure reliable integration testing. d4b6cf2
  • Corrected documentation typo in DefaultChatClientUtils. 7af2593
  • Corrected vector indexing algorithm acronym from HSNW to HNSW (Hierarchical Navigable Small World). 186808d
  • Improved retry logic for Oracle Vector Store integration test container startup to reduce flaky tests 8a6e39d
  • Resolved issues with ElasticSearch vector store integration tests 7f30987
  • Resolved issues with MongoDB Atlas vector store integration tests ad07a81
  • Resolved issues with RedisVectorStoreObservationIT and RedisVectorStoreIT integration tests a7b837a
  • Restored ResourceAccessException to the retry policy to ensure proper retry handling for resource access failures. f3eb842
  • Resolved issues in MongoDB chat memory auto-configuration integration tests. ce7381c
  • Fixed issues in Docker Compose integration tests to improve test stability. d7a6435
  • Resolved compatibility issues with MongoDB index creation across different Spring Data MongoDB versions. e87b2ba
  • Corrected issues in Typesense vector store integration tests. 106778d
  • Refactored retry logic to centralize exception handling, improving consistency and maintainability across all AI model implementations. #4905

πŸ““ 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 5ce998e

πŸ”¨ 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
  • Upgraded spring-javaformat-maven-plugin to version 0.0.47 920e6f4
  • Updated to use Testcontainers dependencies from Spring Boot BOM and latest OpenSearch Testcontainers version compatible with Java 17 fbd8b7f
  • Updated to Spring Boot 4.0.0-RC2, bringing in the latest features and improvements from the Spring Boot 4.x line. d5e92be

πŸ”© 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
  • Updated copyright year and author information in SpringAiCoreRuntimeHintsTests to reflect current maintenance. 4969dbc
  • Integrated Maven Build Cache plugin to improve build performance 147f85a
  • Updated Maven compiler configuration to avoid forking processes during compilation bd7d4cd
  • Disabled ErrorProne standard checks in the build configuration to address build compatibility issues. #4976
  • Resolved multiple build system issues to improve build reliability and consistency. 3b14b4a
  • Updated fast-continuous integration workflow configuration for the 1.1.x branch dc4b6ad
  • Integrated ErrorProne static analysis tool with Nullaway for enhanced null safety checking during builds #4903
  • Added Maven toolchains support for improved build consistency across different development environments d26637b
  • Incremented version to 2.0.0-SNAPSHOT for next development cycle. 10bc0a7
  • Incremented version to 1.1.1-SNAPSHOT for next development cycle. 9970432

πŸ” 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: