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

aldettinger 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 c351d0a350 langchain-agent: fix issue when using OnnxBertBiEncoder 
models in rag scenarios #8370 (#8371)
c351d0a350 is described below

commit c351d0a350876c217e0076446326c5a6729aacfd
Author: Alexandre Gallice <[email protected]>
AuthorDate: Wed Mar 4 09:41:24 2026 +0100

    langchain-agent: fix issue when using OnnxBertBiEncoder models in rag 
scenarios #8370 (#8371)
---
 .../deployment/SupportLangchain4jProcessor.java    | 173 +++++++++++++++++++
 extensions-support/langchain4j/runtime/pom.xml     |   4 +
 .../deployment/Langchain4jEmbeddingsProcessor.java | 186 ---------------------
 extensions/langchain4j-embeddings/runtime/pom.xml  |   4 -
 integration-tests/langchain4j-agent/pom.xml        |   4 +
 .../langchain4j/agent/it/AgentProducers.java       |   8 +-
 ..._chat-19496598-286d-4354-8021-d0141973f657.json |  24 +++
 ...chat-3553e0ce-5315-4adc-9cf9-7aa020d3fa0c.json} |   8 +-
 ..._chat-3c82f8a7-b924-42cb-9126-70d5a4ff06eb.json |  27 ---
 ...chat-3dbd2721-ecf7-4960-a6d9-532629c974d1.json} |   8 +-
 ..._chat-46dd74e1-aa17-497e-bad5-fc74ee8d7959.json |  24 +++
 ..._chat-4b8e8d96-42d7-4a16-87ca-c1858066e648.json |  24 +++
 ..._chat-4bd017da-a2a1-4206-b70e-7c0a3f9ddc11.json |  26 +++
 ...chat-50282a37-becc-455a-829b-8c95dbfeac83.json} |   8 +-
 ...chat-5b13dcfa-8f76-45b3-a149-6c43182869dd.json} |   8 +-
 ...chat-63b71ca8-026b-471b-a34a-da7660be2631.json} |   8 +-
 ..._chat-64ccec1c-9992-4a1c-a437-c8103348e6d9.json |  24 ---
 ...chat-65a5a977-8a4c-4c28-aff7-f4dc7500df43.json} |   8 +-
 ..._chat-68c8507d-160c-4641-9a22-84bbe4806890.json |  24 +++
 ...chat-6b1b3f2e-5aa1-4c9b-88d3-f24a10590c6f.json} |   8 +-
 ..._chat-6fdb3b04-ba4c-4add-956c-e1c8ec82f799.json |  24 ---
 ..._chat-7ac8e750-c3b8-4a7f-be22-4776aa5d8cad.json |  24 ---
 ..._chat-84aa25c6-6069-4780-b9d4-4068a07c101a.json |  24 +++
 ...chat-98a9059a-eb53-4580-af3c-d32c1a30b95d.json} |   8 +-
 ...chat-b682d927-b36f-427d-b404-b754b054ddb9.json} |   8 +-
 ..._chat-b8cb81a6-f441-486c-9ae8-b6e0cecb7640.json |  26 ---
 ...chat-cbafc9dd-bc75-4283-aba6-e2950556ba5f.json} |   8 +-
 ...chat-d2554971-ae78-4b13-99c0-57def81dfb2e.json} |   8 +-
 ..._chat-d366f73b-f02a-4f62-ad43-836f42226e05.json |  24 +++
 ...chat-e7f6e7af-412b-4f34-887c-d19ee0c66d8b.json} |  10 +-
 ...chat-ea5aa343-879e-4dd0-94f5-c32886e33ec6.json} |   8 +-
 ..._chat-ed06950e-1368-45a1-a414-2a0c447e2ca6.json |  24 ---
 ..._chat-f265676e-9355-40b6-9593-926440edd441.json |  24 ---
 ..._chat-f45a3c47-6000-4594-b413-de1ab5174897.json |  24 ---
 ..._chat-f472d5b5-8789-4bd9-8e7d-8649badd493b.json |  27 +++
 ...embed-1e8084ee-91b3-4095-86b7-9845fe1480d6.json |  24 ---
 ...embed-a75f0506-7e8e-453b-9ec8-bd62378fd23d.json |  24 ---
 37 files changed, 433 insertions(+), 494 deletions(-)

diff --git 
a/extensions-support/langchain4j/deployment/src/main/java/org/apache/camel/quarkus/component/support/langchain4j/deployment/SupportLangchain4jProcessor.java
 
b/extensions-support/langchain4j/deployment/src/main/java/org/apache/camel/quarkus/component/support/langchain4j/deployment/SupportLangchain4jProcessor.java
index 43d43b5076..6c74ee9185 100644
--- 
a/extensions-support/langchain4j/deployment/src/main/java/org/apache/camel/quarkus/component/support/langchain4j/deployment/SupportLangchain4jProcessor.java
+++ 
b/extensions-support/langchain4j/deployment/src/main/java/org/apache/camel/quarkus/component/support/langchain4j/deployment/SupportLangchain4jProcessor.java
@@ -16,12 +16,16 @@
  */
 package org.apache.camel.quarkus.component.support.langchain4j.deployment;
 
+import java.io.IOException;
+import java.net.URL;
 import java.util.Collection;
+import java.util.Enumeration;
 import java.util.HashSet;
 import java.util.Set;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
+import ai.djl.util.NativeResource;
 import com.fasterxml.jackson.databind.JsonDeserializer;
 import com.fasterxml.jackson.databind.JsonSerializer;
 import com.fasterxml.jackson.databind.PropertyNamingStrategies;
@@ -29,17 +33,21 @@ import dev.langchain4j.agent.tool.Tool;
 import dev.langchain4j.guardrail.InputGuardrail;
 import dev.langchain4j.guardrail.JsonExtractorOutputGuardrail;
 import dev.langchain4j.guardrail.OutputGuardrail;
+import dev.langchain4j.model.embedding.onnx.AbstractInProcessEmbeddingModel;
 import dev.langchain4j.service.MemoryId;
 import dev.langchain4j.service.SystemMessage;
 import dev.langchain4j.service.UserMessage;
 import dev.langchain4j.service.V;
+import io.quarkus.bootstrap.classloading.QuarkusClassLoader;
 import io.quarkus.bootstrap.model.ApplicationModel;
 import io.quarkus.deployment.annotations.BuildProducer;
 import io.quarkus.deployment.annotations.BuildStep;
 import io.quarkus.deployment.annotations.BuildSteps;
 import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
 import io.quarkus.deployment.builditem.IndexDependencyBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.JniRuntimeAccessBuildItem;
 import 
io.quarkus.deployment.builditem.nativeimage.NativeImageProxyDefinitionBuildItem;
+import 
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
 import 
io.quarkus.deployment.builditem.nativeimage.NativeImageResourcePatternsBuildItem;
 import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
 import 
io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
@@ -47,7 +55,9 @@ import 
io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem;
 import io.quarkus.deployment.pkg.builditem.CurateOutcomeBuildItem;
 import io.quarkus.deployment.pkg.steps.NativeOrNativeSourcesBuild;
 import io.quarkus.maven.dependency.ResolvedDependency;
+import io.smallrye.common.os.OS;
 import opennlp.tools.sentdetect.SentenceDetectorFactory;
+import org.apache.camel.util.ObjectHelper;
 import org.jboss.jandex.AnnotationInstance;
 import org.jboss.jandex.AnnotationTarget;
 import org.jboss.jandex.ClassInfo;
@@ -231,4 +241,167 @@ class SupportLangchain4jProcessor {
         return classes.stream()
                 .filter(classInfo -> 
classInfo.name().toString().startsWith("dev.langchain4j"));
     }
+
+    @BuildStep(onlyIf = NativeOrNativeSourcesBuild.class)
+    void indexDjlDependencies(
+            CurateOutcomeBuildItem curateOutcome,
+            BuildProducer<IndexDependencyBuildItem> indexDependency) {
+
+        ApplicationModel applicationModel = 
curateOutcome.getApplicationModel();
+        for (ResolvedDependency dependency : 
applicationModel.getDependencies()) {
+            String groupId = dependency.getGroupId();
+            String artifactId = dependency.getArtifactId();
+
+            // Index ai.djl dependencies
+            if (groupId.startsWith("ai.djl")) {
+                indexDependency.produce(new IndexDependencyBuildItem(groupId, 
artifactId));
+            }
+        }
+    }
+
+    @BuildStep(onlyIf = NativeOrNativeSourcesBuild.class)
+    void nativeImageResources(
+            CurateOutcomeBuildItem curateOutcome,
+            BuildProducer<NativeImageResourcePatternsBuildItem> 
nativeImageResourcePattern,
+            BuildProducer<NativeImageResourceBuildItem> nativeImageResource) {
+
+        // The supported platforms for native binaries within 
ai.djl.huggingface:tokenizers & com.microsoft.onnxruntime:onnxruntime
+        String os = switch (OS.current()) {
+        case LINUX -> "linux";
+        case WINDOWS -> "win";
+        case MAC -> "osx";
+        default -> null;
+        };
+
+        // Search for native binaries for the target platform and add them to 
the native image
+        String osArch = System.getProperty("os.arch");
+        if (ObjectHelper.isNotEmpty(os)) {
+            Stream.of(AI_LIBRARY.values()).forEach(aiLibrary -> {
+                try {
+                    String binaryPath = aiLibrary.getBinaryPath(os);
+                    Enumeration<URL> resources = Thread.currentThread()
+                            .getContextClassLoader()
+                            .getResources(binaryPath);
+                    if (resources.hasMoreElements()) {
+                        nativeImageResourcePattern
+                                
.produce(NativeImageResourcePatternsBuildItem.builder()
+                                        .includeGlobs(binaryPath + 
"/**").build());
+                    } else {
+                        throw new RuntimeException(
+                                "Failed to find required native binaries on 
classpath at %s".formatted(binaryPath));
+                    }
+                } catch (IOException e) {
+                    throw new RuntimeException(e);
+                }
+            });
+        } else {
+            throw new RuntimeException("%s does not support platform 
%s-%s".formatted("SupportLangchain4j", os, osArch));
+        }
+
+        nativeImageResource.produce(new 
NativeImageResourceBuildItem("native/lib/tokenizers.properties"));
+
+        for (ResolvedDependency dependency : 
curateOutcome.getApplicationModel().getDependencies()) {
+            String artifactId = dependency.getArtifactId();
+
+            // Native image resources for embeddings tokenizer metadata
+            String prefix = "langchain4j-embeddings-";
+            if (artifactId.startsWith(prefix)) {
+                String embeddingLibType = 
artifactId.substring(prefix.length());
+                nativeImageResource.produce(new 
NativeImageResourceBuildItem(embeddingLibType + ".onnx"));
+                nativeImageResource.produce(new 
NativeImageResourceBuildItem(embeddingLibType + "-tokenizer.json"));
+            }
+        }
+    }
+
+    @BuildStep(onlyIf = NativeOrNativeSourcesBuild.class)
+    void jniRuntimeSupport(
+            BuildProducer<ReflectiveClassBuildItem> reflectiveClass,
+            BuildProducer<JniRuntimeAccessBuildItem> jniRuntimeAccess) {
+
+        String[] jniReflectiveClasses = new String[] {
+                "ai.onnxruntime.TensorInfo",
+                "ai.onnxruntime.SequenceInfo",
+                "ai.onnxruntime.MapInfo",
+                "ai.onnxruntime.OrtException",
+                "ai.onnxruntime.OnnxSparseTensor",
+                "ai.djl.huggingface.tokenizers.jni.CharSpan",
+                "[Lai.djl.huggingface.tokenizers.jni.CharSpan;",
+                "[Lai.onnxruntime.OnnxValue;",
+                "[Ljava.lang.String;",
+                "ai.onnxruntime.OnnxTensor",
+                "ai.onnxruntime.OnnxValue",
+                "ai.onnxruntime.TensorInfo",
+                "ai.onnxruntime.OnnxTensor",
+                "java.lang.Boolean",
+                "java.lang.String"
+        };
+
+        reflectiveClass.produce(
+                ReflectiveClassBuildItem.builder(jniReflectiveClasses)
+                        .fields()
+                        .methods()
+                        .build());
+
+        jniRuntimeAccess.produce(
+                new JniRuntimeAccessBuildItem(true, true, true, 
jniReflectiveClasses));
+
+        
reflectiveClass.produce(ReflectiveClassBuildItem.builder("opennlp.tools.sentdetect.SentenceDetectorFactory").build());
+    }
+
+    @BuildStep(onlyIf = NativeOrNativeSourcesBuild.class)
+    void runtimeInitializedClasses(
+            CombinedIndexBuildItem combinedIndex,
+            BuildProducer<RuntimeInitializedClassBuildItem> 
runtimeInitializedClass) {
+
+        IndexView index = combinedIndex.getIndex();
+
+        // Due to JNI usage the following types must be initialized at runtime
+        index.getAllKnownSubclasses(AbstractInProcessEmbeddingModel.class)
+                .stream()
+                .map(classInfo -> classInfo.name().toString())
+                .map(RuntimeInitializedClassBuildItem::new)
+                .forEach(runtimeInitializedClass::produce);
+
+        index.getAllKnownSubclasses(NativeResource.class)
+                .stream()
+                .map(classInfo -> classInfo.name().toString())
+                .map(RuntimeInitializedClassBuildItem::new)
+                .forEach(runtimeInitializedClass::produce);
+
+        Stream.of("ai.djl.huggingface.tokenizers.jni.TokenizersLibrary",
+                "ai.djl.huggingface.tokenizers.jni.LibUtils",
+                "ai.djl.util.Platform",
+                "ai.onnxruntime.OrtEnvironment",
+                "ai.onnxruntime.OnnxRuntime",
+                "ai.onnxruntime.OnnxTensorLike",
+                "ai.onnxruntime.OrtSession$SessionOptions")
+                .filter(QuarkusClassLoader::isClassPresentAtRuntime)
+                .map(RuntimeInitializedClassBuildItem::new)
+                .forEach(runtimeInitializedClass::produce);
+    }
+
+    enum AI_LIBRARY {
+        AI_DJL_HUGGINGFACE_TOKENIZERS("ai/onnxruntime/native/%s-%s", "x64"),
+        COM_MICROSOFT_ONNXRUNTIME("native/lib/%s-%s/cpu", "x86_64");
+
+        private final String binaryPathTemplate;
+        private final String x86Arch;
+
+        AI_LIBRARY(String binaryPathTemplate, String x86Arch) {
+            this.binaryPathTemplate = binaryPathTemplate;
+            this.x86Arch = x86Arch;
+        }
+
+        public String getBinaryPath(String os) {
+            return binaryPathTemplate.formatted(os, getBinaryArch());
+        }
+
+        public String getBinaryArch() {
+            String arch = System.getProperty("os.arch");
+            if (arch.equals("amd64")) {
+                return this.x86Arch;
+            }
+            return arch;
+        }
+    }
 }
diff --git a/extensions-support/langchain4j/runtime/pom.xml 
b/extensions-support/langchain4j/runtime/pom.xml
index d4eb765878..f80d4ed20f 100644
--- a/extensions-support/langchain4j/runtime/pom.xml
+++ b/extensions-support/langchain4j/runtime/pom.xml
@@ -46,6 +46,10 @@
             <groupId>dev.langchain4j</groupId>
             <artifactId>langchain4j-core</artifactId>
         </dependency>
+        <dependency>
+            <groupId>dev.langchain4j</groupId>
+            <artifactId>langchain4j-embeddings</artifactId>
+        </dependency>
     </dependencies>
 
     <build>
diff --git 
a/extensions/langchain4j-embeddings/deployment/src/main/java/org/apache/camel/quarkus/component/langchain/embeddings/deployment/Langchain4jEmbeddingsProcessor.java
 
b/extensions/langchain4j-embeddings/deployment/src/main/java/org/apache/camel/quarkus/component/langchain/embeddings/deployment/Langchain4jEmbeddingsProcessor.java
index f2284d8505..0ec6af72e7 100644
--- 
a/extensions/langchain4j-embeddings/deployment/src/main/java/org/apache/camel/quarkus/component/langchain/embeddings/deployment/Langchain4jEmbeddingsProcessor.java
+++ 
b/extensions/langchain4j-embeddings/deployment/src/main/java/org/apache/camel/quarkus/component/langchain/embeddings/deployment/Langchain4jEmbeddingsProcessor.java
@@ -16,31 +16,8 @@
  */
 package org.apache.camel.quarkus.component.langchain.embeddings.deployment;
 
-import java.io.IOException;
-import java.net.URL;
-import java.util.Enumeration;
-import java.util.stream.Stream;
-
-import ai.djl.util.NativeResource;
-import dev.langchain4j.model.embedding.onnx.AbstractInProcessEmbeddingModel;
-import io.quarkus.bootstrap.classloading.QuarkusClassLoader;
-import io.quarkus.bootstrap.model.ApplicationModel;
-import io.quarkus.deployment.annotations.BuildProducer;
 import io.quarkus.deployment.annotations.BuildStep;
-import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
 import io.quarkus.deployment.builditem.FeatureBuildItem;
-import io.quarkus.deployment.builditem.IndexDependencyBuildItem;
-import io.quarkus.deployment.builditem.nativeimage.JniRuntimeAccessBuildItem;
-import 
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
-import 
io.quarkus.deployment.builditem.nativeimage.NativeImageResourcePatternsBuildItem;
-import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import 
io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
-import io.quarkus.deployment.pkg.builditem.CurateOutcomeBuildItem;
-import io.quarkus.deployment.pkg.steps.NativeOrNativeSourcesBuild;
-import io.quarkus.maven.dependency.ResolvedDependency;
-import io.smallrye.common.os.OS;
-import org.apache.camel.util.ObjectHelper;
-import org.jboss.jandex.IndexView;
 
 class Langchain4jEmbeddingsProcessor {
     private static final String FEATURE = "camel-langchain4j-embeddings";
@@ -49,167 +26,4 @@ class Langchain4jEmbeddingsProcessor {
     FeatureBuildItem feature() {
         return new FeatureBuildItem(FEATURE);
     }
-
-    @BuildStep(onlyIf = NativeOrNativeSourcesBuild.class)
-    void indexDependencies(
-            CurateOutcomeBuildItem curateOutcome,
-            BuildProducer<IndexDependencyBuildItem> indexDependency) {
-
-        ApplicationModel applicationModel = 
curateOutcome.getApplicationModel();
-        for (ResolvedDependency dependency : 
applicationModel.getDependencies()) {
-            String groupId = dependency.getGroupId();
-            String artifactId = dependency.getArtifactId();
-
-            // Index ai.djl dependencies
-            if (groupId.startsWith("ai.djl")) {
-                indexDependency.produce(new IndexDependencyBuildItem(groupId, 
artifactId));
-            }
-        }
-    }
-
-    @BuildStep(onlyIf = NativeOrNativeSourcesBuild.class)
-    void nativeImageResources(
-            CurateOutcomeBuildItem curateOutcome,
-            BuildProducer<NativeImageResourcePatternsBuildItem> 
nativeImageResourcePattern,
-            BuildProducer<NativeImageResourceBuildItem> nativeImageResource) {
-
-        // The supported platforms for native binaries within 
ai.djl.huggingface:tokenizers & com.microsoft.onnxruntime:onnxruntime
-        String os = switch (OS.current()) {
-        case LINUX -> "linux";
-        case WINDOWS -> "win";
-        case MAC -> "osx";
-        default -> null;
-        };
-
-        // Search for native binaries for the target platform and add them to 
the native image
-        String osArch = System.getProperty("os.arch");
-        if (ObjectHelper.isNotEmpty(os)) {
-            Stream.of(AI_LIBRARY.values()).forEach(aiLibrary -> {
-                try {
-                    String binaryPath = aiLibrary.getBinaryPath(os);
-                    Enumeration<URL> resources = Thread.currentThread()
-                            .getContextClassLoader()
-                            .getResources(binaryPath);
-                    if (resources.hasMoreElements()) {
-                        nativeImageResourcePattern
-                                
.produce(NativeImageResourcePatternsBuildItem.builder()
-                                        .includeGlobs(binaryPath + 
"/**").build());
-                    } else {
-                        throw new RuntimeException(
-                                "Failed to find required native binaries on 
classpath at %s".formatted(binaryPath));
-                    }
-                } catch (IOException e) {
-                    throw new RuntimeException(e);
-                }
-            });
-        } else {
-            throw new RuntimeException("%s does not support platform 
%s-%s".formatted(FEATURE, os, osArch));
-        }
-
-        nativeImageResource.produce(new 
NativeImageResourceBuildItem("native/lib/tokenizers.properties"));
-
-        for (ResolvedDependency dependency : 
curateOutcome.getApplicationModel().getDependencies()) {
-            String artifactId = dependency.getArtifactId();
-
-            // Native image resources for embeddings tokenizer metadata
-            String prefix = "langchain4j-embeddings-";
-            if (artifactId.startsWith(prefix)) {
-                String embeddingLibType = 
artifactId.substring(prefix.length());
-                nativeImageResource.produce(new 
NativeImageResourceBuildItem(embeddingLibType + ".onnx"));
-                nativeImageResource.produce(new 
NativeImageResourceBuildItem(embeddingLibType + "-tokenizer.json"));
-            }
-        }
-    }
-
-    @BuildStep(onlyIf = NativeOrNativeSourcesBuild.class)
-    void jniRuntimeSupport(
-            BuildProducer<ReflectiveClassBuildItem> reflectiveClass,
-            BuildProducer<JniRuntimeAccessBuildItem> jniRuntimeAccess) {
-
-        String[] jniReflectiveClasses = new String[] {
-                "ai.onnxruntime.TensorInfo",
-                "ai.onnxruntime.SequenceInfo",
-                "ai.onnxruntime.MapInfo",
-                "ai.onnxruntime.OrtException",
-                "ai.onnxruntime.OnnxSparseTensor",
-                "ai.djl.huggingface.tokenizers.jni.CharSpan",
-                "[Lai.djl.huggingface.tokenizers.jni.CharSpan;",
-                "[Lai.onnxruntime.OnnxValue;",
-                "[Ljava.lang.String;",
-                "ai.onnxruntime.OnnxTensor",
-                "ai.onnxruntime.OnnxValue",
-                "ai.onnxruntime.TensorInfo",
-                "ai.onnxruntime.OnnxTensor",
-                "java.lang.Boolean",
-                "java.lang.String"
-        };
-
-        reflectiveClass.produce(
-                ReflectiveClassBuildItem.builder(jniReflectiveClasses)
-                        .fields()
-                        .methods()
-                        .build());
-
-        jniRuntimeAccess.produce(
-                new JniRuntimeAccessBuildItem(true, true, true, 
jniReflectiveClasses));
-
-        
reflectiveClass.produce(ReflectiveClassBuildItem.builder("opennlp.tools.sentdetect.SentenceDetectorFactory").build());
-    }
-
-    @BuildStep(onlyIf = NativeOrNativeSourcesBuild.class)
-    void runtimeInitializedClasses(
-            CombinedIndexBuildItem combinedIndex,
-            BuildProducer<RuntimeInitializedClassBuildItem> 
runtimeInitializedClass) {
-
-        IndexView index = combinedIndex.getIndex();
-
-        // Due to JNI usage the following types must be initialized at runtime
-        index.getAllKnownSubclasses(AbstractInProcessEmbeddingModel.class)
-                .stream()
-                .map(classInfo -> classInfo.name().toString())
-                .map(RuntimeInitializedClassBuildItem::new)
-                .forEach(runtimeInitializedClass::produce);
-
-        index.getAllKnownSubclasses(NativeResource.class)
-                .stream()
-                .map(classInfo -> classInfo.name().toString())
-                .map(RuntimeInitializedClassBuildItem::new)
-                .forEach(runtimeInitializedClass::produce);
-
-        Stream.of("ai.djl.huggingface.tokenizers.jni.TokenizersLibrary",
-                "ai.djl.huggingface.tokenizers.jni.LibUtils",
-                "ai.djl.util.Platform",
-                "ai.onnxruntime.OrtEnvironment",
-                "ai.onnxruntime.OnnxRuntime",
-                "ai.onnxruntime.OnnxTensorLike",
-                "ai.onnxruntime.OrtSession$SessionOptions")
-                .filter(QuarkusClassLoader::isClassPresentAtRuntime)
-                .map(RuntimeInitializedClassBuildItem::new)
-                .forEach(runtimeInitializedClass::produce);
-    }
-
-    enum AI_LIBRARY {
-        AI_DJL_HUGGINGFACE_TOKENIZERS("ai/onnxruntime/native/%s-%s", "x64"),
-        COM_MICROSOFT_ONNXRUNTIME("native/lib/%s-%s/cpu", "x86_64");
-
-        private final String binaryPathTemplate;
-        private final String x86Arch;
-
-        AI_LIBRARY(String binaryPathTemplate, String x86Arch) {
-            this.binaryPathTemplate = binaryPathTemplate;
-            this.x86Arch = x86Arch;
-        }
-
-        public String getBinaryPath(String os) {
-            return binaryPathTemplate.formatted(os, getBinaryArch());
-        }
-
-        public String getBinaryArch() {
-            String arch = System.getProperty("os.arch");
-            if (arch.equals("amd64")) {
-                return this.x86Arch;
-            }
-            return arch;
-        }
-    }
 }
diff --git a/extensions/langchain4j-embeddings/runtime/pom.xml 
b/extensions/langchain4j-embeddings/runtime/pom.xml
index 18c5f35196..2d790ecc6c 100644
--- a/extensions/langchain4j-embeddings/runtime/pom.xml
+++ b/extensions/langchain4j-embeddings/runtime/pom.xml
@@ -49,10 +49,6 @@
             <groupId>org.apache.camel</groupId>
             <artifactId>camel-langchain4j-embeddings</artifactId>
         </dependency>
-        <dependency>
-            <groupId>dev.langchain4j</groupId>
-            <artifactId>langchain4j-embeddings</artifactId>
-        </dependency>
     </dependencies>
 
     <build>
diff --git a/integration-tests/langchain4j-agent/pom.xml 
b/integration-tests/langchain4j-agent/pom.xml
index f5e7a8a3c7..ba5eece8d0 100644
--- a/integration-tests/langchain4j-agent/pom.xml
+++ b/integration-tests/langchain4j-agent/pom.xml
@@ -59,6 +59,10 @@
             <groupId>dev.langchain4j</groupId>
             <artifactId>langchain4j-ollama</artifactId>
         </dependency>
+        <dependency>
+            <groupId>dev.langchain4j</groupId>
+            <artifactId>langchain4j-embeddings-all-minilm-l6-v2</artifactId>
+        </dependency>
 
         <!-- test dependencies -->
         <dependency>
diff --git 
a/integration-tests/langchain4j-agent/src/main/java/org/apache/camel/quarkus/component/langchain4j/agent/it/AgentProducers.java
 
b/integration-tests/langchain4j-agent/src/main/java/org/apache/camel/quarkus/component/langchain4j/agent/it/AgentProducers.java
index 5f2124c2d2..8617d3f8c1 100644
--- 
a/integration-tests/langchain4j-agent/src/main/java/org/apache/camel/quarkus/component/langchain4j/agent/it/AgentProducers.java
+++ 
b/integration-tests/langchain4j-agent/src/main/java/org/apache/camel/quarkus/component/langchain4j/agent/it/AgentProducers.java
@@ -33,8 +33,8 @@ import dev.langchain4j.memory.chat.ChatMemoryProvider;
 import dev.langchain4j.memory.chat.MessageWindowChatMemory;
 import dev.langchain4j.model.chat.ChatModel;
 import dev.langchain4j.model.embedding.EmbeddingModel;
+import 
dev.langchain4j.model.embedding.onnx.allminilml6v2.AllMiniLmL6V2EmbeddingModel;
 import dev.langchain4j.model.ollama.OllamaChatModel;
-import dev.langchain4j.model.ollama.OllamaEmbeddingModel;
 import dev.langchain4j.rag.DefaultRetrievalAugmentor;
 import dev.langchain4j.rag.RetrievalAugmentor;
 import dev.langchain4j.rag.content.retriever.EmbeddingStoreContentRetriever;
@@ -108,11 +108,7 @@ public class AgentProducers {
 
             List<TextSegment> segments = DocumentSplitters.recursive(300, 
100).split(document);
 
-            EmbeddingModel embeddingModel = OllamaEmbeddingModel.builder()
-                    .baseUrl(baseUrl)
-                    .modelName("nomic-embed-text")
-                    .timeout(Duration.ofSeconds(30))
-                    .build();
+            EmbeddingModel embeddingModel = new AllMiniLmL6V2EmbeddingModel();
 
             List<Embedding> embeddings = 
embeddingModel.embedAll(segments).content();
 
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-19496598-286d-4354-8021-d0141973f657.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-19496598-286d-4354-8021-d0141973f657.json
new file mode 100644
index 0000000000..66426d79ea
--- /dev/null
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-19496598-286d-4354-8021-d0141973f657.json
@@ -0,0 +1,24 @@
+{
+  "id" : "19496598-286d-4354-8021-d0141973f657",
+  "name" : "api_chat",
+  "request" : {
+    "url" : "/api/chat",
+    "method" : "POST",
+    "bodyPatterns" : [ {
+      "equalToJson" : "{\n  \"model\" : \"granite4:3b\",\n  \"messages\" : [ 
{\n    \"role\" : \"user\",\n    \"content\" : \"Please list your available 
tools. You MUST respond using ONLY valid JSON with tool names as an array. DO 
NOT add explanations. DO NOT add comments. DO NOT wrap in markdown.\"\n  } ],\n 
 \"options\" : {\n    \"temperature\" : 0.3,\n    \"stop\" : [ ]\n  },\n  
\"stream\" : false,\n  \"tools\" : [ {\n    \"type\" : \"function\",\n    
\"function\" : {\n      \"name\"  [...]
+      "ignoreArrayOrder" : true,
+      "ignoreExtraElements" : false
+    } ]
+  },
+  "response" : {
+    "status" : 200,
+    "body" : 
"{\"model\":\"granite4:3b\",\"created_at\":\"2026-03-03T15:25:55.26755228Z\",\"message\":{\"role\":\"assistant\",\"content\":\"[\\n
  \\\"longRunningOperation\\\",\\n  \\\"add\\\",\\n  
\\\"echo\\\"\\n]\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":7199497126,\"load_duration\":44301920,\"prompt_eval_count\":326,\"prompt_eval_duration\":6246528366,\"eval_count\":17,\"eval_duration\":894557129}",
+    "headers" : {
+      "Date" : "Tue, 03 Mar 2026 15:25:55 GMT",
+      "Content-Type" : "application/json; charset=utf-8"
+    }
+  },
+  "uuid" : "19496598-286d-4354-8021-d0141973f657",
+  "persistent" : true,
+  "insertionIndex" : 14
+}
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-d71f7bb9-5a9e-4317-aecd-49cd95dbadb1.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-3553e0ce-5315-4adc-9cf9-7aa020d3fa0c.json
similarity index 52%
rename from 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-d71f7bb9-5a9e-4317-aecd-49cd95dbadb1.json
rename to 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-3553e0ce-5315-4adc-9cf9-7aa020d3fa0c.json
index bf6b7e86ae..48299e2f16 100644
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-d71f7bb9-5a9e-4317-aecd-49cd95dbadb1.json
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-3553e0ce-5315-4adc-9cf9-7aa020d3fa0c.json
@@ -1,5 +1,5 @@
 {
-  "id" : "d71f7bb9-5a9e-4317-aecd-49cd95dbadb1",
+  "id" : "3553e0ce-5315-4adc-9cf9-7aa020d3fa0c",
   "name" : "api_chat",
   "request" : {
     "url" : "/api/chat",
@@ -12,13 +12,13 @@
   },
   "response" : {
     "status" : 200,
-    "body" : 
"{\"model\":\"orca-mini\",\"created_at\":\"2026-01-21T08:01:42.350557334Z\",\"message\":{\"role\":\"assistant\",\"content\":\"
 Understood. What is the format of the JSON object you would like me to 
generate?\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":941950589,\"load_duration\":11792098,\"prompt_eval_count\":52,\"prompt_eval_duration\":197951402,\"eval_count\":19,\"eval_duration\":727631062}",
+    "body" : 
"{\"model\":\"orca-mini\",\"created_at\":\"2026-03-03T15:26:19.916999414Z\",\"message\":{\"role\":\"assistant\",\"content\":\"
 Sure, I can help with that! Can you please provide me with the specific format 
you want the JSON object to 
follow?\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":1770008575,\"load_duration\":17062707,\"prompt_eval_count\":52,\"prompt_eval_duration\":479905991,\"eval_count\":26,\"eval_duration\":1265578814}",
     "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:01:42 GMT",
+      "Date" : "Tue, 03 Mar 2026 15:26:19 GMT",
       "Content-Type" : "application/json; charset=utf-8"
     }
   },
-  "uuid" : "d71f7bb9-5a9e-4317-aecd-49cd95dbadb1",
+  "uuid" : "3553e0ce-5315-4adc-9cf9-7aa020d3fa0c",
   "persistent" : true,
   "insertionIndex" : 6
 }
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-3c82f8a7-b924-42cb-9126-70d5a4ff06eb.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-3c82f8a7-b924-42cb-9126-70d5a4ff06eb.json
deleted file mode 100644
index 0678ca81b9..0000000000
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-3c82f8a7-b924-42cb-9126-70d5a4ff06eb.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
-  "id" : "3c82f8a7-b924-42cb-9126-70d5a4ff06eb",
-  "name" : "api_chat",
-  "request" : {
-    "url" : "/api/chat",
-    "method" : "POST",
-    "bodyPatterns" : [ {
-      "equalToJson" : "{\n  \"model\" : \"orca-mini\",\n  \"messages\" : [ {\n 
   \"role\" : \"system\",\n    \"content\" : \"You are a whimsical storyteller. 
Your responses should be imaginative, descriptive, and always include a touch 
of magic. Start every story with 'Once upon a starlit night...'\"\n  }, {\n    
\"role\" : \"user\",\n    \"content\" : \"Write a short story about a lost 
cat.\"\n  } ],\n  \"options\" : {\n    \"temperature\" : 0.3,\n    \"stop\" : [ 
]\n  },\n  \"stream\" [...]
-      "ignoreArrayOrder" : true,
-      "ignoreExtraElements" : false
-    } ]
-  },
-  "response" : {
-    "status" : 200,
-    "body" : 
"{\"model\":\"orca-mini\",\"created_at\":\"2026-01-21T08:01:18.396026391Z\",\"message\":{\"role\":\"assistant\",\"content\":\"
 Once upon a starlit night, a curious little girl named Lily was out exploring 
her neighborhood. She loved nothing more than to wander through the lush green 
trees and colorful flowers that surrounded her home. As she wandered deeper 
into the woods, she heard a faint meowing sound. Curiosity getting the better 
of her, she followed the sound until she  [...]
-    "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:01:18 GMT",
-      "Content-Type" : "application/json; charset=utf-8"
-    }
-  },
-  "uuid" : "3c82f8a7-b924-42cb-9126-70d5a4ff06eb",
-  "persistent" : true,
-  "scenarioName" : "scenario-1-api-chat",
-  "requiredScenarioState" : "Started",
-  "newScenarioState" : "scenario-1-api-chat-2",
-  "insertionIndex" : 16
-}
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-b9e443eb-f523-43c5-b15a-5b481b00ad7e.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-3dbd2721-ecf7-4960-a6d9-532629c974d1.json
similarity index 77%
rename from 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-b9e443eb-f523-43c5-b15a-5b481b00ad7e.json
rename to 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-3dbd2721-ecf7-4960-a6d9-532629c974d1.json
index 16e90daed7..59a3865afa 100644
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-b9e443eb-f523-43c5-b15a-5b481b00ad7e.json
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-3dbd2721-ecf7-4960-a6d9-532629c974d1.json
@@ -1,5 +1,5 @@
 {
-  "id" : "b9e443eb-f523-43c5-b15a-5b481b00ad7e",
+  "id" : "3dbd2721-ecf7-4960-a6d9-532629c974d1",
   "name" : "api_chat",
   "request" : {
     "url" : "/api/chat",
@@ -12,13 +12,13 @@
   },
   "response" : {
     "status" : 200,
-    "body" : 
"{\"model\":\"granite4:3b\",\"created_at\":\"2026-01-21T08:00:56.666262664Z\",\"message\":{\"role\":\"assistant\",\"content\":\"The
 name of user ID 123 is John 
Doe.\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":839226209,\"load_duration\":45703671,\"prompt_eval_count\":230,\"prompt_eval_duration\":343699976,\"eval_count\":12,\"eval_duration\":440847701}",
+    "body" : 
"{\"model\":\"granite4:3b\",\"created_at\":\"2026-03-03T15:25:15.36019929Z\",\"message\":{\"role\":\"assistant\",\"content\":\"John
 
Doe\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":873488110,\"load_duration\":53320906,\"prompt_eval_count\":248,\"prompt_eval_duration\":704054631,\"eval_count\":3,\"eval_duration\":110231366}",
     "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:00:56 GMT",
+      "Date" : "Tue, 03 Mar 2026 15:25:15 GMT",
       "Content-Type" : "application/json; charset=utf-8"
     }
   },
-  "uuid" : "b9e443eb-f523-43c5-b15a-5b481b00ad7e",
+  "uuid" : "3dbd2721-ecf7-4960-a6d9-532629c974d1",
   "persistent" : true,
   "insertionIndex" : 19
 }
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-46dd74e1-aa17-497e-bad5-fc74ee8d7959.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-46dd74e1-aa17-497e-bad5-fc74ee8d7959.json
new file mode 100644
index 0000000000..e58e9d79b1
--- /dev/null
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-46dd74e1-aa17-497e-bad5-fc74ee8d7959.json
@@ -0,0 +1,24 @@
+{
+  "id" : "46dd74e1-aa17-497e-bad5-fc74ee8d7959",
+  "name" : "api_chat",
+  "request" : {
+    "url" : "/api/chat",
+    "method" : "POST",
+    "bodyPatterns" : [ {
+      "equalToJson" : "{\n  \"model\" : \"orca-mini\",\n  \"messages\" : [ {\n 
   \"role\" : \"user\",\n    \"content\" : \"Describe the Miles of Camels Car 
Rental cancellations policy for cancelling 24 hours before pickup. What is the 
refund amount?\\n\\nAnswer using the following information:\\nMiles of Camels 
Car Rental - Company Information\\n\\nBUSINESS HOURS:\\nMonday-Friday: 8:00 AM 
- 6:00 PM\\nSaturday: 9:00 AM - 4:00 PM\\nSunday: Closed\\n\\nRENTAL 
AGREEMENT\\n- This agreement i [...]
+      "ignoreArrayOrder" : true,
+      "ignoreExtraElements" : false
+    } ]
+  },
+  "response" : {
+    "status" : 200,
+    "body" : 
"{\"model\":\"orca-mini\",\"created_at\":\"2026-03-03T15:25:09.879393101Z\",\"message\":{\"role\":\"assistant\",\"content\":\"
 According to Miles of Camels Car Rental's cancellations policy, if you cancel 
your rental 24 hours before pickup, you will receive a full refund. If you 
cancel between 12 and 24 hours before pickup, you will receive a 50% refund. If 
you cancel less than 12 hours before pickup, there will be no 
refund.\\n\\nAdditionally, according to the company's veh [...]
+    "headers" : {
+      "Date" : "Tue, 03 Mar 2026 15:25:09 GMT",
+      "Content-Type" : "application/json; charset=utf-8"
+    }
+  },
+  "uuid" : "46dd74e1-aa17-497e-bad5-fc74ee8d7959",
+  "persistent" : true,
+  "insertionIndex" : 21
+}
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-4b8e8d96-42d7-4a16-87ca-c1858066e648.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-4b8e8d96-42d7-4a16-87ca-c1858066e648.json
new file mode 100644
index 0000000000..d0a2327ca8
--- /dev/null
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-4b8e8d96-42d7-4a16-87ca-c1858066e648.json
@@ -0,0 +1,24 @@
+{
+  "id" : "4b8e8d96-42d7-4a16-87ca-c1858066e648",
+  "name" : "api_chat",
+  "request" : {
+    "url" : "/api/chat",
+    "method" : "POST",
+    "bodyPatterns" : [ {
+      "equalToJson" : "{\n  \"model\" : \"granite4:3b\",\n  \"messages\" : [ 
{\n    \"role\" : \"user\",\n    \"content\" : \"Use your available tools to 
perform a long running operation for 2 seconds with 2 steps. DO NOT use any 
markdown formatting in the response.\"\n  } ],\n  \"options\" : {\n    
\"temperature\" : 0.3,\n    \"stop\" : [ ]\n  },\n  \"stream\" : false,\n  
\"tools\" : [ {\n    \"type\" : \"function\",\n    \"function\" : {\n      
\"name\" : \"longRunningOperation\",\n    [...]
+      "ignoreArrayOrder" : true,
+      "ignoreExtraElements" : false
+    } ]
+  },
+  "response" : {
+    "status" : 200,
+    "body" : 
"{\"model\":\"granite4:3b\",\"created_at\":\"2026-03-03T15:25:57.640601581Z\",\"message\":{\"role\":\"assistant\",\"content\":\"\",\"tool_calls\":[{\"id\":\"call_cjncgqra\",\"function\":{\"index\":0,\"name\":\"longRunningOperation\",\"arguments\":{\"duration\":2,\"steps\":2}}}]},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":2356783183,\"load_duration\":47164721,\"prompt_eval_count\":319,\"prompt_eval_duration\":836224093,\"eval_count\":27,\"eval_duration\":1453164185}",
+    "headers" : {
+      "Date" : "Tue, 03 Mar 2026 15:25:57 GMT",
+      "Content-Type" : "application/json; charset=utf-8"
+    }
+  },
+  "uuid" : "4b8e8d96-42d7-4a16-87ca-c1858066e648",
+  "persistent" : true,
+  "insertionIndex" : 13
+}
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-4bd017da-a2a1-4206-b70e-7c0a3f9ddc11.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-4bd017da-a2a1-4206-b70e-7c0a3f9ddc11.json
new file mode 100644
index 0000000000..ffec0f3930
--- /dev/null
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-4bd017da-a2a1-4206-b70e-7c0a3f9ddc11.json
@@ -0,0 +1,26 @@
+{
+  "id" : "4bd017da-a2a1-4206-b70e-7c0a3f9ddc11",
+  "name" : "api_chat",
+  "request" : {
+    "url" : "/api/chat",
+    "method" : "POST",
+    "bodyPatterns" : [ {
+      "equalToJson" : "{\n  \"model\" : \"orca-mini\",\n  \"messages\" : [ {\n 
   \"role\" : \"system\",\n    \"content\" : \"You are a whimsical storyteller. 
Your responses should be imaginative, descriptive, and always include a touch 
of magic. Start every story with 'Once upon a starlit night...'\"\n  }, {\n    
\"role\" : \"user\",\n    \"content\" : \"Write a short story about a lost 
cat.\"\n  } ],\n  \"options\" : {\n    \"temperature\" : 0.3,\n    \"stop\" : [ 
]\n  },\n  \"stream\" [...]
+      "ignoreArrayOrder" : true,
+      "ignoreExtraElements" : false
+    } ]
+  },
+  "response" : {
+    "status" : 200,
+    "body" : 
"{\"model\":\"orca-mini\",\"created_at\":\"2026-03-03T15:26:53.383242474Z\",\"message\":{\"role\":\"assistant\",\"content\":\"
 Once upon a starlit night, a curious little girl named Lily wandered through 
the forest, searching for her missing pet cat. She had been caring for the 
feline for weeks, but he had disappeared without a trace. As she walked deeper 
into the woods, the trees grew thicker and the path became less clear. 
Suddenly, she heard a faint meowing sound coming f [...]
+    "headers" : {
+      "Date" : "Tue, 03 Mar 2026 15:26:53 GMT",
+      "Content-Type" : "application/json; charset=utf-8"
+    }
+  },
+  "uuid" : "4bd017da-a2a1-4206-b70e-7c0a3f9ddc11",
+  "persistent" : true,
+  "scenarioName" : "scenario-1-api-chat",
+  "requiredScenarioState" : "scenario-1-api-chat-2",
+  "insertionIndex" : 1
+}
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-c285552d-f27e-4cf3-a942-ff92a666e118.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-50282a37-becc-455a-829b-8c95dbfeac83.json
similarity index 68%
rename from 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-c285552d-f27e-4cf3-a942-ff92a666e118.json
rename to 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-50282a37-becc-455a-829b-8c95dbfeac83.json
index e60af9f8a7..a984762216 100644
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-c285552d-f27e-4cf3-a942-ff92a666e118.json
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-50282a37-becc-455a-829b-8c95dbfeac83.json
@@ -1,5 +1,5 @@
 {
-  "id" : "c285552d-f27e-4cf3-a942-ff92a666e118",
+  "id" : "50282a37-becc-455a-829b-8c95dbfeac83",
   "name" : "api_chat",
   "request" : {
     "url" : "/api/chat",
@@ -12,13 +12,13 @@
   },
   "response" : {
     "status" : 200,
-    "body" : 
"{\"model\":\"granite4:3b\",\"created_at\":\"2026-01-21T08:00:55.817907064Z\",\"message\":{\"role\":\"assistant\",\"content\":\"\",\"tool_calls\":[{\"id\":\"call_pnsg7jwe\",\"function\":{\"index\":0,\"name\":\"QueryUserDatabaseByUserID\",\"arguments\":{\"userId\":123}}}]},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":4644671100,\"load_duration\":1450597042,\"prompt_eval_count\":182,\"prompt_eval_duration\":2310269399,\"eval_count\":23,\"eval_duration\":872125825}",
+    "body" : 
"{\"model\":\"granite4:3b\",\"created_at\":\"2026-03-03T15:25:14.47274051Z\",\"message\":{\"role\":\"assistant\",\"content\":\"\",\"tool_calls\":[{\"id\":\"call_w3upfd1y\",\"function\":{\"index\":0,\"name\":\"QueryUserDatabaseByUserID\",\"arguments\":{\"userId\":123}}}]},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":4472695102,\"load_duration\":43611230,\"prompt_eval_count\":200,\"prompt_eval_duration\":3210769739,\"eval_count\":23,\"eval_duration\":1200591755}",
     "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:00:55 GMT",
+      "Date" : "Tue, 03 Mar 2026 15:25:14 GMT",
       "Content-Type" : "application/json; charset=utf-8"
     }
   },
-  "uuid" : "c285552d-f27e-4cf3-a942-ff92a666e118",
+  "uuid" : "50282a37-becc-455a-829b-8c95dbfeac83",
   "persistent" : true,
   "insertionIndex" : 20
 }
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-2b0b28a2-8580-47f8-a2a9-d5f1a315c7ba.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-5b13dcfa-8f76-45b3-a149-6c43182869dd.json
similarity index 68%
rename from 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-2b0b28a2-8580-47f8-a2a9-d5f1a315c7ba.json
rename to 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-5b13dcfa-8f76-45b3-a149-6c43182869dd.json
index 8235301012..a2a35834f7 100644
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-2b0b28a2-8580-47f8-a2a9-d5f1a315c7ba.json
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-5b13dcfa-8f76-45b3-a149-6c43182869dd.json
@@ -1,5 +1,5 @@
 {
-  "id" : "2b0b28a2-8580-47f8-a2a9-d5f1a315c7ba",
+  "id" : "5b13dcfa-8f76-45b3-a149-6c43182869dd",
   "name" : "api_chat",
   "request" : {
     "url" : "/api/chat",
@@ -12,13 +12,13 @@
   },
   "response" : {
     "status" : 200,
-    "body" : 
"{\"model\":\"orca-mini\",\"created_at\":\"2026-01-21T08:01:20.936033958Z\",\"message\":{\"role\":\"assistant\",\"content\":\"
 Sure, here's an example JSON object for John Doe:\\n\\n```json\\n{\\n 
\\\"name\\\": \\\"John Doe\\\",\\n \\\"description\\\": \\\"An example person 
with a unique name and a brief 
description\\\"\\n}\\n```\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":2504619772,\"load_duration\":11930628,\"prompt_eval_count\":60,\"prompt_eval_duration\
 [...]
+    "body" : 
"{\"model\":\"orca-mini\",\"created_at\":\"2026-03-03T15:25:47.817132698Z\",\"message\":{\"role\":\"assistant\",\"content\":\"
 Sure, here's an example JSON object for John Doe:\\n\\n```json\\n{\\n 
\\\"name\\\": \\\"John Doe\\\",\\n \\\"description\\\": \\\"An example person 
with a unique name and a brief 
description\\\"\\n}\\n```\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":3933350526,\"load_duration\":11705957,\"prompt_eval_count\":60,\"prompt_eval_duration\
 [...]
     "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:01:20 GMT",
+      "Date" : "Tue, 03 Mar 2026 15:25:47 GMT",
       "Content-Type" : "application/json; charset=utf-8"
     }
   },
-  "uuid" : "2b0b28a2-8580-47f8-a2a9-d5f1a315c7ba",
+  "uuid" : "5b13dcfa-8f76-45b3-a149-6c43182869dd",
   "persistent" : true,
   "insertionIndex" : 15
 }
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-946ce08a-8829-4ffa-b425-6609cd8413e6.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-63b71ca8-026b-471b-a34a-da7660be2631.json
similarity index 62%
rename from 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-946ce08a-8829-4ffa-b425-6609cd8413e6.json
rename to 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-63b71ca8-026b-471b-a34a-da7660be2631.json
index 468449877d..d49c93a8b8 100644
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-946ce08a-8829-4ffa-b425-6609cd8413e6.json
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-63b71ca8-026b-471b-a34a-da7660be2631.json
@@ -1,5 +1,5 @@
 {
-  "id" : "946ce08a-8829-4ffa-b425-6609cd8413e6",
+  "id" : "63b71ca8-026b-471b-a34a-da7660be2631",
   "name" : "api_chat",
   "request" : {
     "url" : "/api/chat",
@@ -12,13 +12,13 @@
   },
   "response" : {
     "status" : 200,
-    "body" : 
"{\"model\":\"orca-mini\",\"created_at\":\"2026-01-21T08:01:47.110185749Z\",\"message\":{\"role\":\"assistant\",\"content\":\"
 Hello, Alice. How can I assist you 
today?\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":613502063,\"load_duration\":11960283,\"prompt_eval_count\":46,\"prompt_eval_duration\":149859087,\"eval_count\":12,\"eval_duration\":448584137}",
+    "body" : 
"{\"model\":\"orca-mini\",\"created_at\":\"2026-03-03T15:26:27.290839245Z\",\"message\":{\"role\":\"assistant\",\"content\":\"
 Hello, Alice. How can I assist you 
today?\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":932736372,\"load_duration\":11343198,\"prompt_eval_count\":46,\"prompt_eval_duration\":341050678,\"eval_count\":12,\"eval_duration\":576140320}",
     "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:01:47 GMT",
+      "Date" : "Tue, 03 Mar 2026 15:26:27 GMT",
       "Content-Type" : "application/json; charset=utf-8"
     }
   },
-  "uuid" : "946ce08a-8829-4ffa-b425-6609cd8413e6",
+  "uuid" : "63b71ca8-026b-471b-a34a-da7660be2631",
   "persistent" : true,
   "scenarioName" : "scenario-2-api-chat",
   "requiredScenarioState" : "scenario-2-api-chat-3",
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-64ccec1c-9992-4a1c-a437-c8103348e6d9.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-64ccec1c-9992-4a1c-a437-c8103348e6d9.json
deleted file mode 100644
index 93970beecf..0000000000
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-64ccec1c-9992-4a1c-a437-c8103348e6d9.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-  "id" : "64ccec1c-9992-4a1c-a437-c8103348e6d9",
-  "name" : "api_chat",
-  "request" : {
-    "url" : "/api/chat",
-    "method" : "POST",
-    "bodyPatterns" : [ {
-      "equalToJson" : "{\n  \"model\" : \"orca-mini\",\n  \"messages\" : [ {\n 
   \"role\" : \"user\",\n    \"content\" : \"What is Apache Camel?\"\n  } ],\n  
\"options\" : {\n    \"temperature\" : 0.3,\n    \"stop\" : [ ]\n  },\n  
\"stream\" : false,\n  \"tools\" : [ ]\n}",
-      "ignoreArrayOrder" : true,
-      "ignoreExtraElements" : false
-    } ]
-  },
-  "response" : {
-    "status" : 200,
-    "body" : 
"{\"model\":\"orca-mini\",\"created_at\":\"2026-01-21T08:01:01.513231611Z\",\"message\":{\"role\":\"assistant\",\"content\":\"
 Apache Camel is an open-source project that provides a framework for building 
and managing business processes that involve multiple services and systems. It 
allows businesses to easily create their own pipelines that integrate data 
between different applications and systems, and manage the flow of data in a 
modular and scalable way. Camel supports a  [...]
-    "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:01:01 GMT",
-      "Content-Type" : "application/json; charset=utf-8"
-    }
-  },
-  "uuid" : "64ccec1c-9992-4a1c-a437-c8103348e6d9",
-  "persistent" : true,
-  "insertionIndex" : 17
-}
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-d4f1693c-88e0-456f-b650-77a6bf6e543f.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-65a5a977-8a4c-4c28-aff7-f4dc7500df43.json
similarity index 64%
rename from 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-d4f1693c-88e0-456f-b650-77a6bf6e543f.json
rename to 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-65a5a977-8a4c-4c28-aff7-f4dc7500df43.json
index 56a8581c2c..95eea777ae 100644
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-d4f1693c-88e0-456f-b650-77a6bf6e543f.json
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-65a5a977-8a4c-4c28-aff7-f4dc7500df43.json
@@ -1,5 +1,5 @@
 {
-  "id" : "d4f1693c-88e0-456f-b650-77a6bf6e543f",
+  "id" : "65a5a977-8a4c-4c28-aff7-f4dc7500df43",
   "name" : "api_chat",
   "request" : {
     "url" : "/api/chat",
@@ -12,13 +12,13 @@
   },
   "response" : {
     "status" : 200,
-    "body" : 
"{\"model\":\"orca-mini\",\"created_at\":\"2026-01-21T08:01:37.577431121Z\",\"message\":{\"role\":\"assistant\",\"content\":\"
 Hello, Alice. How can I assist you 
today?\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":596937019,\"load_duration\":11922904,\"prompt_eval_count\":46,\"prompt_eval_duration\":152871930,\"eval_count\":12,\"eval_duration\":428769988}",
+    "body" : 
"{\"model\":\"orca-mini\",\"created_at\":\"2026-03-03T15:26:13.220162181Z\",\"message\":{\"role\":\"assistant\",\"content\":\"
 Hello, Alice. How can I assist you 
today?\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":900089323,\"load_duration\":9450899,\"prompt_eval_count\":46,\"prompt_eval_duration\":319079740,\"eval_count\":12,\"eval_duration\":567495610}",
     "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:01:37 GMT",
+      "Date" : "Tue, 03 Mar 2026 15:26:13 GMT",
       "Content-Type" : "application/json; charset=utf-8"
     }
   },
-  "uuid" : "d4f1693c-88e0-456f-b650-77a6bf6e543f",
+  "uuid" : "65a5a977-8a4c-4c28-aff7-f4dc7500df43",
   "persistent" : true,
   "scenarioName" : "scenario-2-api-chat",
   "requiredScenarioState" : "scenario-2-api-chat-2",
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-68c8507d-160c-4641-9a22-84bbe4806890.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-68c8507d-160c-4641-9a22-84bbe4806890.json
new file mode 100644
index 0000000000..45e1fc64eb
--- /dev/null
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-68c8507d-160c-4641-9a22-84bbe4806890.json
@@ -0,0 +1,24 @@
+{
+  "id" : "68c8507d-160c-4641-9a22-84bbe4806890",
+  "name" : "api_chat",
+  "request" : {
+    "url" : "/api/chat",
+    "method" : "POST",
+    "bodyPatterns" : [ {
+      "equalToJson" : "{\n  \"model\" : \"orca-mini\",\n  \"messages\" : [ {\n 
   \"role\" : \"user\",\n    \"content\" : \"What is Apache Camel?\"\n  } ],\n  
\"options\" : {\n    \"temperature\" : 0.3,\n    \"stop\" : [ ]\n  },\n  
\"stream\" : false,\n  \"tools\" : [ ]\n}",
+      "ignoreArrayOrder" : true,
+      "ignoreExtraElements" : false
+    } ]
+  },
+  "response" : {
+    "status" : 200,
+    "body" : 
"{\"model\":\"orca-mini\",\"created_at\":\"2026-03-03T15:25:21.603626775Z\",\"message\":{\"role\":\"assistant\",\"content\":\"
 Apache Camel is an open-source framework for building and managing business 
processes that run on top of Camel Transport. It provides a modular, pluggable 
architecture that allows you to easily integrate Camel with other technologies 
such as Java, Spring, Hibernate, and more. Camel can be used to automate tasks 
such as message routing, load balancing [...]
+    "headers" : {
+      "Date" : "Tue, 03 Mar 2026 15:25:21 GMT",
+      "Content-Type" : "application/json; charset=utf-8"
+    }
+  },
+  "uuid" : "68c8507d-160c-4641-9a22-84bbe4806890",
+  "persistent" : true,
+  "insertionIndex" : 17
+}
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-334a44c3-a293-4f2e-a358-d2de41f194d0.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-6b1b3f2e-5aa1-4c9b-88d3-f24a10590c6f.json
similarity index 64%
rename from 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-334a44c3-a293-4f2e-a358-d2de41f194d0.json
rename to 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-6b1b3f2e-5aa1-4c9b-88d3-f24a10590c6f.json
index 08b32a4215..d4eef112b8 100644
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-334a44c3-a293-4f2e-a358-d2de41f194d0.json
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-6b1b3f2e-5aa1-4c9b-88d3-f24a10590c6f.json
@@ -1,5 +1,5 @@
 {
-  "id" : "334a44c3-a293-4f2e-a358-d2de41f194d0",
+  "id" : "6b1b3f2e-5aa1-4c9b-88d3-f24a10590c6f",
   "name" : "api_chat",
   "request" : {
     "url" : "/api/chat",
@@ -12,13 +12,13 @@
   },
   "response" : {
     "status" : 200,
-    "body" : 
"{\"model\":\"orca-mini\",\"created_at\":\"2026-01-21T08:00:57.311525014Z\",\"message\":{\"role\":\"assistant\",\"content\":\"
 Hello, Alice. How can I assist you 
today?\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":622877906,\"load_duration\":11845848,\"prompt_eval_count\":46,\"prompt_eval_duration\":188038439,\"eval_count\":12,\"eval_duration\":419968471}",
+    "body" : 
"{\"model\":\"orca-mini\",\"created_at\":\"2026-03-03T15:25:16.303883793Z\",\"message\":{\"role\":\"assistant\",\"content\":\"
 Hello, Alice. How can I assist you 
today?\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":920820435,\"load_duration\":10510752,\"prompt_eval_count\":46,\"prompt_eval_duration\":343358491,\"eval_count\":12,\"eval_duration\":563204651}",
     "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:00:57 GMT",
+      "Date" : "Tue, 03 Mar 2026 15:25:16 GMT",
       "Content-Type" : "application/json; charset=utf-8"
     }
   },
-  "uuid" : "334a44c3-a293-4f2e-a358-d2de41f194d0",
+  "uuid" : "6b1b3f2e-5aa1-4c9b-88d3-f24a10590c6f",
   "persistent" : true,
   "scenarioName" : "scenario-2-api-chat",
   "requiredScenarioState" : "Started",
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-6fdb3b04-ba4c-4add-956c-e1c8ec82f799.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-6fdb3b04-ba4c-4add-956c-e1c8ec82f799.json
deleted file mode 100644
index 82ea80dcfd..0000000000
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-6fdb3b04-ba4c-4add-956c-e1c8ec82f799.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-  "id" : "6fdb3b04-ba4c-4add-956c-e1c8ec82f799",
-  "name" : "api_chat",
-  "request" : {
-    "url" : "/api/chat",
-    "method" : "POST",
-    "bodyPatterns" : [ {
-      "equalToJson" : "{\n  \"model\" : \"orca-mini\",\n  \"messages\" : [ {\n 
   \"role\" : \"user\",\n    \"content\" : \"Return an example JSON object 
about a person named 'John Doe' with the fields age and description\"\n  } ],\n 
 \"options\" : {\n    \"temperature\" : 0.3,\n    \"stop\" : [ ]\n  },\n  
\"stream\" : false,\n  \"tools\" : [ ]\n}",
-      "ignoreArrayOrder" : true,
-      "ignoreExtraElements" : false
-    } ]
-  },
-  "response" : {
-    "status" : 200,
-    "body" : 
"{\"model\":\"orca-mini\",\"created_at\":\"2026-01-21T08:01:41.39971525Z\",\"message\":{\"role\":\"assistant\",\"content\":\"
 Sure, here's an example JSON object for John Doe with his age and 
description:\\n\\n```json\\n{\\n \\\"name\\\": \\\"John Doe\\\",\\n 
\\\"age\\\": 30,\\n \\\"description\\\": \\\"John Doe is a software engineer 
with over five years of experience. He enjoys hiking and playing guitar in his 
free time.\\\"\\n}\\n```\"},\"done\":true,\"done_reason\":\"sto [...]
-    "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:01:41 GMT",
-      "Content-Type" : "application/json; charset=utf-8"
-    }
-  },
-  "uuid" : "6fdb3b04-ba4c-4add-956c-e1c8ec82f799",
-  "persistent" : true,
-  "insertionIndex" : 7
-}
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-7ac8e750-c3b8-4a7f-be22-4776aa5d8cad.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-7ac8e750-c3b8-4a7f-be22-4776aa5d8cad.json
deleted file mode 100644
index e459dcabc5..0000000000
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-7ac8e750-c3b8-4a7f-be22-4776aa5d8cad.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-  "id" : "7ac8e750-c3b8-4a7f-be22-4776aa5d8cad",
-  "name" : "api_chat",
-  "request" : {
-    "url" : "/api/chat",
-    "method" : "POST",
-    "bodyPatterns" : [ {
-      "equalToJson" : "{\n  \"model\" : \"granite4:3b\",\n  \"messages\" : [ 
{\n    \"role\" : \"user\",\n    \"content\" : \"Use your available tools to 
perform a long running operation for 2 seconds with 2 steps. DO NOT use any 
markdown formatting in the response.\"\n  } ],\n  \"options\" : {\n    
\"temperature\" : 0.3,\n    \"stop\" : [ ]\n  },\n  \"stream\" : false,\n  
\"tools\" : [ {\n    \"type\" : \"function\",\n    \"function\" : {\n      
\"name\" : \"echo\",\n      \"description [...]
-      "ignoreArrayOrder" : true,
-      "ignoreExtraElements" : false
-    } ]
-  },
-  "response" : {
-    "status" : 200,
-    "body" : 
"{\"model\":\"granite4:3b\",\"created_at\":\"2026-01-21T08:01:26.903792091Z\",\"message\":{\"role\":\"assistant\",\"content\":\"\",\"tool_calls\":[{\"id\":\"call_8rs17sa2\",\"function\":{\"index\":0,\"name\":\"longRunningOperation\",\"arguments\":{\"duration\":2,\"steps\":2}}}]},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":1854906039,\"load_duration\":44765241,\"prompt_eval_count\":319,\"prompt_eval_duration\":422551338,\"eval_count\":35,\"eval_duration\":1370669775}",
-    "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:01:26 GMT",
-      "Content-Type" : "application/json; charset=utf-8"
-    }
-  },
-  "uuid" : "7ac8e750-c3b8-4a7f-be22-4776aa5d8cad",
-  "persistent" : true,
-  "insertionIndex" : 13
-}
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-84aa25c6-6069-4780-b9d4-4068a07c101a.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-84aa25c6-6069-4780-b9d4-4068a07c101a.json
new file mode 100644
index 0000000000..58d548fcb3
--- /dev/null
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-84aa25c6-6069-4780-b9d4-4068a07c101a.json
@@ -0,0 +1,24 @@
+{
+  "id" : "84aa25c6-6069-4780-b9d4-4068a07c101a",
+  "name" : "api_chat",
+  "request" : {
+    "url" : "/api/chat",
+    "method" : "POST",
+    "bodyPatterns" : [ {
+      "equalToJson" : "{\n  \"model\" : \"orca-mini\",\n  \"messages\" : [ {\n 
   \"role\" : \"user\",\n    \"content\" : \"Return an example JSON object 
about a person named 'John Doe' with the fields age and description\"\n  } ],\n 
 \"options\" : {\n    \"temperature\" : 0.3,\n    \"stop\" : [ ]\n  },\n  
\"stream\" : false,\n  \"tools\" : [ ]\n}",
+      "ignoreArrayOrder" : true,
+      "ignoreExtraElements" : false
+    } ]
+  },
+  "response" : {
+    "status" : 200,
+    "body" : 
"{\"model\":\"orca-mini\",\"created_at\":\"2026-03-03T15:26:18.135421673Z\",\"message\":{\"role\":\"assistant\",\"content\":\"
 Sure, here's an example JSON object for John Doe with the fields age and 
description:\\n\\n```json\\n{\\n \\\"name\\\": \\\"John Doe\\\",\\n 
\\\"age\\\": 30,\\n \\\"description\\\": \\\"John Doe is a professional 
software developer with over 5 years of experience. He enjoys hiking and 
playing guitar in his free time.\\\"\\n}\\n```\"},\"done\":true,\" [...]
+    "headers" : {
+      "Date" : "Tue, 03 Mar 2026 15:26:18 GMT",
+      "Content-Type" : "application/json; charset=utf-8"
+    }
+  },
+  "uuid" : "84aa25c6-6069-4780-b9d4-4068a07c101a",
+  "persistent" : true,
+  "insertionIndex" : 7
+}
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-3cd813bc-486c-48ca-862d-5026f98fc91c.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-98a9059a-eb53-4580-af3c-d32c1a30b95d.json
similarity index 62%
rename from 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-3cd813bc-486c-48ca-862d-5026f98fc91c.json
rename to 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-98a9059a-eb53-4580-af3c-d32c1a30b95d.json
index ec0f48fda1..d36d8cadba 100644
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-3cd813bc-486c-48ca-862d-5026f98fc91c.json
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-98a9059a-eb53-4580-af3c-d32c1a30b95d.json
@@ -1,5 +1,5 @@
 {
-  "id" : "3cd813bc-486c-48ca-862d-5026f98fc91c",
+  "id" : "98a9059a-eb53-4580-af3c-d32c1a30b95d",
   "name" : "api_chat",
   "request" : {
     "url" : "/api/chat",
@@ -12,13 +12,13 @@
   },
   "response" : {
     "status" : 200,
-    "body" : 
"{\"model\":\"orca-mini\",\"created_at\":\"2026-01-21T08:01:33.067585999Z\",\"message\":{\"role\":\"assistant\",\"content\":\"
 Sure, here's an example JSON object for John Doe:\\n\\n```json\\n{\\n 
\\\"name\\\": \\\"John Doe\\\",\\n \\\"description\\\": \\\"A person with a 
unique name and a brief 
description.\\\"\\n}\\n```\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":2473107200,\"load_duration\":12235280,\"prompt_eval_count\":90,\"prompt_eval_duration\":438293
 [...]
+    "body" : 
"{\"model\":\"orca-mini\",\"created_at\":\"2026-03-03T15:26:06.209091727Z\",\"message\":{\"role\":\"assistant\",\"content\":\"
 Sure, here's an example JSON object for John Doe:\\n\\n```json\\n{\\n 
\\\"name\\\": \\\"John Doe\\\",\\n \\\"description\\\": \\\"An example person 
with a unique name and a brief 
description.\\\"\\n}\\n```\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":3900537511,\"load_duration\":9482003,\"prompt_eval_count\":90,\"prompt_eval_duration\
 [...]
     "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:01:33 GMT",
+      "Date" : "Tue, 03 Mar 2026 15:26:06 GMT",
       "Content-Type" : "application/json; charset=utf-8"
     }
   },
-  "uuid" : "3cd813bc-486c-48ca-862d-5026f98fc91c",
+  "uuid" : "98a9059a-eb53-4580-af3c-d32c1a30b95d",
   "persistent" : true,
   "insertionIndex" : 11
 }
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-b311fa1d-c821-4031-b94d-d37cf3344deb.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-b682d927-b36f-427d-b404-b754b054ddb9.json
similarity index 69%
rename from 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-b311fa1d-c821-4031-b94d-d37cf3344deb.json
rename to 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-b682d927-b36f-427d-b404-b754b054ddb9.json
index 5a9e0a7a04..53ad1cb5fe 100644
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-b311fa1d-c821-4031-b94d-d37cf3344deb.json
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-b682d927-b36f-427d-b404-b754b054ddb9.json
@@ -1,5 +1,5 @@
 {
-  "id" : "b311fa1d-c821-4031-b94d-d37cf3344deb",
+  "id" : "b682d927-b36f-427d-b404-b754b054ddb9",
   "name" : "api_chat",
   "request" : {
     "url" : "/api/chat",
@@ -12,13 +12,13 @@
   },
   "response" : {
     "status" : 200,
-    "body" : 
"{\"model\":\"granite4:3b\",\"created_at\":\"2026-01-21T08:01:43.442794252Z\",\"message\":{\"role\":\"assistant\",\"content\":\"Hello
 Alice! It's nice to meet you. How can I assist you 
today?\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":1057632764,\"load_duration\":47953414,\"prompt_eval_count\":36,\"prompt_eval_duration\":316851104,\"eval_count\":18,\"eval_duration\":684289773}",
+    "body" : 
"{\"model\":\"granite4:3b\",\"created_at\":\"2026-03-03T15:26:21.562588173Z\",\"message\":{\"role\":\"assistant\",\"content\":\"Hello
 Alice! It's nice to meet you. How can I assist you 
today?\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":1615998648,\"load_duration\":48578413,\"prompt_eval_count\":36,\"prompt_eval_duration\":645865891,\"eval_count\":18,\"eval_duration\":909874821}",
     "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:01:43 GMT",
+      "Date" : "Tue, 03 Mar 2026 15:26:21 GMT",
       "Content-Type" : "application/json; charset=utf-8"
     }
   },
-  "uuid" : "b311fa1d-c821-4031-b94d-d37cf3344deb",
+  "uuid" : "b682d927-b36f-427d-b404-b754b054ddb9",
   "persistent" : true,
   "insertionIndex" : 5
 }
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-b8cb81a6-f441-486c-9ae8-b6e0cecb7640.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-b8cb81a6-f441-486c-9ae8-b6e0cecb7640.json
deleted file mode 100644
index a6e76c214d..0000000000
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-b8cb81a6-f441-486c-9ae8-b6e0cecb7640.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
-  "id" : "b8cb81a6-f441-486c-9ae8-b6e0cecb7640",
-  "name" : "api_chat",
-  "request" : {
-    "url" : "/api/chat",
-    "method" : "POST",
-    "bodyPatterns" : [ {
-      "equalToJson" : "{\n  \"model\" : \"orca-mini\",\n  \"messages\" : [ {\n 
   \"role\" : \"system\",\n    \"content\" : \"You are a whimsical storyteller. 
Your responses should be imaginative, descriptive, and always include a touch 
of magic. Start every story with 'Once upon a starlit night...'\"\n  }, {\n    
\"role\" : \"user\",\n    \"content\" : \"Write a short story about a lost 
cat.\"\n  } ],\n  \"options\" : {\n    \"temperature\" : 0.3,\n    \"stop\" : [ 
]\n  },\n  \"stream\" [...]
-      "ignoreArrayOrder" : true,
-      "ignoreExtraElements" : false
-    } ]
-  },
-  "response" : {
-    "status" : 200,
-    "body" : 
"{\"model\":\"orca-mini\",\"created_at\":\"2026-01-21T08:02:02.929223473Z\",\"message\":{\"role\":\"assistant\",\"content\":\"
 Once upon a starlit night, a curious little girl named Lily wandered through 
the forest, searching for her beloved cat, Whiskers. She had been missing for 
days and couldn't bear to be without her furry friend. \\n\\nAs she walked, she 
heard whispers from the trees. \\\"Lost? Lost? Lost!\\\" came the chorus of a 
group of animals who lived in the fores [...]
-    "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:02:02 GMT",
-      "Content-Type" : "application/json; charset=utf-8"
-    }
-  },
-  "uuid" : "b8cb81a6-f441-486c-9ae8-b6e0cecb7640",
-  "persistent" : true,
-  "scenarioName" : "scenario-1-api-chat",
-  "requiredScenarioState" : "scenario-1-api-chat-2",
-  "insertionIndex" : 1
-}
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-5cf2abf3-353d-47ae-a5ef-a093c49748c8.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-cbafc9dd-bc75-4283-aba6-e2950556ba5f.json
similarity index 75%
rename from 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-5cf2abf3-353d-47ae-a5ef-a093c49748c8.json
rename to 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-cbafc9dd-bc75-4283-aba6-e2950556ba5f.json
index dcbd0df0dd..b8bcad0f1e 100644
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-5cf2abf3-353d-47ae-a5ef-a093c49748c8.json
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-cbafc9dd-bc75-4283-aba6-e2950556ba5f.json
@@ -1,5 +1,5 @@
 {
-  "id" : "5cf2abf3-353d-47ae-a5ef-a093c49748c8",
+  "id" : "cbafc9dd-bc75-4283-aba6-e2950556ba5f",
   "name" : "api_chat",
   "request" : {
     "url" : "/api/chat",
@@ -12,13 +12,13 @@
   },
   "response" : {
     "status" : 200,
-    "body" : 
"{\"model\":\"granite4:3b\",\"created_at\":\"2026-01-21T08:01:35.959162737Z\",\"message\":{\"role\":\"assistant\",\"content\":\"\",\"tool_calls\":[{\"id\":\"call_ixnrpy7u\",\"function\":{\"index\":0,\"name\":\"addNumbers\",\"arguments\":{\"arg0\":10,\"arg1\":5}}}]},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":2857200262,\"load_duration\":43778600,\"prompt_eval_count\":193,\"prompt_eval_duration\":1576333093,\"eval_count\":28,\"eval_duration\":1222509432}",
+    "body" : 
"{\"model\":\"granite4:3b\",\"created_at\":\"2026-03-03T15:26:10.940178285Z\",\"message\":{\"role\":\"assistant\",\"content\":\"\",\"tool_calls\":[{\"id\":\"call_nd08sj0v\",\"function\":{\"index\":0,\"name\":\"addNumbers\",\"arguments\":{\"arg0\":10,\"arg1\":5}}}]},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":4693362054,\"load_duration\":47542777,\"prompt_eval_count\":193,\"prompt_eval_duration\":3128994736,\"eval_count\":28,\"eval_duration\":1492960511}",
     "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:01:35 GMT",
+      "Date" : "Tue, 03 Mar 2026 15:26:10 GMT",
       "Content-Type" : "application/json; charset=utf-8"
     }
   },
-  "uuid" : "5cf2abf3-353d-47ae-a5ef-a093c49748c8",
+  "uuid" : "cbafc9dd-bc75-4283-aba6-e2950556ba5f",
   "persistent" : true,
   "insertionIndex" : 10
 }
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-45682c8e-3456-4fc9-b941-6f702f1f087a.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-d2554971-ae78-4b13-99c0-57def81dfb2e.json
similarity index 80%
rename from 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-45682c8e-3456-4fc9-b941-6f702f1f087a.json
rename to 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-d2554971-ae78-4b13-99c0-57def81dfb2e.json
index dc9b2512c2..a147648502 100644
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-45682c8e-3456-4fc9-b941-6f702f1f087a.json
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-d2554971-ae78-4b13-99c0-57def81dfb2e.json
@@ -1,5 +1,5 @@
 {
-  "id" : "45682c8e-3456-4fc9-b941-6f702f1f087a",
+  "id" : "d2554971-ae78-4b13-99c0-57def81dfb2e",
   "name" : "api_chat",
   "request" : {
     "url" : "/api/chat",
@@ -12,13 +12,13 @@
   },
   "response" : {
     "status" : 200,
-    "body" : 
"{\"model\":\"granite4:3b\",\"created_at\":\"2026-01-21T08:01:36.945337351Z\",\"message\":{\"role\":\"assistant\",\"content\":\"The
 sum of 10 and 5 is 
**15**.\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":977860704,\"load_duration\":45035949,\"prompt_eval_count\":233,\"prompt_eval_duration\":327764002,\"eval_count\":14,\"eval_duration\":595399685}",
+    "body" : 
"{\"model\":\"granite4:3b\",\"created_at\":\"2026-03-03T15:26:12.287839617Z\",\"message\":{\"role\":\"assistant\",\"content\":\"The
 sum of 10 and 5 is 
**15**.\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":1341044668,\"load_duration\":50634799,\"prompt_eval_count\":233,\"prompt_eval_duration\":573930922,\"eval_count\":14,\"eval_duration\":705548128}",
     "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:01:36 GMT",
+      "Date" : "Tue, 03 Mar 2026 15:26:12 GMT",
       "Content-Type" : "application/json; charset=utf-8"
     }
   },
-  "uuid" : "45682c8e-3456-4fc9-b941-6f702f1f087a",
+  "uuid" : "d2554971-ae78-4b13-99c0-57def81dfb2e",
   "persistent" : true,
   "insertionIndex" : 9
 }
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-d366f73b-f02a-4f62-ad43-836f42226e05.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-d366f73b-f02a-4f62-ad43-836f42226e05.json
new file mode 100644
index 0000000000..a97b6e2bce
--- /dev/null
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-d366f73b-f02a-4f62-ad43-836f42226e05.json
@@ -0,0 +1,24 @@
+{
+  "id" : "d366f73b-f02a-4f62-ad43-836f42226e05",
+  "name" : "api_chat",
+  "request" : {
+    "url" : "/api/chat",
+    "method" : "POST",
+    "bodyPatterns" : [ {
+      "equalToJson" : "{\n  \"model\" : \"granite4:3b\",\n  \"messages\" : [ 
{\n    \"role\" : \"user\",\n    \"content\" : \"Use your available tools to 
perform a long running operation for 2 seconds with 2 steps. DO NOT use any 
markdown formatting in the response.\"\n  }, {\n    \"role\" : \"assistant\",\n 
   \"tool_calls\" : [ {\n      \"function\" : {\n        \"name\" : 
\"longRunningOperation\",\n        \"arguments\" : {\n          \"duration\" : 
2,\n          \"steps\" : 2\n       [...]
+      "ignoreArrayOrder" : true,
+      "ignoreExtraElements" : false
+    } ]
+  },
+  "response" : {
+    "status" : 200,
+    "body" : 
"{\"model\":\"granite4:3b\",\"created_at\":\"2026-03-03T15:26:02.290064872Z\",\"message\":{\"role\":\"assistant\",\"content\":\"The
 long running operation was executed successfully with a total duration of 2 
seconds divided into 2 steps. The process completed as expected without any 
issues.\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":2629078989,\"load_duration\":45655974,\"prompt_eval_count\":372,\"prompt_eval_duration\":868889130,\"eval_count\":31,\"eval_du
 [...]
+    "headers" : {
+      "Date" : "Tue, 03 Mar 2026 15:26:02 GMT",
+      "Content-Type" : "application/json; charset=utf-8"
+    }
+  },
+  "uuid" : "d366f73b-f02a-4f62-ad43-836f42226e05",
+  "persistent" : true,
+  "insertionIndex" : 12
+}
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-7b64ea63-5c36-431c-ba20-f1ea5643cc06.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-e7f6e7af-412b-4f34-887c-d19ee0c66d8b.json
similarity index 51%
rename from 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-7b64ea63-5c36-431c-ba20-f1ea5643cc06.json
rename to 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-e7f6e7af-412b-4f34-887c-d19ee0c66d8b.json
index 7bf89de55c..4e95ba3c7f 100644
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-7b64ea63-5c36-431c-ba20-f1ea5643cc06.json
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-e7f6e7af-412b-4f34-887c-d19ee0c66d8b.json
@@ -1,24 +1,24 @@
 {
-  "id" : "7b64ea63-5c36-431c-ba20-f1ea5643cc06",
+  "id" : "e7f6e7af-412b-4f34-887c-d19ee0c66d8b",
   "name" : "api_chat",
   "request" : {
     "url" : "/api/chat",
     "method" : "POST",
     "bodyPatterns" : [ {
-      "equalToJson" : "{\n  \"model\" : \"granite4:3b\",\n  \"messages\" : [ 
{\n    \"role\" : \"user\",\n    \"content\" : \"Hello - my name is Alice\"\n  
}, {\n    \"role\" : \"assistant\",\n    \"content\" : \"Hello Alice! It's nice 
to meet you. How can I assist you today?\",\n    \"tool_calls\" : [ ]\n  }, {\n 
   \"role\" : \"user\",\n    \"content\" : \"And my favorite color is blue\"\n  
}, {\n    \"role\" : \"assistant\",\n    \"content\" : \"That's a lovely choice 
of color! Blue i [...]
+      "equalToJson" : "{\n  \"model\" : \"granite4:3b\",\n  \"messages\" : [ 
{\n    \"role\" : \"user\",\n    \"content\" : \"Hello - my name is Alice\"\n  
}, {\n    \"role\" : \"assistant\",\n    \"content\" : \"Hello Alice! It's nice 
to meet you. How can I assist you today?\",\n    \"tool_calls\" : [ ]\n  }, {\n 
   \"role\" : \"user\",\n    \"content\" : \"And my favorite color is blue\"\n  
}, {\n    \"role\" : \"assistant\",\n    \"content\" : \"That's a lovely choice 
of color! Blue i [...]
       "ignoreArrayOrder" : true,
       "ignoreExtraElements" : false
     } ]
   },
   "response" : {
     "status" : 200,
-    "body" : 
"{\"model\":\"granite4:3b\",\"created_at\":\"2026-01-21T08:01:46.477135945Z\",\"message\":{\"role\":\"assistant\",\"content\":\"Your
 name is Alice and your favorite color is blue. Is there anything else you 
would like to know or 
discuss?\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":1338719537,\"load_duration\":46867496,\"prompt_eval_count\":128,\"prompt_eval_duration\":304990888,\"eval_count\":24,\"eval_duration\":972356065}",
+    "body" : 
"{\"model\":\"granite4:3b\",\"created_at\":\"2026-03-03T15:26:26.340021889Z\",\"message\":{\"role\":\"assistant\",\"content\":\"Your
 name is Alice and your favorite color is blue. Is there anything specific you 
would like to know or discuss regarding this 
information?\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":2038958858,\"load_duration\":47826093,\"prompt_eval_count\":135,\"prompt_eval_duration\":564886840,\"eval_count\":27,\"eval_duration\":1404103133}",
     "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:01:46 GMT",
+      "Date" : "Tue, 03 Mar 2026 15:26:26 GMT",
       "Content-Type" : "application/json; charset=utf-8"
     }
   },
-  "uuid" : "7b64ea63-5c36-431c-ba20-f1ea5643cc06",
+  "uuid" : "e7f6e7af-412b-4f34-887c-d19ee0c66d8b",
   "persistent" : true,
   "insertionIndex" : 3
 }
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-d9ade7be-8f94-4535-a552-9910f04cbbe0.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-ea5aa343-879e-4dd0-94f5-c32886e33ec6.json
similarity index 59%
rename from 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-d9ade7be-8f94-4535-a552-9910f04cbbe0.json
rename to 
integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-ea5aa343-879e-4dd0-94f5-c32886e33ec6.json
index efc9b30da5..404d65bc24 100644
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-d9ade7be-8f94-4535-a552-9910f04cbbe0.json
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-ea5aa343-879e-4dd0-94f5-c32886e33ec6.json
@@ -1,5 +1,5 @@
 {
-  "id" : "d9ade7be-8f94-4535-a552-9910f04cbbe0",
+  "id" : "ea5aa343-879e-4dd0-94f5-c32886e33ec6",
   "name" : "api_chat",
   "request" : {
     "url" : "/api/chat",
@@ -12,13 +12,13 @@
   },
   "response" : {
     "status" : 200,
-    "body" : 
"{\"model\":\"granite4:3b\",\"created_at\":\"2026-01-21T08:01:45.122934296Z\",\"message\":{\"role\":\"assistant\",\"content\":\"That's
 a lovely choice of color! Blue is often associated with feelings of calmness 
and tranquility. If you need any assistance or have questions, feel free to 
ask.\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":1661809217,\"load_duration\":41340745,\"prompt_eval_count\":69,\"prompt_eval_duration\":182241182,\"eval_count\":36,\"eval_du
 [...]
+    "body" : 
"{\"model\":\"granite4:3b\",\"created_at\":\"2026-03-03T15:26:24.28582676Z\",\"message\":{\"role\":\"assistant\",\"content\":\"That's
 a lovely choice of color! Blue is often associated with tranquility, 
stability, and depth. If you need any information or assistance related to the 
color blue or anything else, feel free to 
ask.\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":2701949220,\"load_duration\":49357826,\"prompt_eval_count\":69,\"prompt_eval_duration\":3
 [...]
     "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:01:45 GMT",
+      "Date" : "Tue, 03 Mar 2026 15:26:24 GMT",
       "Content-Type" : "application/json; charset=utf-8"
     }
   },
-  "uuid" : "d9ade7be-8f94-4535-a552-9910f04cbbe0",
+  "uuid" : "ea5aa343-879e-4dd0-94f5-c32886e33ec6",
   "persistent" : true,
   "insertionIndex" : 4
 }
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-ed06950e-1368-45a1-a414-2a0c447e2ca6.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-ed06950e-1368-45a1-a414-2a0c447e2ca6.json
deleted file mode 100644
index 077aac63c8..0000000000
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-ed06950e-1368-45a1-a414-2a0c447e2ca6.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-  "id" : "ed06950e-1368-45a1-a414-2a0c447e2ca6",
-  "name" : "api_chat",
-  "request" : {
-    "url" : "/api/chat",
-    "method" : "POST",
-    "bodyPatterns" : [ {
-      "equalToJson" : "{\n  \"model\" : \"granite4:3b\",\n  \"messages\" : [ 
{\n    \"role\" : \"user\",\n    \"content\" : \"Use your available tools to 
perform a long running operation for 2 seconds with 2 steps. DO NOT use any 
markdown formatting in the response.\"\n  }, {\n    \"role\" : \"assistant\",\n 
   \"tool_calls\" : [ {\n      \"function\" : {\n        \"name\" : 
\"longRunningOperation\",\n        \"arguments\" : {\n          \"duration\" : 
2,\n          \"steps\" : 2\n       [...]
-      "ignoreArrayOrder" : true,
-      "ignoreExtraElements" : false
-    } ]
-  },
-  "response" : {
-    "status" : 200,
-    "body" : 
"{\"model\":\"granite4:3b\",\"created_at\":\"2026-01-21T08:01:30.570249294Z\",\"message\":{\"role\":\"assistant\",\"content\":\"The
 long running operation was executed successfully for a duration of 2 seconds 
and it included 2 steps. The operation completed as 
expected.\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":1650117067,\"load_duration\":47559284,\"prompt_eval_count\":372,\"prompt_eval_duration\":492310420,\"eval_count\":28,\"eval_duration\":1094652400}",
-    "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:01:30 GMT",
-      "Content-Type" : "application/json; charset=utf-8"
-    }
-  },
-  "uuid" : "ed06950e-1368-45a1-a414-2a0c447e2ca6",
-  "persistent" : true,
-  "insertionIndex" : 12
-}
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-f265676e-9355-40b6-9593-926440edd441.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-f265676e-9355-40b6-9593-926440edd441.json
deleted file mode 100644
index a246f7d005..0000000000
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-f265676e-9355-40b6-9593-926440edd441.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-  "id" : "f265676e-9355-40b6-9593-926440edd441",
-  "name" : "api_chat",
-  "request" : {
-    "url" : "/api/chat",
-    "method" : "POST",
-    "bodyPatterns" : [ {
-      "equalToJson" : "{\n  \"model\" : \"orca-mini\",\n  \"messages\" : [ {\n 
   \"role\" : \"user\",\n    \"content\" : \"Describe the Miles of Camels Car 
Rental cancellations policy for cancelling 24 hours before pickup. What is the 
refund amount?\\n\\nAnswer using the following information:\\nCANCELLATION 
POLICY\\n- Cancellations made 24 hours before pickup: Full refund\\n- 
Cancellations made 12-24 hours before pickup: 50% refund\\n- Cancellations made 
less than 12 hours before picku [...]
-      "ignoreArrayOrder" : true,
-      "ignoreExtraElements" : false
-    } ]
-  },
-  "response" : {
-    "status" : 200,
-    "body" : 
"{\"model\":\"orca-mini\",\"created_at\":\"2026-01-21T08:00:51.09034453Z\",\"message\":{\"role\":\"assistant\",\"content\":\"
 According to the Miles of Camels Car Rental cancellations policy, a full 
refund will be provided if the cancellation is made 24 hours or more before 
pickup. The refund amount will be the total cost of the rental including taxes 
and fees.\\n\\nAdditionally, according to the company's vehicle return policy, 
vehicles must be returned with the same fuel l [...]
-    "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:00:51 GMT",
-      "Content-Type" : "application/json; charset=utf-8"
-    }
-  },
-  "uuid" : "f265676e-9355-40b6-9593-926440edd441",
-  "persistent" : true,
-  "insertionIndex" : 21
-}
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-f45a3c47-6000-4594-b413-de1ab5174897.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-f45a3c47-6000-4594-b413-de1ab5174897.json
deleted file mode 100644
index ce8287a9be..0000000000
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-f45a3c47-6000-4594-b413-de1ab5174897.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-  "id" : "f45a3c47-6000-4594-b413-de1ab5174897",
-  "name" : "api_chat",
-  "request" : {
-    "url" : "/api/chat",
-    "method" : "POST",
-    "bodyPatterns" : [ {
-      "equalToJson" : "{\n  \"model\" : \"granite4:3b\",\n  \"messages\" : [ 
{\n    \"role\" : \"user\",\n    \"content\" : \"Please list your available 
tools. You MUST respond using ONLY valid JSON with tool names as an array. DO 
NOT add explanations. DO NOT add comments. DO NOT wrap in markdown.\"\n  } ],\n 
 \"options\" : {\n    \"temperature\" : 0.3,\n    \"stop\" : [ ]\n  },\n  
\"stream\" : false,\n  \"tools\" : [ {\n    \"type\" : \"function\",\n    
\"function\" : {\n      \"name\"  [...]
-      "ignoreArrayOrder" : true,
-      "ignoreExtraElements" : false
-    } ]
-  },
-  "response" : {
-    "status" : 200,
-    "body" : 
"{\"model\":\"granite4:3b\",\"created_at\":\"2026-01-21T08:01:25.034732402Z\",\"message\":{\"role\":\"assistant\",\"content\":\"[\\n
  \\\"echo\\\",\\n  \\\"longRunningOperation\\\",\\n  
\\\"add\\\"\\n]\"},\"done\":true,\"done_reason\":\"stop\",\"total_duration\":3876757127,\"load_duration\":49592559,\"prompt_eval_count\":326,\"prompt_eval_duration\":3159868833,\"eval_count\":17,\"eval_duration\":657582616}",
-    "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:01:25 GMT",
-      "Content-Type" : "application/json; charset=utf-8"
-    }
-  },
-  "uuid" : "f45a3c47-6000-4594-b413-de1ab5174897",
-  "persistent" : true,
-  "insertionIndex" : 14
-}
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-f472d5b5-8789-4bd9-8e7d-8649badd493b.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-f472d5b5-8789-4bd9-8e7d-8649badd493b.json
new file mode 100644
index 0000000000..d716b7ca19
--- /dev/null
+++ 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_chat-f472d5b5-8789-4bd9-8e7d-8649badd493b.json
@@ -0,0 +1,27 @@
+{
+  "id" : "f472d5b5-8789-4bd9-8e7d-8649badd493b",
+  "name" : "api_chat",
+  "request" : {
+    "url" : "/api/chat",
+    "method" : "POST",
+    "bodyPatterns" : [ {
+      "equalToJson" : "{\n  \"model\" : \"orca-mini\",\n  \"messages\" : [ {\n 
   \"role\" : \"system\",\n    \"content\" : \"You are a whimsical storyteller. 
Your responses should be imaginative, descriptive, and always include a touch 
of magic. Start every story with 'Once upon a starlit night...'\"\n  }, {\n    
\"role\" : \"user\",\n    \"content\" : \"Write a short story about a lost 
cat.\"\n  } ],\n  \"options\" : {\n    \"temperature\" : 0.3,\n    \"stop\" : [ 
]\n  },\n  \"stream\" [...]
+      "ignoreArrayOrder" : true,
+      "ignoreExtraElements" : false
+    } ]
+  },
+  "response" : {
+    "status" : 200,
+    "body" : 
"{\"model\":\"orca-mini\",\"created_at\":\"2026-03-03T15:25:43.847297578Z\",\"message\":{\"role\":\"assistant\",\"content\":\"
 Once upon a starlit night, a curious little girl named Lily wandered through 
the forest, searching for her missing cat. She had been searching for hours and 
was about to give up when she heard a faint meowing sound. She followed the 
sound until she came across a small, shivering kitten.\\n\\nLily scooped up the 
tiny creature and took it back home wit [...]
+    "headers" : {
+      "Date" : "Tue, 03 Mar 2026 15:25:43 GMT",
+      "Content-Type" : "application/json; charset=utf-8"
+    }
+  },
+  "uuid" : "f472d5b5-8789-4bd9-8e7d-8649badd493b",
+  "persistent" : true,
+  "scenarioName" : "scenario-1-api-chat",
+  "requiredScenarioState" : "Started",
+  "newScenarioState" : "scenario-1-api-chat-2",
+  "insertionIndex" : 16
+}
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_embed-1e8084ee-91b3-4095-86b7-9845fe1480d6.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_embed-1e8084ee-91b3-4095-86b7-9845fe1480d6.json
deleted file mode 100644
index a004627917..0000000000
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_embed-1e8084ee-91b3-4095-86b7-9845fe1480d6.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-  "id" : "1e8084ee-91b3-4095-86b7-9845fe1480d6",
-  "name" : "api_embed",
-  "request" : {
-    "url" : "/api/embed",
-    "method" : "POST",
-    "bodyPatterns" : [ {
-      "equalToJson" : "{\n  \"model\" : \"nomic-embed-text\",\n  \"input\" : [ 
\"Miles of Camels Car Rental - Company Information\\n\\nBUSINESS 
HOURS:\\nMonday-Friday: 8:00 AM - 6:00 PM\\nSaturday: 9:00 AM - 4:00 
PM\\nSunday: Closed\\n\\nRENTAL AGREEMENT\\n- This agreement is between Miles 
of Camels Car Rental (\\\"Company\\\") and the customer (\\\"Renter\\\").\", 
\"RENTAL POLICIES:\\n- Minimum age: 21 years old\\n- Valid driver's license 
required\\n- Credit card required for security d [...]
-      "ignoreArrayOrder" : true,
-      "ignoreExtraElements" : true
-    } ]
-  },
-  "response" : {
-    "status" : 200,
-    "bodyFileName" : "api_embed-1e8084ee-91b3-4095-86b7-9845fe1480d6.json",
-    "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:00:35 GMT",
-      "Content-Type" : "application/json; charset=utf-8"
-    }
-  },
-  "uuid" : "1e8084ee-91b3-4095-86b7-9845fe1480d6",
-  "persistent" : true,
-  "insertionIndex" : 23
-}
\ No newline at end of file
diff --git 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_embed-a75f0506-7e8e-453b-9ec8-bd62378fd23d.json
 
b/integration-tests/langchain4j-agent/src/test/resources/mappings/api_embed-a75f0506-7e8e-453b-9ec8-bd62378fd23d.json
deleted file mode 100644
index 0e36832f9b..0000000000
--- 
a/integration-tests/langchain4j-agent/src/test/resources/mappings/api_embed-a75f0506-7e8e-453b-9ec8-bd62378fd23d.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-  "id" : "a75f0506-7e8e-453b-9ec8-bd62378fd23d",
-  "name" : "api_embed",
-  "request" : {
-    "url" : "/api/embed",
-    "method" : "POST",
-    "bodyPatterns" : [ {
-      "equalToJson" : "{\n  \"model\" : \"nomic-embed-text\",\n  \"input\" : [ 
\"Describe the Miles of Camels Car Rental cancellations policy for cancelling 
24 hours before pickup. What is the refund amount?\" ]\n}",
-      "ignoreArrayOrder" : true,
-      "ignoreExtraElements" : false
-    } ]
-  },
-  "response" : {
-    "status" : 200,
-    "body" : 
"{\"model\":\"nomic-embed-text\",\"embeddings\":[[0.023231616,0.037204288,-0.17576993,-0.018245917,0.0073474864,0.0067600226,0.013649625,-0.0066430247,0.022516698,-0.0048980494,-0.05996201,0.003527864,0.022191597,-0.015636824,0.07915627,-0.039492127,0.01737798,-0.050108116,-0.076507494,0.030150954,0.0034718446,0.010683285,-0.11351314,-0.043978125,0.030677995,0.0356212,0.026788875,0.021016184,-0.038846858,0.020651111,0.03013206,-0.000068731184,-0.00042066557,-0.06752035,-0.12
 [...]
-    "headers" : {
-      "Date" : "Wed, 21 Jan 2026 08:00:37 GMT",
-      "Content-Type" : "application/json; charset=utf-8"
-    }
-  },
-  "uuid" : "a75f0506-7e8e-453b-9ec8-bd62378fd23d",
-  "persistent" : true,
-  "insertionIndex" : 22
-}
\ No newline at end of file


Reply via email to