Spring AI 2.1.0 released with tool call confirmation for agents
Spring AI 2.1.0 was released on 19 November 2026, six months after version 2.0 GA. The main new feature is Tool Call Confirmation for AI agent[1] tools: a developer marks a tool with requiresConfirmation = true, and the tool call loop pauses before running any call and returns the pending calls to the application. The application replies with allow or deny for each call, and a denied call returns the developer's message to the model instead of running. The loop keeps no state while it waits, so if the application saves the conversation, it can recover after a service restart. The policy for which calls need confirmation can read tool metadata, cover tools the developer does not own, such as MCP[2] tools, or check arguments, for example to confirm only transfers above a set amount.
Message Parts replace the old AssistantMessage structure (text plus separate lists) with an ordered list of parts, so reasoning, tool calls and text keep the order the model produced. The article says Anthropic requires thinking blocks to be returned unchanged, and that in 2.1.0-M1 only OpenAiResponsesChatModel produced and consumed Parts. OpenAI Responses API is enabled with spring.ai.openai.chat.api=responses, because the Chat Completions endpoint does not support tool calls combined with a reasoning effort other than none starting with GPT-5.4.
DecisionModel, added in RC2, returns calibrated probabilities for yes/no, choice and score answers, with implementations for OpenAI, Ollama and System One. The article also covers streaming of tool call arguments, support for custom embedding[3] in more vector stores, and the deprecation of ChatMemory in favour of the Session API.
Repository Spring AI github.com
Open source Java framework from Spring for building AI applications, with tools for LLM models, agents and tool calls.
Sources
-
CNJuejin ZH
Spring AI 2.1 正式发布 ,新增一个重要功能


