New
Spring AI 2.0.0-M2
Spring AI 2.0.0-M2 Release Notes
🎯 Highlights
This release includes 20 new features, 20 bug fixes, 16 documentation improvements, 38 other improvements.
⏪ Breaking Changes
- The Anthropic Skills API has been unified and helper classes have been renamed, which may require code changes if you're using the Anthropic integration directly #5299
- The SemanticCache interface has been relocated from the Redis-specific package to a more generic package location, which may require import statement updates for applications directly using this interface. #5284
- The Couchbase vector store classes have been relocated to a new dedicated package structure. Applications using Couchbase vector store will need to update their import statements. #5233
⚠️ Upgrading Notes
- If you are using the Anthropic Skills API directly, review your code for the renamed helper classes and update accordingly #5299
- If you are using the Couchbase vector store, update your import statements to reference the new dedicated package location. #5233
⭐ New Features
- Ollama embedding models now support configuring the dimensions parameter, allowing control over the size of generated embeddings 4bd83ba
- JSON schema can now be customized, providing more flexibility for structured output generation 3119086
- Default API endpoint paths are now configured for OpenAI's content moderation API, simplifying integration setup #5300
- Default API endpoint paths are now configured for OpenAI's audio API (speech and transcription), making it easier to use audio capabilities f7eeaf9
- Added support for using Amazon S3 as a vector store backend for storing and retrieving embeddings cd86d38
- Integrated Infinispan as a new vector store option, providing distributed in-memory data grid capabilities for embedding storage 9b105b8
🪲 Bug Fixes
- Resolved an issue where ToolCallAdvisor would not preserve system messages when memory functionality was disabled 1dac9d0
- Fixed incorrect observation provider usage in the Google GenAI embedding model implementation #5227
- Corrected conditional logic in Infinispan AutoConfiguration to ensure proper bean creation #5295
- Resolved issues in the MistralAiChatModelIT.chatClientEntityWithStructuredOutput integration test to ensure proper validation of structured output functionality. cf2212b
- Corrected code style violations in the spring-ai-redis-semantic-cache module to maintain code quality standards. 0108011
- Fixed MCP auto-configuration to work properly in non-web application contexts #5261
- Improved exception handling in the ChromaApi for better error reporting e291712
📓 Documentation
- Updated documentation for Prompt-related functionality 190fe98
- Added documentation for the configurable content_field_name feature in Qdrant vector store 002a208
- Added documentation for the new configuration properties that allow customization of OpenAI speech, transcription, and moderation API endpoints. f8ad209
- Updated documentation to cover the native structured output converter functionality for Mistral AI models. a9f49a0
- Added comprehensive documentation for the new Redis semantic cache feature, including configuration and usage examples 77e115f
- Corrected duplicated step numbering in RetrievalAugmentationAdvisor documentation for improved clarity #5160
- General typo corrections throughout documentation
🔨 Dependency Upgrades
- Updated the Model Context Protocol (MCP) SDK dependency to version 0.17.2 d81e47d
- Updated Spring Boot dependency to version 4.0.1 5f1e021
- Updated Mistral AI chat model enumeration to reflect latest available models b77202c
- Updated OpenAI Java SDK dependency to version 4.13.0, bringing latest improvements and compatibility updates #5187
🔩 Build Updates
- Updated static analysis tools NullAway and Error Prone to their latest versions for improved code quality checks d232c82
- Migrated S3 Vector Store to use JSpecify nullability annotations for improved null safety 24aeed5
- Made ResponseErrorHandler configurable as an optional bean for more flexible error handling daa08c8
- Added JSpecify nullability annotations to document-readers modules to improve null-safety and IDE support. #5287
- Added JSpecify nullability annotations to the RedisSemanticCache module for better null-safety guarantees. #5284
- Added JSpecify null-safety annotations to Redis, Weaviate, Typesense, Qdrant, Pinecone, pgvector, Oracle, OpenSearch, Neo4j, and MongoDB Atlas vector store modules to improve type safety and IDE support #5268
- Added JSpecify null-safety annotations to Milvus and additional vector store modules for improved type safety ,
🙏 Contributors
Thanks to all the community contributors who made this release possible: