Releases: spring-projects/spring-ai
Spring AI 2.0.0
For upgrading from 1.1.x to 2.0.0, please refer to the upgrade notes here.
For the detailed reference documentation on 2.0.0, please refer here
β New Features
- Update Google GenAI models #6406
- Use only Jackson 2 in
OpenAiChatModel#6392 - Make
org.springframework.ai.image.observationnull-marked #6388 - Polish
Prompt#6387 - Preserve OpenAI tool call additional properties #6365
π Bug Fixes
- Filter unsupported tool messages in
CassandraChatMemoryRepository#6400 - Filter unsupported tool messages in
MongoChatMemoryRepository#6399 - Filter unsupported tool messages in
JdbcChatMemoryRepository#6398 - Remove
streamToolCallResponsesfrom advisor builders #6391 - Add missing
promptCacheKeyparameter inOpenAiChatOptions#6380
π Documentation
- Update reference docs to reflect 2.0 API changes #6405
- Add more guides #6401
- Introduce
CLAUDE.mdandAGENTS.md#6376 - Consolidate upgrade notes for 2.0.0 #6333
π¨ Dependency Upgrades
β€οΈ Contributors
Thank you to all the contributors who worked on this release:
@ericbottard, @guanxuc, @ilayaperumalg, @sdeleuze, @sdudzin, @tzolov, and @ultramancode
Spring AI 1.1.8
Spring AI 1.0.9
2.0.0-RC2
β New Features
- Make Anthropic HTTP client configurable #6354
- Restore compatibility with Spring Framework < 7.0.4 #6334
- Make OpenAI HTTP Client configurable #6294
π Bug Fixes
- Fix BedrockProxyChatModel model option handling #6370
- Fix
spring-ai-autoconfigure-model-bedrock-aidependencies #6368 - 2.0.0-RC1 regression: additional dependency is needed for Bedrock SDK #6367
- Always auto-register
ToolCallingAdvisorto support runtime-injected tools #6349 - Restore options replacing instead of merging in
ChatModel#6336 - Replay
reasoning_contentin OpenAI assistant history #6296 - Fix
OllamaChatModeldropping thinking field in multi-turn conversation history #6062 - Binding failure for
spring.ai.ollama.chat.think#4853
π Documentation
- Document native structured output limitations for Ollama and OpenAI #6363
- Rewrite
CONTRIBUTING.adocand convert it toCONTRIBUTING.md#6352 - Fix tool callback example in user-controlled tool execution docs #6324
β€οΈ Contributors
Thank you to all the contributors who worked on this release:
@ThomasVitale, @ericbottard, @guanxuc, @ilayaperumalg, @sdeleuze, @sdudzin, @suryateja-g13, @tzolov, and @uc4w6c
Spring AI 2.0.0-RC1
β New Features
- Add turn-boundary snapping to MessageWindowChatMemory eviction #6312
- Finish to remove default values from models #6311
- Move advisors to their proper modules #6309
- Remove SpringBeanToolCallbackResolver and toolNames() API #6301
- Streamline OpenAiChatModel implementations #6295
- Remove
ToolSpecconsumer API fromChatClient#6292 - Remove Minimax dedicated support in favor of Anthropic one #6290
- Remove internalToolExecutionEnabled #6289
- Rename
N()ton()in options builders #6285 - Refine
JdbcChatMemoryRepositoryDialectto use default method #6283 - Replace SLF4J by
org.apache.commons.logging.LogFactory#6280 - Remove internal tool execution from MiniMaxChatModel #6279
- Remove internal tool execution from BedrockProxyChatModel #6272
- fix(core): allow tool callbacks and providers directly in ChatClient tools() #6263
- Remove internal tool execution from MistralAiChatModel #6260
- Remove internal tool execution from DeepSeekChatModel #6258
- Remove internal tool execution from OpenAiChatModel #6257
- Remove internal tool execution from OllamaChatModel #6256
- Remove duplicate builder overrides in OpenAiChatOptions #6255
- Refactor tool search by consolidating into a single module #6254
- Remove internal tool execution from AnthropicChatModel #6252
- Refactor toOptions method for vendor-specific autoconfiguration properties #6248
- Make equals parameter nullable #6239
- Remove unused
GoogleGenAiChatOptions.TransportType#6238 - GH-6211: Avoid duplicate chat memory in tool prompts #6228
- GH-6206: Update tool callback guidance #6214
- Update Mistral AI chat models #6210
- Deprecate and rename ChatClient customizer #6204
- Refine Spring Boot dependencies #6200
- Simplify ToolCallAdvisor stream aggregation by removing publish() multicast #6195
- Add DeepSeek V4 chat model constants #6194
- Add EntityParamSpec to ChatClient entity() methods for per-call structured output configuration #6165
- Remove toolNames() API and SpringBeanToolCallbackResolver β use explicit ToolCallback beans instead #6154
- Retire Pixtral Large model #6149
- Refactor JSON utilities #6135
- Use .class reference for autoconf ordering #6119
- Add Tool Search Tool advisor for on-demand tool discovery #5909
- Allow accessing "timestamp" field from spring_ai_chat_memory table programatically when using JdbcChatMemoryRepository #5168
π Bug Fixes
- fix: place memory advisors outside ToolCallingAdvisor by default #6314
- Rename ToolCallAdvisor to ToolCallingAdvisor with backward-compat shims and bug fixes #6303
- Fix OpenAiChatModel.stream() to only buffer tool calls. #6288
- refactor(chat-client): enforce non-null ToolCallAdvisor.Builder and fix advisor chain mutation #6282
- fix: fix span hierarchy in streaming paths for all remaining chat models #6276
- fix: bring parent span into ThreadLocals to maintain Observation and span hierarchy parity #6249
- Guard JSON schema generation #6217
- Fix merge in openai options #6215
- deepseek V4 Function calling 400 Bad Request from POST #5963
π Documentation
- Fix "vector strore" typo in RAG diagram #6300
- Polish reference documentation #6234
- Improve Mistral AI Chat documentation for reasoning models and
ReasoningEffortJavadoc #6191 - Reintroduce community support documentation for OCI and Azure CosmosDB #6125
π¨ Dependency Upgrades
- Upgrade to MCP SDK
2.0.0-RC1#6287
β€οΈ Contributors
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
Spring AI 2.0.0-M8
β New Features
- Use dash-separated convention for Spring Boot properties #6186
- Make
ChatOptions#mutateoverrides return type specific #6127 - Exclude
jackson-dataformat-yamlfromjson-schema-validator#6090 - Improve MistralAiApi Jackson mapping for message content #5585
π Bug Fixes
spring-ai-starter-model-google-genaiincorrectly declares dependency onspring-ai-google-genai-embedding#6171- spring-ai-starter-vector-store-pgvector doesn't work without spring-boot-starter-jdbc #6164
- 2.0.0-M7 forces API key requirement, breaking cookie/session-based authentication #6150
- Fix regression on transitive auto-configuration dependencies #6138
β€οΈ Contributors
Thank you to all the contributors who worked on this release:
Spring AI 2.0.0-M7
β New Features
- Updated Gemini Models and Google Client Library BOM #6112
- Sanitize Spring Boot related dependencies #6088
- Introduce
ToolSpecfluent API #6085 - Remove CosmosDB related components from Spring AI #6080
- Remove
spring-ai-spring-cloud-bindings#6079 - Ollama doesnt work in a graalvm native image #6043
- Remove
ChatOptionssetters #6025 - Replace usage of
GEMINI_2_0_FLASHbyGEMINI_2_5_FLASH#6003 - Deprecate SSE transports, set Streamable HTTP as default server protocol #5969
- Introduce SSE message endpoint validator in
WebFluxSseClientTransport#5967 - Reuse
JsonSchemaGeneratorinBeanOutputConverter#5897 - Make
ToolCallAdvisorthe default tool call management option #5459 - Add validation of vector's dimensions for PGVector #4868
π Bug Fixes
- Update tests and docs for MCP SDK 2.0.0-M3 breaking API changes #6121
- Enforce single ToolAdvisor invariant in DefaultChatClient #6111
- Fix ToolCallAdvisor ignoring auto-configured ToolCallingManager #6096
- Per-call
customHeadersnot propagated inOpenAiImageOptions#6082 ChatClient#promptignores chat options from prompt #6072- Fix
OpenAiChatOptions.AbstractBuilder#combineWith#6045 - Fix OpenAI generic options merging for image, audio, embedding and moderation #6042
- Error in Spring AI 2.0.0-M6 while using Docker Model runner #6036
- Preserve
ChatResponseMetadataduring OpenAI streaming aggregation #6014 - Google GenAI support is not available with Spring Boot 4 on start.spring.io #6005
RedisVectorStore#doDeleteonly deletes the 10 first messages #5998- Fix Kotlin nullable fields in MCP tool input schema #5997
- Tool input schema marks Kotlin nullable fields as required in
JsonSchemaGenerator#5978 - Preserve OpenAI response metadata #5929
- Tool inputSchema with recursive parameter types emits unresolvable
$ref(nested$defs, root-relative$ref) #5888 - Advisor executed after
ToolCallAdvisorlacks custom observation #5882 - OpenAiChatModel streaming drops chunks due to internal switchMap when using buffered concatMap #5120
π Documentation
- Complete documentation update for OpenAI SDK base URL new behavior #6093
- Reference document still refer to removed
OpenAiApi#6075
π¨ Dependency Upgrades
- Add spring-boot-autoconfigure-processor to the compiler #6100
β€οΈ Contributors
Thank you to all the contributors who worked on this release:
@ChoMinGi, @Kehrlann, @ThomasVitale, @chemicL, @ddobrin, @ericbottard, @jewoodev, @qixiangme, @quaff, @sobychacko, @stohirov, @tzolov, and @yaner-here
Spring AI 1.1.7
Spring AI 1.0.8
π Bug Fixes
RedisVectorStore#doDeleteonly deletes the 10 first messages #6068
Spring AI 2.0.0-M6
Spring AI 2.0.0-M6 Release Notes
π― Highlights
This release includes 7 new features, 18 bug fixes, 5 documentation improvements, 30 other improvements.
βͺ Breaking Changes
- PromptChatMemoryAdvisor has been removed. Chat memory advisors now require an explicit conversation ID to be provided, improving predictability and eliminating ambiguous implicit state management. Applications using PromptChatMemoryAdvisor or relying on implicit conversation IDs must be updated. c3c7c86, 59ab752
- The class OpenAiConnectionProperties has been renamed to OpenAiCommonProperties to better reflect its purpose as shared configuration across OpenAI integrations. 01400e2
- OpenAI properties classes (e.g., OpenAiChatProperties, OpenAiEmbeddingProperties) no longer extend AbstractOpenAiOptions. This changes the class hierarchy and may affect code that relied on the options being available directly on properties classes. 7b2b436
- Setter methods have been removed from OpenAI options classes in favor of the builder pattern. Code that called setters directly on options (e.g., OpenAiChatOptions) will need to be updated to use the builder API. f119b2f
- The @NestedConfigurationProperty annotations have been removed from OpenAI options fields. This may affect IDE auto-completion and Spring Boot configuration metadata for nested OpenAI properties. 5f82cdd
- The SAP HANA DB vector store module has been removed from Spring AI. Users relying on this integration must migrate to an alternative vector store provider. 35b659e
- The Infinispan vector store module has been removed from Spring AI. Users relying on this integration must migrate to an alternative vector store provider. 195d418
- Mutable setter methods have been removed from Mistral AI options classes. Configuration must now be done through constructors or builders, enforcing immutability. 06015b7
- Mutable setter methods have been removed from MiniMax GenAI options classes. Configuration must now be done through constructors or builders, enforcing immutability. 222bc7d
- Mutable setter methods have been removed from Google GenAI options classes. Configuration must now be done through constructors or builders, enforcing immutability. 047f9a8
- Mutable setter methods have been removed from ElevenLabs options classes. Configuration must now be done through constructors or builders, enforcing immutability. 304fe1b
- Mutable setter methods have been removed from Bedrock options classes. Users must now use the immutable builder pattern or constructor-based initialization for Bedrock model options. 2b0b45b
- Mutable setter methods have been removed from DeepSeek options classes. Users must now use the immutable builder pattern or constructor-based initialization for DeepSeek model options. a4e99c5
- Anthropic configuration properties have been refactored and mutable setter methods removed from Anthropic options classes. Users must update to use the new property structure and immutable builder patterns. 556b5f2
- Several utility methods have been removed from the ModelOptionsUtils class. Users relying on these methods need to update their code to use alternative approaches. #5941
- Unnecessary Jackson annotations have been removed from OpenAiChatOptions. This may affect custom serialization/deserialization if users relied on these annotations. 6ed5928
- Setter methods have been removed from OllamaChatOptions as part of an API cleanup. Users must now configure options using the builder pattern instead of calling setters directly. #5923
β οΈ Upgrading Notes
- PromptChatMemoryAdvisor has been removed. Replace usages with the appropriate alternative chat memory advisor implementation and ensure all chat memory advisors are configured with an explicit conversation ID rather than relying on implicit identification. c3c7c86, 59ab752
- OpenAiConnectionProperties is now OpenAiCommonProperties. OpenAi*Properties classes no longer extend AbstractOpenAiOptions β options are now configured separately. Setters have been removed; use the builder pattern instead (e.g., OpenAiChatOptions.builder()...build()). Review upgrade-notes.adoc for detailed migration guidance. 52c952e
- If you use Tanzu bindings, the TanzuBindingsPropertiesProcessor has been upgraded to work with the new OpenAI configuration properties structure. Ensure your Tanzu bindings configuration is updated accordingly. d27f6fd
- If you were using setter methods on PostgresMlEmbeddingOptions, StabilityAiImageOptions, or calling options.setInternalToolExecutionEnabled() / options.setOutputSchema() on ChatOptions, you must migrate to the builder pattern. Use the respective builder class (e.g., PostgresMlEmbeddingOptions.builder().build()) to construct options immutably. a0ad1c7, 741a6cc, #5957
- If using the SAP HANA DB or Infinispan vector store integrations, you must migrate to an alternative supported vector store (e.g., pgvector, Redis, Chroma, Pinecone, etc.). Remove the corresponding starter dependencies from your build configuration. 35b659e
- Setter methods have been removed from Mistral AI, MiniMax GenAI, Google GenAI, and ElevenLabs options classes. Update your code to use the builder pattern or constructor-based configuration instead of calling setter methods directly. 06015b7
- With setters removed from Bedrock, DeepSeek, and Anthropic options classes, users must migrate to the builder pattern. Replace calls like
options.setTemperature(0.7)with the equivalent builder method:Options.builder().temperature(0.7).build(). Review Anthropic property names as they have been refactored. 2b0b45b - If your application directly calls any of the removed ModelOptionsUtils methods, you will need to update your code. Review the PR for details on which methods were removed and what alternatives are available. #5941
- With setters removed from OllamaChatOptions, users must update their code to use the builder API. Replace any direct setter calls (e.g., options.setModel(...)) with the equivalent builder methods (e.g., OllamaChatOptions.builder().model(...).build()). #5923
- If you were previously using string values for OpenAiEmbeddingOptions#encodingFormat, update your code to use the new enum type. This provides compile-time safety and ensures only valid encoding formats are used. de1824f
β New Features
- Enhanced observability support for chat models, providing better monitoring and tracing capabilities for AI model interactions. c3bdbb0
- OpenAI options classes now use an improved builder pattern, providing a cleaner and more consistent API for constructing option objects programmatically. 5568c7b
- Enhanced observability for tool/function calling, providing better monitoring and tracing capabilities when AI models invoke tools. #5927
- A new default buildRequestPrompt method has been added to the ChatModel interface, removing the need for duplicate implementations across individual model providers. This also ...