Spring AI Alibaba 2.0.3.0 upgrades from Spring AI 2.0.0 to 2.0.3 and integrates Spring AI Alibaba Extensions 2.0.3.0. This release improves multi-round tool execution, preserves reasoning and usage through graph streaming, and updates the Nacos and MCP integrations.
Spring AI 2.0.3 highlights
- Model reasoning and usage. DeepSeek supports configuring thinking mode and reasoning effort. Anthropic streams thinking text, and Anthropic and Bedrock Converse now include cache reads and writes in input token usage for both synchronous and streaming calls. Remove any application-side addition of those cached tokens. The upstream
ToolCallingAdvisoralso reports cumulative usage across its model calls. Token usage migration - Tool calling and multimodal APIs. Spring AI's default tool manager executes callbacks attached to the request and disables application-wide resolver fallback by default. It caps tool calls per turn and preserves the changes that custom tool advisors make to a request. OpenAI strict tool schemas are opt-in through
OpenAiChatOptions.builder().strict(true). OpenAI-compatible deployments can disable reasoning replay withreplayReasoningContent(false). ReplaceMedia.Builder.data(Object)with a typed overload forbyte[],String,URI,URL, orResource. Tool calling and API migration - RAG and document ingestion.
TikaDocumentReaderdefaults to a 10 million character extraction limit. Pass an explicit limit for larger documents. PgVector skips dimension validation when dimensions are unset. Typesense uses backtick-delimited string filters, rejects string values containing literal backticks, and acceptsDatevalues as epoch milliseconds. Vector-store filtering also handles long integer literals, and Redis supports configuring metadata fields for filtering. RAG and document migration - Semantic cache.
SemanticCacheAdvisorrequires aSemanticCacheScopeResolver. Supply a trusted tenant or user scope to isolate cached responses. CustomSemanticCacheimplementations must implement the context-aware read and write methods and the write overload that accepts a TTL. Semantic cache migration - MCP and observability. Spring AI uses MCP Java SDK 2.1.0, adds stateless server customizers, and keeps collision-resolved MCP tool names stable. Review the updated exception handling for
@McpToolmethods that throw checked exceptions. Image models gain metrics, and supported speech, transcription, and image providers emit observations when anObservationRegistryis configured. OpenAI text-to-speech emits incremental audio chunks. Collect the full stream when you need the complete audio. CustomTranscriptionModelimplementations can overridestream(AudioTranscriptionPrompt)to support streaming. Spring AI 2.0.1 · 2.0.2 · 2.0.3
Spring AI Alibaba Agent and Graph
- Request-scoped tools. In both synchronous and streaming runs, the Agent executes the callbacks attached to the final model request, after application advisors finish selecting tools. An explicitly empty selection disables tools for that request. Agent tools and ChatClient defaults can be used together, with an explicit Agent tool taking precedence when names collide. The Graph checkpoint retains the allowed tool names so a resumed run still respects the selection.
- Tool calls per turn. Serial and parallel Agent execution enforce 40 calls per tool and 150 total calls per user turn by default. The Agent keeps results from completed calls and returns a tool response for calls that exceed the limit. Use
toolCallLimits(maxCallsPerTool, maxTotalToolCalls)on the Agent builder. Set either value to-1to disable that limit. - Reasoning through the graph. DeepSeek assistant messages retain their type and reasoning when streaming chunks are assembled, context is edited, or a tool call goes through human approval. The final streaming event retains the most recent non-empty usage, including when usage arrives in a separate chunk. Multimodal tool results continue to support URL and inline Base64 media through Spring AI's typed media API.
Nacos, A2A, and MCP Gateway
- Nacos Config and the A2A starter use Nacos Client 3.3.0. The Nacos MSE client extension moves to 1.0.7. Config access, A2A registration and discovery, and MCP registration and discovery were also verified with Nacos Server 3.1.0. When upgrading a Nacos Server 3.1.x or 3.2.x installation with existing A2A data, follow the Nacos A2A migration guide.
- The Nacos MCP Gateway calls remote tools over SSE and Streamable HTTP, preserving configured endpoints, headers, and timeouts. The gateway and built-in Graph MCP node use the SDK request builder and close their clients after each invocation.
- Nacos
model.jsoncan configure OpenAIstrictandreplayReasoningContent. Omitted fields inherit the provider defaults.
Spring AI Alibaba Extensions 2.0.3.0
- DashScope: The HTTP and SDK chat integrations accumulate token usage across tool-calling rounds for synchronous and streaming requests. The HTTP integration also preserves the provider's cache read and write counts.
- EML and Tika: When one attachment exceeds the Tika extraction limit, the email reader skips that attachment and retains the email body and other attachments.
- DashScope tools and ARMS: Asynchronous tool execution and ARMS observation can be enabled together. Attach callbacks to the request and configure per-turn limits under
spring.ai.tools.limits.*. Deployments that intentionally use application-wide resolver fallback can opt in throughspring.ai.tools.resolution.fallback.enabled=true. - RAG and distributed MCP: Compatibility checks cover HyDE and hybrid Elasticsearch retrieval with 64-bit numeric metadata filters, retrieval against Elasticsearch 9.4.9, and synchronous and asynchronous distributed MCP clients over SSE and Streamable HTTP. Extensions 2.0.3.0 release notes
Dependency alignment
Import com.alibaba.cloud.ai:spring-ai-alibaba-bom:2.0.3.0 for Spring AI Alibaba modules. Add the Extensions BOM com.alibaba.cloud.ai:spring-ai-alibaba-extensions-bom:2.0.3.0 when managing Extensions dependencies directly. The release aligns Spring AI 2.0.3, Spring Boot 4.1.3, Spring Framework 7.0.11, and MCP Java SDK 2.1.0.
Spring AI Alibaba changes · Spring AI changes from 2.0.0 to 2.0.3