This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/main by this push:
     new cd9dceda07 Fixes #8914, enabled 
Langchain4jAgentTest.simpleToolInvocation
cd9dceda07 is described below

commit cd9dceda07965c40de0c70a4b6986c5989f64b66
Author: Jiří Ondrušek <[email protected]>
AuthorDate: Wed Aug 12 11:56:48 2026 +0200

    Fixes #8914, enabled Langchain4jAgentTest.simpleToolInvocation
---
 integration-tests/langchain4j-agent/pom.xml                           | 4 ++--
 .../component/langchain4j/agent/it/Langchain4jAgentRoutes.java        | 2 +-
 .../quarkus/component/langchain4j/agent/it/Langchain4jAgentTest.java  | 2 --
 .../mappings/agent/api_chat-72ba7185-e642-4cac-9ef0-8dd95fd074c0.json | 4 ++--
 .../mappings/agent/api_chat-9300fa7e-4a2a-453b-9dc8-58004959d71e.json | 2 +-
 5 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/integration-tests/langchain4j-agent/pom.xml 
b/integration-tests/langchain4j-agent/pom.xml
index cc3183e277..8faec47b47 100644
--- a/integration-tests/langchain4j-agent/pom.xml
+++ b/integration-tests/langchain4j-agent/pom.xml
@@ -41,7 +41,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
-            <artifactId>camel-quarkus-langchain4j-tools</artifactId>
+            <artifactId>camel-quarkus-ai-tool</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
@@ -120,7 +120,7 @@
                 </dependency>
                 <dependency>
                     <groupId>org.apache.camel.quarkus</groupId>
-                    
<artifactId>camel-quarkus-langchain4j-tools-deployment</artifactId>
+                    <artifactId>camel-quarkus-ai-tool-deployment</artifactId>
                     <version>${project.version}</version>
                     <type>pom</type>
                     <scope>test</scope>
diff --git 
a/integration-tests/langchain4j-agent/src/main/java/org/apache/camel/quarkus/component/langchain4j/agent/it/Langchain4jAgentRoutes.java
 
b/integration-tests/langchain4j-agent/src/main/java/org/apache/camel/quarkus/component/langchain4j/agent/it/Langchain4jAgentRoutes.java
index 1170400973..1a53f7d32c 100644
--- 
a/integration-tests/langchain4j-agent/src/main/java/org/apache/camel/quarkus/component/langchain4j/agent/it/Langchain4jAgentRoutes.java
+++ 
b/integration-tests/langchain4j-agent/src/main/java/org/apache/camel/quarkus/component/langchain4j/agent/it/Langchain4jAgentRoutes.java
@@ -59,7 +59,7 @@ public class Langchain4jAgentRoutes extends RouteBuilder {
         from("direct:agent-with-tools")
                 
.to("langchain4j-agent:test-agent-with-tools?agent=#agentWithTools&tags=users");
 
-        from("langchain4j-tools:userDb?tags=users&description=Query user 
database by user ID&parameter.userId=integer")
+        from("ai-tool:userDb?tags=users&description=Query user database by 
user ID&parameter.userId=integer")
                 .wireTap("seda:userDbTool")
                 .setBody().constant("{\"name\": \"" + USER_JOHN + "\", \"id\": 
\"123\"}");
 
diff --git 
a/integration-tests/langchain4j-agent/src/test/java/org/apache/camel/quarkus/component/langchain4j/agent/it/Langchain4jAgentTest.java
 
b/integration-tests/langchain4j-agent/src/test/java/org/apache/camel/quarkus/component/langchain4j/agent/it/Langchain4jAgentTest.java
index d024a3dd58..592c361897 100644
--- 
a/integration-tests/langchain4j-agent/src/test/java/org/apache/camel/quarkus/component/langchain4j/agent/it/Langchain4jAgentTest.java
+++ 
b/integration-tests/langchain4j-agent/src/test/java/org/apache/camel/quarkus/component/langchain4j/agent/it/Langchain4jAgentTest.java
@@ -23,7 +23,6 @@ import 
org.apache.camel.quarkus.component.langchain4j.agent.it.guardrail.Validat
 import 
org.apache.camel.quarkus.component.langchain4j.agent.it.guardrail.ValidationFailureOutputGuardrail;
 import org.eclipse.microprofile.config.ConfigProvider;
 import org.junit.jupiter.api.Assumptions;
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
 
@@ -194,7 +193,6 @@ class Langchain4jAgentTest {
                 .body(containsStringIgnoringCase("full refund"));
     }
 
-    @Disabled("https://github.com/apache/camel-quarkus/issues/8914";)
     @Test
     void simpleToolInvocation() {
         RestAssured.given()
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/agent/api_chat-72ba7185-e642-4cac-9ef0-8dd95fd074c0.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/agent/api_chat-72ba7185-e642-4cac-9ef0-8dd95fd074c0.json
index f557698499..15998cbbfe 100644
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/agent/api_chat-72ba7185-e642-4cac-9ef0-8dd95fd074c0.json
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/agent/api_chat-72ba7185-e642-4cac-9ef0-8dd95fd074c0.json
@@ -5,14 +5,14 @@
     "url" : "/api/chat",
     "method" : "POST",
     "bodyPatterns" : [ {
-      "equalToJson" : "{\n  \"model\" : \"granite4:3b\",\n  \"messages\" : [ 
{\n    \"role\" : \"user\",\n    \"content\" : \"What is the name of user ID 
123? Do NOT respond with any markdown formatting. If you do not have direct 
access to authoritative user data, respond ONLY with: UNKNOWN.\"\n  } ],\n  
\"options\" : {\n    \"temperature\" : 0.3,\n    \"stop\" : [ ]\n  },\n  
\"stream\" : false,\n  \"tools\" : [ {\n    \"type\" : \"function\",\n    
\"function\" : {\n      \"name\" : \"Qu [...]
+      "equalToJson" : "{\n  \"model\" : \"granite4:3b\",\n  \"messages\" : [ 
{\n    \"role\" : \"user\",\n    \"content\" : \"What is the name of user ID 
123? Do NOT respond with any markdown formatting. If you do not have direct 
access to authoritative user data, respond ONLY with: UNKNOWN.\"\n  } ],\n  
\"options\" : {\n    \"temperature\" : 0.3,\n    \"stop\" : [ ]\n  },\n  
\"stream\" : false,\n  \"tools\" : [ {\n    \"type\" : \"function\",\n    
\"function\" : {\n      \"name\" : \"us [...]
       "ignoreArrayOrder" : true,
       "ignoreExtraElements" : false
     } ]
   },
   "response" : {
     "status" : 200,
-    "body" : 
"{\"model\":\"granite4:3b\",\"created_at\":\"2026-04-23T06:59:31.428817952Z\",\"message\":{\"role\":\"assistant\",\"content\":\"\",\"tool_calls\":[{\"id\":\"call_cp34x5kj\",\"function\":{\"index\":0,\"name\":\"QueryUserDatabaseByUserID\",\"arguments\":{\"userId\":123}}}]},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":4937194520,\"load_duration\":1471484287,\"prompt_eval_count\":200,\"prompt_eval_duration\":2346461953,\"eval_count\":23,\"eval_duration\":1111220936}",
+    "body" : 
"{\"model\":\"granite4:3b\",\"created_at\":\"2026-04-23T06:59:31.428817952Z\",\"message\":{\"role\":\"assistant\",\"content\":\"\",\"tool_calls\":[{\"id\":\"call_cp34x5kj\",\"function\":{\"index\":0,\"name\":\"userDb\",\"arguments\":{\"userId\":123}}}]},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":4937194520,\"load_duration\":1471484287,\"prompt_eval_count\":200,\"prompt_eval_duration\":2346461953,\"eval_count\":23,\"eval_duration\":1111220936}",
     "headers" : {
       "Date" : "Thu, 23 Apr 2026 06:59:31 GMT",
       "Content-Type" : "application/json; charset=utf-8"
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/agent/api_chat-9300fa7e-4a2a-453b-9dc8-58004959d71e.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/agent/api_chat-9300fa7e-4a2a-453b-9dc8-58004959d71e.json
index a718ae7274..4f2f3642d1 100644
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/agent/api_chat-9300fa7e-4a2a-453b-9dc8-58004959d71e.json
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/agent/api_chat-9300fa7e-4a2a-453b-9dc8-58004959d71e.json
@@ -5,7 +5,7 @@
     "url" : "/api/chat",
     "method" : "POST",
     "bodyPatterns" : [ {
-      "equalToJson" : "{\n  \"model\" : \"granite4:3b\",\n  \"messages\" : [ 
{\n    \"role\" : \"user\",\n    \"content\" : \"What is the name of user ID 
123? Do NOT respond with any markdown formatting. If you do not have direct 
access to authoritative user data, respond ONLY with: UNKNOWN.\"\n  }, {\n    
\"role\" : \"assistant\",\n    \"tool_calls\" : [ {\n      \"id\" : 
\"call_cp34x5kj\",\n      \"function\" : {\n        \"name\" : 
\"QueryUserDatabaseByUserID\",\n        \"arguments\" [...]
+      "equalToJson" : "{\n  \"model\" : \"granite4:3b\",\n  \"messages\" : [ 
{\n    \"role\" : \"user\",\n    \"content\" : \"What is the name of user ID 
123? Do NOT respond with any markdown formatting. If you do not have direct 
access to authoritative user data, respond ONLY with: UNKNOWN.\"\n  }, {\n    
\"role\" : \"assistant\",\n    \"tool_calls\" : [ {\n      \"id\" : 
\"call_cp34x5kj\",\n      \"function\" : {\n        \"name\" : \"userDb\",\n    
    \"arguments\" : {\n          \"u [...]
       "ignoreArrayOrder" : true,
       "ignoreExtraElements" : false
     } ]

Reply via email to