This is an automated email from the ASF dual-hosted git repository.
JiriOndrusek pushed a commit to branch camel-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/camel-main by this push:
new dc1a22d27d Fixed langchain4j-agent, langchain4j-agent-ql4j test modules
dc1a22d27d is described below
commit dc1a22d27d1a0f4cf4711484906d5af8b26e783e
Author: Jiří Ondrušek <[email protected]>
AuthorDate: Tue Oct 6 06:40:11 2026 +0000
Fixed langchain4j-agent, langchain4j-agent-ql4j test modules
CAMEL-24832 invokes ai-tool routes with a clean message: the tool
arguments are headers and the body is null. The wire-tapped copy used
to prove that the userDb tool ran therefore has a null body, which
receiveBody reports as no message. Check the received exchange instead.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
---
.../component/langchain4j/agent/it/Langchain4jAgentResource.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/integration-tests/langchain4j-agent/src/main/java/org/apache/camel/quarkus/component/langchain4j/agent/it/Langchain4jAgentResource.java
b/integration-tests/langchain4j-agent/src/main/java/org/apache/camel/quarkus/component/langchain4j/agent/it/Langchain4jAgentResource.java
index b831b6db0f..a334dabedb 100644
---
a/integration-tests/langchain4j-agent/src/main/java/org/apache/camel/quarkus/component/langchain4j/agent/it/Langchain4jAgentResource.java
+++
b/integration-tests/langchain4j-agent/src/main/java/org/apache/camel/quarkus/component/langchain4j/agent/it/Langchain4jAgentResource.java
@@ -198,8 +198,8 @@ public class Langchain4jAgentResource {
.withBody(userMessage)
.request(String.class);
- // Ensure tools were called
- Object toolWasInvoked =
consumerTemplate.receiveBody("seda:userDbTool", 10000L);
+ // Ensure tools were called: the tool route gets a clean message
(arguments as headers, body null), so check the exchange
+ Exchange toolWasInvoked = consumerTemplate.receive("seda:userDbTool",
10000L);
if (toolWasInvoked == null) {
return Response.serverError().entity("userDb tool was not
invoked").build();
}