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 #4389
- Added comprehensive tests for OpenAI API builder, mutation, and streaming functionality to ensure robust integration 0b1a52f
- Polished MCP (Model Context Protocol) related configuration properties bean implementation 4889131
- General code cleanup and maintenance improvements 0b3e902
- Added comprehensive test coverage for PromptMetadata functionality and VertexAI embedding retry mechanisms ae0c418
- Corrected Maven command configuration in the documentation upload GitHub action c2103b0
- Added comprehensive runtime hints validation for Ollama GraalVM native image support 17b9211
- Added AOT (Ahead-of-Time) compilation support for MCP annotations to improve native image compatibility 5be4330
🙏 Contributors
Thanks to all contributors who made this release possible:
- Alexandros Pappas (@apappascs)
- Andrei Sumin (@andrei.sumin)
- Christian Tzolov (@tzolov)
- Dan Dobrin (@ddobrin)
- Daniel Garnier-Moiroux (@git)
- Eddú Meléndez (@eddu.melendez)
- Gareth Evans (@gareth)
- Ilayaperumal Gopinathan (@ilayaperumalg)
- Josh Long (@joshlong)
- leeyazhou (@bytesgo)
- Li Huagang-简放视野 (@bert825_work)
- Nicolas Krier (@nicolaskrier)
- Oleksandr Klymenko (@alexanderklmn)
- SiBo Ai (@ai-afk)
- Stuart Loxton (@stuart.loxton)
- Sun Yuhan (@sunyuhan1998)
- Thomas Vitale (@ThomasVitale)
- Toshiaki Maki (@makingx)
- Waldemar Panas (@waldemar.panas)
- xfl12345 (@xfl12345)
- Yanming Zhou (@zhouyanming)
- YuJie Wan (@eeaters)
- YunKui Lu (@luyunkui95)