Using Spring AI 1.0.0 M7 Released

Using Spring AI 1.0.0 M7 Released


The release of Spring AI 1.0.0 Milestone 7. This will be the last milestone release. Next month will be the RC1 release followed quickly by a GA release in time for the Spring IO conference in Barcelona.

To celebrate this release, we have added a new song to our AI-generated music playlist featuring lyrics by Josh Long and Claude! Check out the latest track to enhance your blog reading and coding experience.

Here are the key changes in this release. Note, there are breaking changes!

Breaking Changes

Spring AI 1.0.0-M7 introduces several important changes that align with the structural improvements previously introduced in the SNAPSHOT versions. These changes create a more modular and maintainable codebase while reducing unnecessary dependencies in your applications.

Artifact ID Changes

The most significant change is the naming pattern for Spring AI starter artifacts:

  • Model starters: spring-ai-{model}-spring-boot-starter → spring-ai-starter-model-{model}
  • Vector Store starters: spring-ai-{store}-store-spring-boot-starter → spring-ai-starter-vector-store-{store}
  • MCP starters: spring-ai-mcp-{type}-spring-boot-starter → spring-ai-starter-mcp-{type}

Package Changes

Some classes have moved to new packages to better reflect their domain responsibilities:

  • KeywordMetadataEnricher and SummaryMetadataEnricher moved from org.springframework.ai.transformer to org.springframework.ai.chat.transformer
  • Content, MediaContent, and Media moved from org.springframework.ai.model to org.springframework.ai.content

Your IDE should easily be able to handle these refactorings.

New Module Structure

As detailed in the Core Architecture Improvements section above, the project has been restructured from a monolithic core into specialized domain modules.

This modular approach allows you to include only the functionality you need, resulting in smaller deployments and clearer boundaries between components.

Importantly, this change should not be a breaking change if you use the Spring AI starters since they now import the new modular dependencies automatically. Only applications that directly referenced the previous monolithic artifacts will need to update their dependencies.

ToolContext Changes

The ToolContext class has been enhanced to support both explicit and implicit tool resolution, with tools only included in model calls when explicitly requested.

Additional Resources

For more details on these changes, refer to:

There are two ways to update your projects to Spring AI 1.0.0-M7:

  1. Use the Claude Code CLI tool tool with this prompt. You can use other AI assistant tools as well, but we have only tested using Claude Code. Note that this automated approach handles artifact ID changes, package relocations, and module structure changes, but does not yet include automatic changes for upgrading to MCP 0.9.0.
  2. Refer to the Upgrade Notes for detailed instructions, including guidance on manually updating MCP-related code.

Core Architecture Improvements

  1. Comprehensive Modular Architecture
  2. Modular Autoconfiguration
  3. Package Reorganization
  4. Framework Enhancements

Upgrade to MCP 0.9.0

Spring AI 1.0.0-M7 integrates the latest MCP reference implementation Java SDK version 0.9.0, bringing significant architectural improvements:

  • Session-Based Architecture: Improved handling of multiple concurrent client connections with better isolation between sessions
  • Exchange-Based Interactions: New exchange objects provide context-aware interactions between clients and servers
  • Enhanced Transport Provider Abstraction: Cleaner separation between connection management and communication handling
  • Improved Tool Management: Better tool name handling and de-duplication to avoid conflicts in complex scenarios
  • Simplified Server Configuration: Streamlined API for configuring and managing MCP servers
  • Comprehensive WebFlux and WebMvc Support: Enhanced transport providers for both reactive and servlet-based applications

These improvements result in a more robust, scalable MCP implementation that better aligns with the MCP specification. For detailed migration guidance, refer to the Upgrade Notes section on MCP Java SDK changes.

All examples in the Spring AI Examples repository have been updated to work with the latest MCP implementation.

New and Enhanced Model Integrations

  1. Anthropic Claude Updates
  2. Mistral AI Enhancements
  3. Ollama Improvements
  4. Azure OpenAI Updates
  5. OpenAI Enhancements

Docker Model Runner Support

Spring AI 1.0.0-M7 adds support for Docker Desktop 4.40's Model Runner, providing a seamless integration with locally running AI models:

  • OpenAI-Compatible API: Docker Model Runner provides a local Inference API designed to be compatible with the OpenAI API, enabling easy integration with Spring AI
  • Standard OCI Artifacts: Models are distributed as standard OCI artifacts on Docker Hub under the ai namespace
  • Multiple Configuration Options:Direct TCP connection to the Model RunnerIntegration via Testcontainers for development and testing
  • Simple Configuration: Just configure the OpenAI client with a custom base URL:Copyspring.ai.openai.api-key=ignored spring.ai.openai.base-url=http://localhost:12434/engines spring.ai.openai.chat.options.model=ai/gemma3
  • Full Feature Support: All Spring AI features including function calling, streaming, and more work with Docker Model Runner
  • Local Model Execution: Run models locally on Apple Silicon without sending data to external services

For detailed information, check out the Spring AI Docker Model Runner documentation and our accompanying blog post Spring AI with Docker Model Runner that dives deeper into this integration.

Special thanks to Eddú Meléndez for his significant contributions to this feature.

Tool and Multimodal Capabilities

  1. Tool Execution Framework
  2. Multimodality Support
  3. Document Processing

Memory and Storage

  1. Chat Memory Implementations
  2. Vector Store Enhancements

Query Processing

  1. Retrieval AugmentationAdded Context Support to Query in RetrievalAugmentationAdvisorRemoved default temperature on all QueryTransformer implementationsEnhanced context handling for improved relevance

Developer Experience

  1. Spring Boot Integration
  2. AOT and Native Image Support
  3. Documentation

To view or add a comment, sign in

Others also viewed

Explore topics