github spring-projects/spring-ai v1.1.0-M4
Spring AI 1.1.0-M4

pre-releaseone day ago

Spring AI 1.1.0-M4 Release Notes

🎯 Highlights

This release includes 27 new features, 35 bug fixes, 15 documentation improvements, 41 other improvements.

⚠️ Upgrading Notes

  • Migrate from the deprecated public constructor to the builder pattern when creating QuestionAnswerAdvisor instances adf4efe

📢 Noteworthy

  • Two commits related to MCP ObjectMapper factory and JSON schema upgrade were reverted to maintain stability. 132d50b
  • Updated OpenAI moderation integration from deprecated text-moderation-latest to the new omni-moderation-latest model, including integration test updates #4722
  • Updated Anthropic integration tests to remove usage of deprecated model versions 9e78796
  • The public constructor of QuestionAnswerAdvisor is now deprecated in favor of using the builder pattern for improved API design adf4efe

⭐ New Features

  • Advisors now support configurable observations, providing better control over observability behavior in AI workflows. 3cf3db1
  • Chat client now logs completion data and makes response text available in the Observation Context for improved monitoring and debugging. 13de219
  • Added support for Oracle JDBC in ChatMemoryRepository, enabling Oracle database backends for conversation memory storage 30af4e8
  • Added support for recursive advisor execution, enabling advisors to call other advisors in a chain. Includes two new built-in advisors to facilitate advanced use cases. 323c590
  • Introduced H2ChatMemoryRepositoryDialect to enable H2 database support for JDBC-based chat memory storage. 0b0024e
  • Added Oracle and SQLite database dialect support for JDBC chat memory, expanding database compatibility options. 673f483
  • Expanded OpenAI integration to support more transcription and text-to-speech (TTS) models, providing greater flexibility for audio processing. bdb7ea5
  • Enhanced TextSplitter functionality to preserve document properties and track metadata through text splitting operations, improving RAG pipeline capabilities. b452e89
  • Added support for Anthropic's Citations API, enabling retrieval of source citations in model responses e91eda9
  • Added support for Mistral AI's codestral embedding model for code-focused embedding generation ea48e17
  • Added usage field to ChatCompletionChunk for ZhipuAI to track token consumption during streaming operations d619727
  • Added additional timeout configuration options for AWS Bedrock to provide more granular control over request timeouts 34fc691
  • Added User-Agent header with 'spring-ai' value to OpenAI API client for better request identification and tracking 62fc70f
  • Enables prompt caching functionality for AWS Bedrock Converse API to improve performance and reduce costs by caching frequently used prompts. 58cf35e
  • Adds approximate k-nearest neighbor search capabilities to the OpenSearch vector store integration for improved query performance on large datasets. 5df83cb
  • Introduces new testing utilities to simplify Spring AI test configuration and improve developer experience when writing tests. 8b9f730
  • Introduced a unified request context API for Model Context Protocol (MCP) integration with enhanced documentation 3e6084c
  • Added Builder class to FactCheckingEvaluator for more convenient and flexible configuration #4652
  • Added tool choice capability for Anthropic chat model allowing better control over function calling behavior #4637
  • Applications can now provide custom RouterFunction implementations for enhanced routing control b99f26d
  • Enhanced MimeTypeDetector to handle URLs with query parameters and added comprehensive edge case validation tests 3f79373
  • Added STErrorListener bridge to SLF4J for improved error logging and diagnostics 940bcf3
  • Enhanced filter expression parsing to support long integer values, expanding query capabilities in vector store operations 107ab68
  • Introduces builder pattern support for ToolResponseMessage, improving API usability and message construction 2ded9cd
  • Added builder pattern support for ZhiPuAiAssistantMessage class with corresponding unit tests for improved API usability 01082b8
  • Added builder pattern support for DeepSeekAssistantMessage class with corresponding unit tests for improved API usability 7d0aff0
  • Added support for OpenAI's File API, enabling file uploads and management capabilities for OpenAI models 087393b

🪲 Bug Fixes

  • Resolved integration test failures in the Elasticsearch module. a572009
  • Corrected broken documentation link in Google GenAI integration guide bb91c5f
  • Resolved issues with streaming responses in Azure OpenAI chat model integration 50db344
  • Corrected message ordering issues affecting MySQL and MariaDB databases in JDBC-based chat memory storage d2492a6
  • Fixed issue where MCP tool callback providers were incorrectly injected into the tool callback resolver febf86c
  • Updated and improved the FactCheckingEvaluator for better accuracy and reliability in fact-checking operations. e81cd08
  • Corrects the SYSTEM_ONLY cache strategy implementation to properly handle caching behavior without explicit configuration requirements. 38ea4ff
  • Resolves multiple streaming issues including correct finish reason handling when stop reason is not tool_use, proper finish reason population for non-tool_use cases, and ensures multiple tool calls are correctly output in ChatResponse. a897177
  • Updates the CONVERSATION_HISTORY cache strategy to follow Anthropic's recommended incremental caching pattern for optimal performance. 8327c0f
  • Fixed auto-configuration to properly scan for @McpToolListChanged and related MCP annotations 0fdb911
  • Fixed exception handling in DeepSeekStreamFunctionCallingHelper when toolCalls() returns an empty list instead of null, correcting a flawed ternary expression 68d176f via #4586
  • Fixed handling of candidates containing both text and tool calls in VertexAiGeminiChatModel 8e8654e via #4596
  • Removed @ImportAutoConfiguration from AzureOpenAiChatAutoConfiguration to fix configuration issues d9c9d30 via #4634
  • Fixed PDF document grouping to properly respect the pagesPerDocument configuration setting aeb9f8a
  • Corrected the keep_alive parameter format for Ollama embedding requests f32b122
  • Resolved issue where OllamaApi bean was not properly registered in the Spring context 1b69fd5
  • Fixed potential NullPointerException in the getDefaultUsage method of AnthropicChatModel a7582f0
  • Cleaned up redundant annotation configuration in auto-configuration classes 369db3c
  • Corrects auto-configuration issues in the ElevenLabs model provider integration 133eb40
  • Resolves auto-configuration problems in the ZhiPuAI model provider integration 5bf0e37
  • Addresses auto-configuration issues in AWS Bedrock Converse proxy integration f8c7644
  • Corrects visibility scope issues with the ConnectionDetails class to prevent exposure outside its defined scope b4392c5
  • Resolves issues in the StreamableMcpAnnotationsManualIT integration test bd51e34
  • Corrected Javadoc documentation for the CosmosDBChatMemory class #4572
  • Resolved auto-configuration issues for the DeepSeek model provider f7d8f0f
  • Resolved auto-configuration issues for the MiniMax model provider b26b2c6
  • Resolved auto-configuration issues for the Oracle Cloud Infrastructure (OCI) GenAI model provider edb036d
  • Resolved auto-configuration issues for MistralAI model integration ad69fd7
  • Corrected integration test failures for Google GenAI model provider 26bab76
  • Resolved auto-configuration issues for Google GenAI model integration 86f013d
  • Resolved auto-configuration issues for OpenAI model integration 0ae56f7
  • Resolved auto-configuration issues for Anthropic model integration 110605f
  • Fixed autoconfiguration ordering to ensure MCP Tools are configured before ChatClient, preventing initialization issues #4553
  • Resolved multiple VertexAI autoconfiguration issues including import corrections and configuration setup problems 9e0e3cd, d9f5f09
  • Fixed required field handling for proper validation and configuration #4547

📓 Documentation

  • Enhanced documentation and examples for configuring MCP Server-Sent Events (SSE) URLs. 357190d
  • Removed misleading documentation about activation order for MCP clients #4665
  • Corrected documentation that had reversed descriptions for retrieval query and document concepts 0ee96f1
  • Updated documentation to clarify that PgVector schema initialization requires explicit opt-in configuration. 6854e3e
  • Documented that Spring Boot Actuator is required for observability features to function properly abb0b89
  • Replaced README.md with package-info.java in converter package for better JavaDoc integration cb4af07
  • Corrects typographical errors in project documentation. 8620c20
  • Converted documentation format to AsciiDoc for improved documentation tooling d7977aa
  • Added documentation for the toolChoice property in Anthropic model configuration ffe11b4
  • Corrected typo in documentation 935ef80
  • Removed obsolete semicolon from documentation b2dd1c9
  • Fixed incorrect configuration property key in ZhipuAI documentation 1780e88
  • Added comprehensive documentation for the OpenAI File API integration 3b98b94
  • Corrected the @SInCE version annotation in Mistral AI OCR documentation 0e1885f
  • Updated documentation to reflect deprecation of legacy function-related configuration options in chat models #4541

🔨 Dependency Upgrades

  • Upgraded Model Context Protocol SDK to version 0.15.0 and annotations library to version 0.6.0. a2d00d1
  • Updated JSON schema dependency versions for better consistency across modules. 53064d9
  • Updated jsonschema dependency to version 4.38.0 and qualified ObjectMapper in MCP module a9b0763
  • Updated Spring Boot dependency to version 3.5.7, bringing the latest bug fixes and improvements from the Spring Boot framework. db9ac2f
  • Updated Cassandra integration to leverage native QueryBuilder vector support instead of custom implementation 3fc1ed6
  • Updated MCP (Model Context Protocol) dependency to version 0.15.0-SN #4564
  • Updated mcp-annotations dependency to latest snapshot version #4555

⚡ Performance

  • Optimized Jackson annotation detection to return early, improving overall performance 6a34458
  • Added factory for standardized ObjectMapper configuration in MCP server implementations, improving consistency and performance 4273328
  • Optimized vector operations by eliminating unnecessary validation checks on each operation 177cd69
  • Improves logging performance by eliminating unnecessary string concatenation in log statements 7e563d0

🔩 Build Updates

  • Removed concurrency configuration from GitHub CI workflow to improve build efficiency. 0f404ff
  • Adjusted the frequency of scheduled CI runs for optimized resource usage. c319792
  • Refactored and cleaned up the parent pom.xml file f616cd9
  • Expanded test coverage for JsonSchemaConverter to ensure proper property handling 6593762
  • Added test to verify that ToolCallbackResolver doesn't inadvertently use MCP ToolCallbackProviders 68e5324
  • Cleaned up codebase by removing unused internal specifications, reducing maintenance burden. e0a7d74
  • Added comprehensive tests to ensure OpenAI API builder maintains proper immutability and configuration isolation. 062e494
  • Stopped using arrays as annotation attribute values where feasible in auto-configurations for cleaner code 77473d6
  • Refactored User-Agent header implementation in OpenAiApi with constants and additional test coverage f6ff20a
  • Added test coverage for OpenAiModerationProperties to improve code quality cc9c2cd
  • Expands test coverage for AnnotatedMethodDiscovery class to ensure reliability and maintainability. 967d00c
  • Improves test coverage for PostgresML embedding options to ensure proper validation and configuration handling. 838801f
  • Modernizes test assertions by using AssertJ's assertThatException for improved test readability and consistency. 4e0457e
  • Added comprehensive null parameter validation test coverage c03a5ca
  • Renamed classes for improved naming consistency across the codebase 2a916db
  • Enhanced test code quality and addressed Sonar suggestions for better maintainability fa68d1e
  • Modernizes codebase by adopting contemporary Java language features and idioms d3c9de1
  • Enhances builder class design by marking builder classes as final, preventing unintended inheritance 0403a2a
  • Expands test coverage with comprehensive validation tests for the MultiQueryExpander component 26c803e
  • Reverted Kotlin version upgrade from 2.2.20 back to 1.9.25 after Java 25 testing 37b1fd0
  • Added additional test coverage for edge cases in the PDF TextLine class e90f1a0
  • Improved and refined integration tests for the MistralAI model provider 8883689
  • Added extensive test suite for DefaultToolCallingManager to improve code quality and reliability d148ca2
  • Refactored MCP tests to leverage autoconfiguration and added ChatClient integration examples 5ab9365

🙏 Contributors

Thanks to all contributors who made this release possible:

Don't miss a new spring-ai release

NewReleases is sending notifications on new releases.