Releases: spring-projects/spring-ai
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
- Added support for Amazon Bedrock Knowledge Base as a vector store, enabling integration with AWS's managed knowledge base service 21c3834
- Enhanced the Redis semantic cache module with improved functionality and performance 7233e8d
- Made the content field name configurable in QdrantVectorStore, allowing customization of the field used to store document content f65756e
- Added a convenience method to the Prompt class for easily retrieving system messages 8a79390
- Added native support for structured outputs using JSON schema validation in the Mistral AI chat model, enabling type-safe responses with automatic schema enforcement. 8757c5b
- OpenAI moderation, audio speech, and audio transcription API paths are now configurable, allowing customization for proxy setups or alternative OpenAI-compatible endpoints. 1d38aec
- Migrated to use Spring Boot 4's native MongoDB Atlas container support for improved testing and development experience. 5b39fbb
- Introduced Mcp*ServerCustomizer interfaces to allow customization of MCP server configurations #5261
- Added new Redis-based semantic cache advisor implementation, enabling intelligent caching of semantically similar queries to improve performance and reduce API calls 391cbbb
- OllamaChatOptions now implements StructuredOutputChatOptions with corresponding methods, unit tests, and integration tests. Enhanced JSON format handling for Ollama chat options 163df2e
- Improved model provider detection logic for Microsoft Foundry integration, providing better model identification and configuration support 5c18a40
- Add support for dynamic tool schema enhancement, allowing runtime modification of tool argument definitions for more flexible function calling 3c4b6dc
- Add conversationHistoryEnabled option to ToolCallAdvisor, providing finer control over whether conversation history is included in tool call contexts 5ad8485
- Add JSpecify annotations to commons module for improved null-safety analysis and compile-time verification #5101
๐ชฒ 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
- Fixed failing Ollama integration tests by modifying tool descriptions to better guide the model in providing geographical coordinates 864487f
- Enhanced JdbcChatMemoryRepositorySchemaInitializer for improved database schema setup d202db1
- Corrected string parsing issues in the grammar implementation 8ecc334
- Corrected invalid Filter.Expression constructor usage in documentation examples #5243
- Resolved checkstyle violations in Redis auto-configuration code to maintain code quality standards 07ccd2c
- Resolved token count inconsistencies in Ollama integration tests that occurred with varying model versions c2dfedb
- Updated Anthropic integration tests to use the currently active model for improved test reliability 5982176
- Added explicit null safety check to prevent potential NullPointerException in Neo4jChatMemory MediaBuilder e4c2fb4
- Fixed missing dependency artifacts for Redis chat memory repository in the Bill of Materials, ensuring proper dependency management for projects using Redis-based chat memory. 81427bb
- Fixed an issue where the Neo4jVectorStore's doAdd method was ignoring the sessionConfig parameter, ensuring proper session configuration handling during document addition. #5200 via #5191
- Fixed an issue where chat memory advisors could not properly handle ToolResponseMessage types, improving compatibility with tool-based conversations #5174
- Resolve build issues with Antora documentation generation 95bf79a
- Corrected exception message validation in ChromaDB HTTP client/server communication [5dcac7b](https://gi...
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
- 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, andmetadatafields 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 ...
Spring AI 1.1.2 - Bug Fixes
Spring AI 1.1.2 Release Notes
๐ฏ Highlights
This patch release focuses on bug fixes, security improvements and dependency management. It includes a bug fix to make Spring AI 1.1.x still compatible with Kotlin 1.9.x, a security fix for the Milvus vector store addressing CVE-2024-7254, updates to MCP (Model Context Protocol) dependencies, and a new hook in the ToolCallAdvisor for enhanced tool calling workflows.
โญ New Features
- Introduces a new hook method in ToolCallAdvisor that allows customization of the finalization loop in tool call workflows, providing better extensibility for advanced tool calling scenarios 05254e7
๐ชฒ Bug Fixes
- Cleaned up duplicate dependency declaration for Azure Identity library, improving build consistency db7d44d
๐จ Dependency Upgrades
- Upgraded Model Context Protocol (MCP) JDK and MCP annotations from snapshot versions to stable releases, improving stability and compatibility 4cfe9fa
๐ฉ Build Updates
- Updated build configuration to require exact Java 21 version for the 1.1.x release branch, ensuring consistent build environment d563007
๐ Security
- Overrode protobuf-java version in milvus-store dependency to address security vulnerability CVE-2024-7254 65b6c7d
๐ Contributors
Thanks to all contributors who made this release possible:
Spring AI 1.1.1
Spring AI 1.1.1 Release Notes
๐ฏ Highlights
This release includes 13 new features, 16 bug fixes, 3 documentation improvements, 11 other improvements.
โญ New Features
- Added native integration with the official OpenAI Java SDK, providing improved type safety and API coverage for OpenAI model interactions. e56b344
- ChatClient now supports native structured output, enabling more reliable and type-safe extraction of structured data from model responses. 3c3c3eb
- Integrated Claude Skills API with support for the Files API, enabling file-based interactions and enhanced Claude model capabilities. b7a36bb
- Backported Skills API support fixes to the 1.1.x maintenance branch for improved stability and consistency across versions. a1f32d1
- Added support for ISNULL and ISNOTNULL filter expressions in vector store queries, enabling null value checks in filter operations. 8e9ad36
- Introduced ThinkingLevel configuration support in ThinkingConfig to provide more control over reasoning and thinking processes. 7e6da6e
- Enhanced Vertex Gemini integration to include safety ratings in response metadata, providing visibility into content safety assessments. f4eb375
- The ToolCallAdvisor now supports extensibility through hook methods, allowing developers to customize tool call behavior in their applications 2c8c4e7
- GemFire Vector Store now supports username and password authentication for secure connections 21db782
- Added support for thought signatures in Google GenAI's Gemini 3 Pro model when using function calling capabilities 9bdf182
- Added support for the latest Claude 4.5 models including Opus and Haiku variants with updated documentation 2c7b10e
- Added prompt_tokens_details support and updated default chat options for ZhipuAI integration tests a66e243
- Introduces a new Spring Boot starter that provides auto-configuration for using Azure Cosmos DB as a chat memory repository, simplifying the setup for persisting conversation history in Spring AI applications. ef8f413
๐ชฒ Bug Fixes
- Enhanced error handling for JSON parsing failures in MethodToolCallback, providing better diagnostics and recovery. d4f22ce
- Fixed tool execution exception handling in MethodToolCallback for improved error reporting and stability. b0a97c7
- Changed toolCallingManager visibility to protected, enabling proper extensibility for custom implementations. 4585acd
- Corrected TokenTextSplitter behavior when handling punctuation marks to ensure proper text segmentation. 8cc4ea4
- Resolved issue where the extraBody parameter was not being properly included in OpenAI API requests, ensuring custom request bodies are sent correctly. 0646d1e
- Fixed MariaDBSchemaValidator to correctly handle escaped spaces and eliminate misleading error messages during schema validation. f0268c0
- Resolved GraalVM native image compilation issues when using Java 22, improving compatibility and build success. 2cb1daa
- Fixed missing auto-configuration for OCI GenAI Inference client to ensure proper initialization 808dd7e
- Resolved missing auto-configuration classes to ensure all components are properly registered 3cc3a79
- Corrected issue where OpenAI gpt-oss models running on Amazon Bedrock returned null responses 88e03cd
- OpenSearch vector store now omits explicit IDs when manageDocumentIds=false, improving AWS Serverless compatibility with additional unit and integration tests 3618524
- Resolved issues in OpenSearch vector store integration tests 0f0f33e
- MCP client auto-configuration now supports optional handlers registry configuration #4920
- ClientMcp handlers registry now properly handles beans with unresolvable types #4918
- Fixed MongoDB vector store index creation to work across different Spring Data MongoDB versions 0821f48
- Enhanced retry logic for Oracle Vector Store integration test container startup 9950cf7
๐ Documentation
- Updated broken documentation link for Redis search queries to point to current documentation 1fa0e07
- Corrected typo in code comments for DefaultChatClientUtils a56380b
- Corrected documentation typo for HNSW (Hierarchical Navigable Small World) algorithm f476626
๐จ Dependency Upgrades
- Updated Apache Commons Lang to 3.18.0 to address CVE (Uncontrolled Recursion vulnerability). af6496a
- Updated Apache Commons Compress to 1.28.0 to fix CVEs (Infinite Loop and Resource Allocation vulnerabilities). 82424f8
- Updated Spring Boot dependency to version 3.5.8, bringing latest bug fixes and improvements from the Spring Boot framework. 2c854d3
- Updated io.swagger.core.v3:swagger-annotations from 2.2.30 to 2.2.38 1119293
- Updated MCP library dependencies to latest versions 5fcc557
๐ฉ Build Updates
- Cleaned up obsolete CI workflow configuration to streamline build and deployment processes. e08a614
- Updated Kotlin compiler version to ensure compatibility with JDK 25, enabling builds on the latest Java development kit. 62b3290
- Updated copyright information in test files to reflect current year and authorship. a7e3752
- Updated CI workflow configuration for the 1.1.x branch 0d89fb9
- Updated project version to 1.1.1-SNAPSHOT for ongoing development. 9970432
๐ Security
- Applied security patches by upgrading commons-lang3 to 3.18.0 (CVE: Uncontrolled Recursion) and commons-compress to 1.28.0 (CVEs: Infinite Loop, Resource Allocation). af6496a
๐ Contributors
Thanks to all the community contributors who made this release possible:
Spring AI 1.1.0
Spring AI 1.1.0 GA Release Notes
๐ฏ Highlights
This release includes 1 new features, 10 bug fixes, 3 documentation improvements, 3 other improvements.
โญ New Features
- Enhanced ChatCompletionRequest to support dynamic field deserialization using @JsonAnySetter annotation for extraBody properties 3fc939a
๐ชฒ Bug Fixes
- Resolved an issue where MongoChatMemoryIndexCreator component was not being properly scanned during Spring application context initialization faf3808
- Added validation for inputSchema in Model Context Protocol (MCP) tool definitions to ensure proper tool configuration #4855 via #4776
- Improved error handling for malformed responses from the OpenAI API to prevent unexpected failures c0cc32c
- Changed PgVectorSchemaValidator class visibility to package-private to properly encapsulate internal implementation details #4857
- Refactored StatelessToolCallbackConverterAutoConfiguration and ToolCallbackConverterAutoConfiguration for better code organization #4858
- Corrected Maven dependency configuration for the MongoDB chat memory repository integration 374c09e
- Fixed inconsistent conditional property configuration for ElevenLabs auto-configuration to follow Spring AI standards d71869e
- Resolved Java bytecode access issue related to invokespecial instruction 9cec4d7
- Refactored ToolCallbackProvider dependency injection to use Spring's ObjectProvider for better flexibility and optional dependency handling e4926e5
- Cleaned up excessive debug logging statements in AnthropicChatModel implementation #4847
๐ Documentation
- Improved documentation for the audio transcription API with clearer examples and usage guidance f167df8
- Corrected broken hyperlink in the Model Context Protocol (MCP) overview documentation page b6ccb03
- Updated UserMessage code examples in documentation to properly demonstrate builder pattern usage 68adc26
๐จ Dependency Upgrades
- Updated Model Context Protocol (MCP) integration to version 0.16.0 #4860
๐ฉ Build Updates
- Disabled parallel Maven builds in the fast CI pipeline to resolve intermittent Kotlin compiler errors and improve build stability f6fa47c
- Updated fast CI workflow to properly run unit tests and generate documentation after tests pass eb0e101
๐ Contributors
Thanks to all contributors who made this release possible:
Spring AI 1.1.0-RC1
Spring AI 1.1.0-RC1 Release Notes
๐ฏ Highlights
This release includes 10 new features, 8 bug fixes, 10 documentation improvements, 12 other improvements.
โช Breaking Changes
- OpenAI TTS implementation migrated to shared TextToSpeechModel interface with standardized Double type for speed parameter instead of String 2b195b3
- Removed deprecated APIs in preparation for the 1.1.0 release. Applications using deprecated methods will need to migrate to the newer alternatives. c631340
โ ๏ธ Upgrading Notes
- OpenAI TTS users should update to use the new shared TextToSpeechModel interface. Speed parameter now uses Double type instead of String. See TTS migration guide for detailed instructions. a8d2208
- Applications using deprecated APIs removed in 1.1.0 must migrate to the newer replacement APIs. Review your codebase for deprecation warnings from 1.0.x releases and update accordingly. c631340
โญ New Features
- Added support for extraBody and reasoningContent in OpenAI API, enabling advanced model configuration and reasoning chain access ec717c1
- Added promptCacheKey and safetyIdentifier support for improved caching and safety management 347378a
- Automatic retry configuration for network exceptions to improve resilience in distributed environments c03a485
- Event-driven tool callback caching for Model Context Protocol integration improves performance and reduces redundant operations 5783104
- Refactored Model Context Protocol client annotation handling with unified handler registries for improved maintainability 2a2f155
- Added MongoDB repository implementation for chat memory persistence, enabling conversation history storage in MongoDB databases. 80527b2
- Added thinking mode support for Ollama reasoning models, enabling enhanced reasoning capabilities for compatible models. 0b8293e
- Added and updated tests for OpenAI reasoning_effort parameter, enhancing control over reasoning model behavior. e157775
- Enhanced BeanOutputConverter to support removing thinking tags from input text, improving structured output parsing d1aa8d4
๐ชฒ Bug Fixes
- Fixed OllamaApiIT#streamingChat integration test 47e4232
- Resolved configuration injection issue where VertexAiEmbeddingConnectionDetails was not properly injected when using the Vertex AI embedding starter 9de3592
- Improved embedding dimension handling by implementing lazy loading for unknown dimensions and caching results for better performance a8b3982
- Corrected the configuration property prefix in OpenAI Text-to-Speech documentation 992a02f
- Resolved authentication issues with the Chroma vector database API 0abfedf
- Enhanced error logging to include exception details when tool execution fails, improving debugging capabilities c5ce4be
- Updated MCP integration tests to properly include McpServerObjectMapperAutoConfiguration 7529a21
- Improved MCP server configuration by simplifying ObjectMapper dependency injection 6d9b8e6
๐ Documentation
- Documented reasoning content support for Ollama via OpenAI compatibility mode e673935
- Added documentation for extraBody, reasoningContent, promptCacheKey, and safetyIdentifier features 347378a
- Added Text-to-Speech migration guide for 1.1.0-RC1 release a8d2208
- Added documentation for configuring Model Context Protocol (MCP) with STDIO on Windows systems e464266
- Corrected Javadoc documentation for ZhiPuAiImageApi cb6afde
- Improved advisor documentation and type usage for better clarity and consistency 266401e
- Corrected formatting issues in Pinecone vector database documentation 690f400
- Corrected the MCP Java SDK URL in documentation #4795
- Corrected example configuration for MCP server properties fb66626
- Corrected various typos throughout the documentation 6e74b00
๐จ Dependency Upgrades
- Updated AWS Bedrock Runtime and AWS SDK dependencies to version 2.36.3 #4806
โก Performance
- Event-driven caching mechanism for MCP tool callbacks reduces redundant operations and improves response times 5783104
๐ฉ Build Updates
- Introduced new fast-continuous-integration workflow with parallel build execution, replacing the legacy continuous-integration workflow for faster PR validation. 7112eeb
- Multiple improvements to the fast-continuous-integration workflow including YAML syntax fixes, scheduled trigger enablement, and parallel execution support for rapid PR merges. e928ca9
- Updated Maven build configuration to run format:apply during local development and format:check in CI pipelines fb523c8
- Enhanced test coverage for MCP server ObjectMapper auto-configuration 9b0eaf2
- Improved test structure by consolidating AutoConfiguration tests to use a centralized SpringAiTestAutoConfigurations approach 4532f64
- Temporarily disabled unstable integration test for OpenAI chat model stream web search annotations 355b883
- Corrected the description in the GitHub Actions workflow for Maven publishing bd1834d
- Prevented the spring-ai-integration-tests artifact from being published to Maven Central 531a695
๐ Contributors
Thanks to all contributors who made this release possible:
- Alexandros Pappas (@apappascs)
- Christian Tzolov (@tzolov)
- Daniel Garnier-Moiroux (@Kehrlann)
- Eric Bottard (@ericbottard)
- guanxu (@guanxuc)
- Ilayaperumal Gopinathan (@ilayaperumalg)
- Issam El-atif (@ielatif)
- James Ward (@jamesward)
- liugddx (@liugddx)
- Mark Pollack (@markpollack)
- Martin Kamp Jensen (@mkjensen)
- Nguyen Tran (Mark) (@nguyen.trantrung)
- Philip I. Thomas (@philipithomas)
- Senrey_Song (@SenreySong)
- Thorben Janssen (@thjanssen)
- Tran Ngoc Nhan (@ngocnhan-tran1996)
- [vdm24 (@vdm24)](https:...
Spring AI 1.1.0-M4
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](h...
Spring AI 1.1.0-M3
Spring AI 1.1.0-M3 Release Notes
๐ฏ Highlights
Model Context Protocol (MCP) Java SDK 0.14.0 Upgrade
This release primarily focuses on upgrading to the Model Context Protocol (MCP) Java SDK version 0.14.0, bringing significant improvements to Spring AI's MCP integration capabilities. Key enhancements include:
- Enhanced Resource Template Management: Improved resource template API consistency and management capabilities
- Robust Error Handling: Better resilience for MCP server interactions with proper handling of non-compliant responses and edge cases
- Spec Compliance Improvements: Proper resource not found handling and fixes for Content-Length: 0 responses
- Client-Side Validation: New tool output schema validation and caching for improved client reliability
- API Refinements: Better JSON type handling, consistent naming conventions, and optional lastModified field support in Annotations
These foundational improvements strengthen Spring AI's MCP implementation, providing a more reliable and feature-rich Model Context Protocol experience.
Additional Updates
This release also includes 7 new features, 11 bug fixes, 9 documentation improvements, and 16 other improvements across the Spring AI ecosystem.
โญ New Features
- MarkdownDocumentReader now supports processing multiple documents in a single operation 499ab3e
- Added Azure Cosmos DB integration for chat memory persistence 1a35e8a
- Improved error handling with fallback messages when tool execution encounters blank errors f2d57cc
- Added support for the latest Claude models with improved naming conventions in the Anthropic integration #4516
- Added metadata filtering capabilities to GemFireVectorStore for more precise vector search queries 78c5e00
- Added MCP resource template support to server auto-configurations, enabling enhanced Model Context Protocol capabilities 97ac810
- Introduced builder pattern support across the Mistral module for improved API usability b8dfc09
๐ชฒ Bug Fixes
- Improved tool/function calling reliability by adding a special warning when LLMs change tool names during execution #4349
- Resolved issues with JsonSchemaGenerator when processing method input parameters, particularly for Mistral AI integration #4524
- Corrected property access syntax in StTemplateRender for proper template rendering 0cea262
- Corrected test configuration issues for MistralAI integration 4408c46
- Fixed inconsistency where parameterized render(Map) failed to handle Resource in variables compared to no-arg render 0fd9fd5
- Resolved issues with Jackson module loading by not using the Thread Context ClassLoader #4515 via #2921
- Enhanced robustness of mergeToolUseEvents in StreamHelper and fixed handling of thinkingBlock.signature in event-to-response conversion 9907b2c
- Removed unused member variables to improve code maintainability #4489
- Fixed Ollama auto-configuration issues to ensure proper initialization b915413
- Resolved an issue in the OllamaApiHelper component 5d8907f
- Cleaned up the initializeContainer method by removing redundant parameters and assignments 84efb6a
๐ Documentation
- Added comprehensive security reference documentation for Model Context Protocol integration #4532
- Updated documentation to include Z.ai international site information and GLM-4.6 model support #4539
- Updated documentation to reflect Spring Boot 3.5 release availability #4530
- Improved documentation formatting by using inline literals 54f5127
- Added documentation for metadata filtering capabilities in GemFireVectorStore d83c826
- Corrected typo in ollama-embeddings.adoc documentation 9555a61
- Corrected example code error in ChatMemory documentation for CassandraChatMemoryRepository #4476
- Fixed example code errors in multimodality documentation #4475
- Fixed incorrect class reference in MCP-related documentation #4466
๐จ Dependency Upgrades
Model Context Protocol (MCP) Java SDK 0.14.0
Primary motivation for this release - Upgraded to MCP Java SDK 0.14.0 and mcp-annotations to 0.5.1 #4531
This major upgrade brings critical improvements to Spring AI's MCP integration:
- Resource Template Management: Refactored resource template API for better consistency and usability
- Error Resilience: Enhanced server error handling with proper management of non-compliant notification responses and Content-Length: 0 scenarios
- Spec Compliance: Proper resource not found handling according to MCP specification
- Client Validation: Added tool output schema validation and caching capabilities
- JSON Handling: Fixed JsonTypeInfo.DEDUCTION to avoid unnecessary includes
- API Consistency: Corrected MCP_SESSION_ID naming convention for consistent identifier style
- Annotations Enhancement: Added optional lastModified field to Annotations record
For complete details, see the MCP Java SDK 0.14.0 release notes.
Other Dependency Updates
- Upgraded Apache Tika to 3.2.3 from 3.2.1 and jsoup to 1.21.2 from 1.21.1, resolving CVE-2025-54988 #4504
- Upgraded the Couchbase client SDK to a newer version 351fbbb
๐ฉ Build Updates
- Improved test coverage for KnuddelsRuntimeHints d0c9e86
- Migrated to AssertJ's assertThatExceptionOfType for better test readability #4544
- Fixed indentation for environment variables and added tracing to git checkout operations 0f436b4
- Improved logging consistency with type-assured parameter binding 17c8e9e
- Expanded test coverage for Milvus vector database integration d016b10
- Improved test coverage for MCP tool callback builder functionality 46b9170
- Improved test coverage for Mistral AI bindings properties processor #4483
- Added autoconfigure-mcp-server-common to Bill of Materials for improved dependency management f907196
- Refactored McpToolUtils to use builder pattern instead of deprecated constructors 8a2d86b
- Improved test coverage for MultiQueryExpander, StreamHelper, and Query classes #4473
- Added missing operator and edge case tests for AzureAiSearchFilterExpressionConverter #4467
- Added comprehensive null safety and configuration tests for Azure OpenAI embeddings and Google GenAI runtime hints #4456
๐ Security
- Resolved security vulnerability CVE-2025-54988 through dependency upgrades of Tika and jsoup #4504
๐ Contributors
Thanks to all contributors who made this release possible:
- ashakirin (@andrei.shakirin)
- [Cameron Kirk (@kir...
Spring AI 1.0.3
Spring AI 1.0.3 Release Notes
๐ฏ Highlights
This release includes 4 new features, 14 bug fixes, 6 documentation improvements, 3 other improvements.
โญ New Features
- GemFireVectorStore now supports metadata filtering queries, enabling more precise vector search operations. 833a856
- Enhanced AWS Bedrock integration with new BedrockChatOptions for improved configuration management and chat model options 8660473
- Initial implementation of ahead-of-time compilation improvements for better GraalVM native image support a964887
- OpenAiApi can now be injected as a Spring bean, enabling easier customization and testing ee51d44
๐ชฒ Bug Fixes
- Resolved issues with JSON schema generation for method input parameters in Mistral integration. #4524
- Improved error handling by providing fallback messages when tool execution errors are blank. a0a38de
- Enhanced robustness of mergeToolUseEvents method and fixed handling of thinkingBlock.signature() in eventToChatCompletionResponse, improving streaming event reliability. 6ced885
- Resolved inconsistency in PromptTemplate.render(Map) where Resource variables were not handled correctly compared to no-arg render. 36516e0
- Corrected class loading mechanism for Jackson modules to avoid using Thread Context ClassLoader, improving reliability in certain deployment scenarios. 9d9d539
- Improved type safety and consistency in logger parameter binding. d075519
- Code quality improvement for document handling. 5bac155
- Corrected usage of BedrockChatOptions in the Bedrock proxy chat model implementation 06079b2
- Fixed toolAnnotationWeatherForecastStreaming integration test for Bedrock Nova chat client a110c8b
- Resolved issue GH-4414 in OllamaApiHelper implementation 71dee41
- Enhanced configuration metadata generation for better IDE auto-completion support 76ca66d
- Resolved index out-of-range exceptions that occurred during tool call merging in OpenAI integration a12f0ca
- Updated test annotations to use the current @MockitoSpyBean annotation instead of the expired @SpyBean 65b4ead
- Enhanced code clarity by improving method parameter names in the ChatClient builder API #3856
๐ Documentation
- Corrected documentation typo in ollama-embeddings.adoc. cdf5643
- Added documentation for metadata filtering capabilities in GemFireVectorStore. bc5411a
- Corrected example code in ChatMemory documentation for CassandraChatMemoryRepository #4476
- Fixed example code errors in multimodality documentation #4475
- Corrected documentation showing the proper property prefix as spring.ai.oci.genai.cohere.chat #4437
- Updated DeepSeekChatModel initialization examples to demonstrate proper builder pattern usage #4421
โก Performance
- Improved performance of float list to primitive array conversion in embedding utilities 8e16f9d
๐ฉ Build Updates
- Simplified initializeContainer method by removing redundant parameters and meaningless reassignments f4a2aa9
- Refactored code to use Optional chaining for cleaner assistant message extraction 4a4808d
๐ Contributors
Thanks to all contributors who made this release possible:
- Albert Attard (@albertattard)
- Cameron Kirk (@kirkster96)
- cho-thinkfree-com (@cho)
- Christian Tzolov (@christian.tzolov)
- Eric Bottard (@bottarde)
- Hyoseop Song (@crad_on25)
- Hyunjoon Park (@academey)
- Ilayaperumal Gopinathan (@ilayaperumalg)
- Jason Huynh (@jason.huynh)
- Josh Long (@joshlong)
- lance (@leehaut)
- Li Huagang-็ฎๆพ่ง้ (@bert825_work)
- Mark Pollack (@mark.pollack)
- Oleksandr Klymenko (@alexanderklmn)
- SiBo Ai (@ai-afk)
- Soby Chacko (@soby.chacko)
- Sun Yuhan (@sunyuhan1998)
- Waldemar Panas (@waldemar.panas)
- xfl12345 (@xfl12345)
- Yanming Zhou (@zhouyanming)
- ้็ผBug (@fatebugs)
Spring AI 1.1.0-M2
Spring AI 1.1.0-M2 Release Notes
๐ฏ Highlights
This release includes 16 new features, 12 bug fixes, 6 documentation improvements, 22 other improvements.
โญ New Features
- Added support for response schema validation in VertexAI Gemini Chat Model for structured output generation 31423e9
- New integration with Mistral AI's OCR (Optical Character Recognition) API for document and image text extraction 0c1a089
- Added comprehensive hardware, memory, performance and execution options for Ollama embedding models eba2cec
- Added Testcontainers service connection support for docker/mcp-gateway to improve testing capabilities 4d0206b
- Added Google GenAI artifact entries to Spring AI Bill of Materials for improved dependency management ae59953
- Added support for thinking and response_format parameters to the ZhipuAI chat model integration, enhancing the model's capabilities and output formatting options cae6364
- Added Docker Compose service connection support for MCP Gateway, improving containerized deployment capabilities 60a27a8
- Added support for new ZhiPu models GLM-4.5 and GLM-Z1 5f984fb
- Added 'enable' property for Bedrock Cohere chat configuration 9442c35
- Added requestMetadata support to Bedrock converse requests for enhanced request tracking 45baa39
- Aligned EmbeddingOptions builder pattern with ChatOptions for consistent API experience 14d6f58
- Added builder pattern support for AssistantMessage creation f4a1c96
- Added support for the new glm-4.1v-thinking-flash model in the ZhipuAI integration 49506de
- Made OpenAI API available as a bean for injection, enabling easier integration and customization f41c27d
- Implemented cache management for Anthropic API with eligibility tracking for improved performance and resource optimization 1d5ab9b
- Added extended token usage metadata and Cached Content API support to Google GenAI (Gemini) for enhanced performance monitoring and content caching capabilities 6cf3b4b
๐ชฒ Bug Fixes
- Fixed issues with stateless Model Context Protocol (MCP) server registration to ensure proper connection handling 1b3705f
- Replaced expired @SpyBean annotation with @MockitoSpyBean for improved testing compatibility #3446
- Prevented out-of-range errors when merging tool calls in the OpenAI integration 6697589
- Optimized EmbeddingUtils.toPrimitive(List) method for better performance d1133dc
- Improved method parameter naming in ChatClient.Builder.defaultAdvisors() for better developer experience #3856
- Fixed handling of default implementation for ToolCallback#call(String,ToolContext) method to improve tool integration reliability 3e17e16
- Fixed Ollama to properly use system role for system messages instead of user role #4364
- Corrected wrong checkstyle automated changes that were improperly applied f3aab2f
- Refactored OllamaChatModel to support custom AbstractMessage implementations and align with other ChatModel implementations 8968df7
- Fixed DeepSeekChatModel initialization to use builder pattern for consistent API design cb4f356
- Improved configuration metadata generation for IDE auto-completion support b5a37b6
- Fixed VertexAI Gemini chat model tool calling integration test for inferred OpenAPI schema streaming 3c57027
๐ Documentation
- Fixed documentation for ChatClient responseEntity() method to provide accurate usage examples and guidance #4386
- Fixed and improved ZhipuAI chat model documentation in zhipuai-chat.adoc #4387
- Updated tests and documentation to use DockerModelRunnerContainer for improved container-based testing guidance c7b7d69
- Improved MCP (Model Context Protocol) documentation and added comprehensive getting started guide 07688d5
- Updated MCP reference documentation with minor improvements and clarifications e776129
- Fixed OCI Cohere documentation property prefix to spring.ai.oci.genai.cohere.chat ce09cb5
๐จ Dependency Upgrades
- Updated Model Context Protocol (MCP) related dependencies to latest versions #4415
- Upgraded Spring Boot framework dependency to version 3.5.6 for latest features and security updates 820cc79
- Updated to Spring Boot 3.5.5 for latest features and security improvements #4408
- Updated Google GenAI dependencies to their latest versions for improved functionality #4398
- Updated MCP from version 0.12.1 to 0.13.0-SNAPSHOT #4403
- Changed HSQLDB dependency scope from runtime to test for chat memory JDBC autoconfiguration #4366
- Updated MCP SDK to version 0.13.1 and mcp-annotations to 0.4.1 for latest features and improvements 0c8b6dc
โก Performance
- Optimized performance by using AssistantMessage#builder() pattern instead of direct instantiation, reducing object creation overhead 1decd34
- Refactored request creation logic for Mistral AI chat model to improve efficiency and maintainability f9d87fd
- Simplified assistant message extraction using Optional chaining for cleaner code 356fced
- Optimized ZhiPu Embedding to support batch embedding operations for improved performance b7f231a
๐ฉ Build Updates
- Separated OllamaOptions into distinct Chat and Embedding Options classes for better modularity f908aa1
- Added comprehensive edge case and boundary testing for Google Generative AI components to improve reliability 63ba02a
- Enhanced MCP tool name prefix generation with automatic duplicate handling for better tool management 31db86d
- Defined explicit version for maven-gpg-plugin to improve build reproducibility #4320
- Added comprehensive test coverage for runtime hints and bindings processors #4402
- Added comprehensive edge case tests for ChatModel, ListOutputConverter, and ToolExecutionResult components to improve code reliability...