Federico Mariani created CAMEL-27241:
----------------------------------------
Summary: Upgrade to Spring AI 2.1.0
Key: CAMEL-27241
URL: https://issues.apache.org/jira/browse/CAMEL-27241
Project: Camel
Issue Type: Dependency upgrade
Components: camel-spring-ai, camel-spring-boot-starters
Reporter: Federico Mariani
Assignee: Federico Mariani
Spring AI 2.1.0 is due on 2026-11-19. It is built on Spring Boot 4.2 and Spring
Framework 7.1, so it goes together with CAMEL-26590.
h3. Checked with 2.1.0-RC2
* camel-spring-ai-chat, -embeddings, -image and -vector-store compile and their
unit tests pass with {{-Dspring-ai-version=2.1.0-RC2}}. The only new warnings
are deprecations: {{ChatMemory}} and {{MessageChatMemoryAdvisor}} are
deprecated for removal in Spring AI 3.0.0 (see the session memory issue linked
below).
* camel-mcp-server-starter: its 55 tests pass on Spring Boot 4.1.2 and on
4.2.0-RC2 (Spring Framework 7.1.0-RC2).
h3. To do with the upgrade
* camel-mcp-server-starter: {{SpringAiMcpServerEngine}} sends
{{notifications/resources/list_changed}} itself after removing a resource
template, because MCP Java SDK 2.1.0 did not. Spring AI 2.1.0 brings SDK 2.2.0,
which sends it, so clients would get it twice. Remove the workaround, as
camel-mcp-server did in CAMEL-27145.
* Upgrade guide entries for camel-spring-ai-chat, from the Spring AI 2.1.0
upgrade notes (to confirm with tests):
** With a SafeGuard advisor ({{safeguardSensitiveWords}}) and {{entityClass}},
a refused request is now a response with a {{null}} entity instead of a
conversion error, so the body is {{null}} and {{CamelSpringAiChatFinishReason}}
is {{guardrailRefusal}}. A content-filtered response that cannot be converted
behaves the same.
** The Anthropic chat model ignores {{temperature}}, {{topP}} and {{topK}}
(Anthropic Java SDK 3.x, a WARN is logged), so the {{temperature}}, {{topP}}
and {{topKSampling}} options have no effect with it.
** The chat models return one generation of ordered message parts; thinking
(Anthropic, Bedrock) and thoughts (Google GenAI) are no longer separate
generations.
Spring AI upgrade notes:
https://docs.spring.io/spring-ai/reference/2.1/upgrade-notes.html
_Claude Code on behalf of Croway_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)