gnodet-bot commented on code in PR #30444: URL: https://github.com/apache/camel/pull/30444#discussion_r4633916439
########## docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc: ########## @@ -2852,6 +2852,24 @@ stream failed after part of the request had already been sent. The JSON of the event is now written before the request is sent, with a `Content-Length` instead of a chunked request body. A body or a header that cannot be written as JSON fails the exchange without sending anything to Splunk. +=== camel-spring-ai - Spring AI 2.1.0 + +The Spring AI components use Spring AI 2.1.0, which is built on Spring Boot 4.2 and Spring Framework 7.1. See the +https://docs.spring.io/spring-ai/reference/2.1/upgrade-notes.html[Spring AI upgrade notes]. The changes that show +through Camel are: + +* The Anthropic chat model ignores the `temperature`, `topP` and `topKSampling` options of `spring-ai-chat`, and their +headers, and logs a warning (Anthropic Java SDK 3.x). It sends the API key in the `Authorization: Bearer` header +instead of `X-Api-Key`, which matters for a proxy that filters headers. +* The chat models return one generation, whose message holds the reply in ordered parts. The body of `spring-ai-chat` +is the text of the first generation, so with Google GenAI and `includeThoughts` it was the first thought, and with +Bedrock Converse a reply of several text blocks gave only the first one. The body is now the whole answer. +* With an `entityClass` (option or `CamelSpringAiChatEntityClass` header), a request that the SafeGuard advisor +(`safeguardSensitiveWords`) refuses no longer fails the exchange with a JSON parsing error of the refusal text. The body +is now `null` and the `CamelSpringAiChatFinishReason` header is `guardrailRefusal`. A response that the provider +filtered and that cannot be converted gives a `null` body too. Check the finish reason header where the route handled +the exception. + Review Comment: 💡 **Doc clarity:** The last sentence — "Check the finish reason header where the route handled the exception" — is ambiguous. The phrase "where the route handled the exception" can read as describing a route that actively handles an exception (implicit `onException`/`doTry`), when in fact no exception is thrown anymore. Consider something like: "Check the `CamelSpringAiChatFinishReason` header to detect refusals or provider-filtered responses — no exception is thrown." -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
