Get ahead
VMware offers training and certification to turbo-charge your progress.
Learn moreOn behalf of the Spring AI engineering team and everyone who has contributed, I'm pleased to announce that Spring AI 2.0.0-RC1 is now available from Maven Central.
RC1 is an API stabilization milestone on the road to 2.0.0 GA.
Unified tool execution across all models. The built-in call/stream tool-execution loop and ToolExecutionEligibilityChecker wiring have been dropped from every ChatModel — OpenAI, Ollama, Anthropic, MistralAI, DeepSeek, Bedrock Proxy, and MiniMax. Tool execution must now be handled externally via ChatClient with ToolCallingAdvisor (recommended) or a user-controlled DefaultToolCallingManager loop. internalToolExecutionEnabled has been removed as part of this consolidation.
Remove toolNames() API and SpringBeanToolCallbackResolver — use explicit ToolCallback beans instead. toolNames and toolBeanDefinitionNames APIs have been removed from ChatOptions implementations, ToolCallingChatOptions, DefaultToolCallingManager, and ChatClient. Tools must now be explicitly registered as ToolCallback beans and passed via .tools() rather than being resolved by bean name at request time.
Allow tool callbacks and providers directly in ChatClient.tools(). ChatClient.prompt().tools(...) now accepts ToolCallback, ToolCallbackProvider, collections, and arrays of them directly. The ToolSpec consumer API has been removed, and toolContext() methods have been promoted to first-class status with enhanced validation.
ToolCallAdvisor renamed to ToolCallingAdvisor. ToolCallAdvisor is retained as a deprecated subclass with a builder() factory, Builder inner class, and AdvisorParams alias to provide deprecation warnings rather than compilation errors.
Tool Search Advisor for on-demand tool discovery. A new ToolSearchToolCallingAdvisor with three ToolIndex implementations (vector store, Lucene, regex) enables LLMs to discover and invoke tools on demand rather than loading all definitions upfront.
spring-ai-advisors-vector-store is renamed to spring-ai-vector-store-advisor.
Memory advisors placed outside ToolCallingAdvisor by default. DEFAULT_CHAT_MEMORY_PRECEDENCE_ORDER has been lowered so memory advisors wrap the tool-call loop rather than participating in each iteration. Most ChatMemoryRepository implementations do not support AssistantMessage tool-call content or ToolResponseMessage; ToolCallingAdvisor manages its own intermediate conversation history internally.
Simplified streaming aggregation in ToolCallingAdvisor. The publish()-based dual-branch pattern has been replaced with straightforward sequential aggregation: aggregate the response first, then defer the tool-call recursion. ChatClientMessageAggregator is extracted as a static field to prevent repeated instantiation per stream invocation.
Turn-boundary snapping in MessageWindowChatMemory. When the message window overflows, the eviction cut is now advanced forward to the nearest USER message instead of stopping mid-turn, preventing a turn from being split across the eviction boundary.
Avoid duplicate chat memory in tool prompts. Prevents prepending chat memory when the current prompt already contains the stored memory messages. Tool-call continuation prompts no longer repeat prior messages while still preserving the latest tool response in memory.
Allow accessing the timestamp field from spring_ai_chat_memory table programmatically. The timestamp column is now accessible programmatically when using JdbcChatMemoryRepository, like any other column in the chat memory table.
Refine JdbcChatMemoryRepositoryDialect to use default methods. The dialect interface now uses default methods, making custom dialect implementations simpler with less required boilerplate.
Add EntityParamSpec to ChatClient.entity() for per-call structured output configuration. Enabling provider-native structured output or schema validation on an entity() call previously required separate advisor parameters or manual wiring of StructuredOutputValidationAdvisor. EntityParamSpec allows both to be configured directly at the entity() call site.
Finish removing default values from models. Default option values are now managed and exposed at the options level. Unset options defer to the underlying model's own defaults, removing a class of subtle bugs where a Spring AI default would silently override the model provider's value.
Rename N() to n() in options builders. The N() builder method in *Options and configuration properties classes has been renamed to n() to align with Java naming conventions.
Enforce non-null ToolCallingAdvisor.Builder and fix advisor chain mutation. toolCallAdvisorBuilder is now non-nullable in DefaultChatClientRequestSpec, with null-defaulting moved to DefaultChatClientBuilder where the observationRegistry can be properly wired into the default ToolCallingManager.
Refactor JSON utilities. An important refactoring of the JSON utilities and related public APIs that was deferred pending prior refactoring work. SchemaGenerator instances shared by schema utilities are now properly guarded against concurrent access through structured output and tool schema paths.
Replace SLF4J with org.apache.commons.logging.LogFactory. Spring AI now uses LogFactory.getLog(getClass()) to align with other Spring portfolio projects.
Deprecate and rename ChatClient customizer. ChatClientCustomizer has been deprecated; ChatClientBuilderCustomizer is introduced as its replacement.
Customize OkHttp client for Micrometer-based observability. Introduces OkHttp client customization to restore Micrometer-based observability support for the OpenAI and Anthropic models.
Update Mistral AI chat models. Removes deprecated devstral-medium-latest, replaces devstral-small-latest with devstral-latest, deprecates several other models, and reorganizes premier and free model offerings per Mistral AI's retirement schedule.
Add DeepSeek V4 chat model constants. New constants for the DeepSeek V4 chat model have been added, removing the need to hardcode model identifier strings.
Remove MiniMax dedicated support in favor of the Anthropic integration. Minimax recommends leveraging Anthropic support through their text-anthropic API. MiniMax-specific code paths have been removed in favor of the Anthropic-compatible integration.
Retire Pixtral Large model. Pixtral Large has been retired per Mistral AI's schedule (May 31, 2026) and removed from Spring AI.
Fix span hierarchy in streaming paths for all remaining chat models. Applies the Micrometer Tracing parent scope fix to Anthropic, Bedrock Converse, DeepSeek, Google GenAI, MiniMax, Mistral AI, and Ollama. The root cause was TracingObservationHandler.getParentSpan using the span on the Spring MVC thread as the parent for Observations with an explicit parentObservation, causing a span/observation hierarchy mismatch.
Fix OpenAiChatModel.stream() to only buffer tool calls. Previously the implementation buffered the entire response before returning tokens. It now only buffers tool call segments, allowing other tokens to flow through as they are generated.
Fix DeepSeek V4 function calling 400 Bad Request. Corrects the request construction for function calling requests to the DeepSeek V4 model.
Fix merge in OpenAI options. Fixes customHeaders merging in several option types and timestampGranularities merging in transcription options.
Polish reference documentation. Resolves broken cross-references to audio and moderation pages, adds missing landing pages for those sections, and corrects a typo in chatclient.adoc.
Improve Mistral AI Chat documentation for reasoning models and ReasoningEffort Javadoc. Clarifies adjustable versus native reasoning model types, expands on metadata use, uses a constant instead of a string for thinking content metadata, and adds a latest tag to the Mistral Small model application.properties snippet.
Reintroduce community support documentation for OCI GenAI and Azure CosmosDB. Community support documentation for OCI GenAI and Azure CosmosDB vector store integrations has been reintroduced with related URLs.
Fix "vector strore" typo in RAG diagram. The label in spring-ai-rag.jpg read "Vector Strore". Corrected to "Vector Store".
Upgrade to MCP SDK 2.0.0-RC1. Spring AI's Model Context Protocol Java SDK dependency has been upgraded to 2.0.0-RC1.
Thank you to all the contributors who worked on this release:
@Baqirrizvidev, @Dream95, @EvanYao826, @ThomasVitale, @YunKuiLu, @chemicL, @dafriz, @ericbottard, @galenzo17, @goutamadwant, @guanxuc, @ilayaperumalg, @juanjuandog, @nicolaskrier, @quaff, @rajadilipkolli, @sdeleuze, @sobychacko, @stohirov, @symphony-enrico, @tzolov, and @wolf8334
Project Page | GitHub | Issues | Stack Overflow
Release Notes: 2.0.0-RC1 | Documentation: 2.0.0-RC1 Docs