From 2392ea71e63602523844ede9b522fad267ca074c Mon Sep 17 00:00:00 2001 From: Hailong Cui Date: Tue, 25 Nov 2025 11:39:00 +0800 Subject: [PATCH 1/3] fix NPE Signed-off-by: Hailong Cui --- .../ml/engine/algorithms/agent/MLChatAgentRunner.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/MLChatAgentRunner.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/MLChatAgentRunner.java index 38be5cf5f0..b9a4228361 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/MLChatAgentRunner.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/MLChatAgentRunner.java @@ -502,7 +502,12 @@ private void runReAct( ); toolParams.put(TENANT_ID_FIELD, tenantId); lastToolParams.clear(); - lastToolParams.putAll(toolParams); + toolParams.forEach((key, value) -> { + // For the case like tenant id is null + if (key != null && value != null) { + lastToolParams.put(key, value); + } + }); runTool( tools, toolSpecMap, From 8b0194cc1bfc3ed62ad10f0f56fccacfd2ad561c Mon Sep 17 00:00:00 2001 From: Hailong Cui Date: Tue, 25 Nov 2025 18:12:50 +0800 Subject: [PATCH 2/3] fix version conflicts Signed-off-by: Hailong Cui --- ml-algorithms/build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ml-algorithms/build.gradle b/ml-algorithms/build.gradle index 8d06f8b1cf..f76d84beb0 100644 --- a/ml-algorithms/build.gradle +++ b/ml-algorithms/build.gradle @@ -54,7 +54,9 @@ dependencies { // Multi-tenant SDK Client implementation "org.opensearch:opensearch-remote-metadata-sdk:${opensearch_build}" implementation 'commons-beanutils:commons-beanutils:1.11.0' - implementation "org.opensearch:opensearch-remote-metadata-sdk-ddb-client:${opensearch_build}" + implementation ("org.opensearch:opensearch-remote-metadata-sdk-ddb-client:${opensearch_build}") { + exclude group: "software.amazon.awssdk", module: "sts" + } def os = DefaultNativePlatform.currentOperatingSystem //arm/macos doesn't support GPU From 0693f80fd20c379905b03e66065b8130e5426efd Mon Sep 17 00:00:00 2001 From: Hailong Cui Date: Wed, 26 Nov 2025 02:21:44 +0000 Subject: [PATCH 3/3] Revert "fix version conflicts" This reverts commit 8b0194cc1bfc3ed62ad10f0f56fccacfd2ad561c. Signed-off-by: Hailong Cui --- ml-algorithms/build.gradle | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ml-algorithms/build.gradle b/ml-algorithms/build.gradle index f76d84beb0..8d06f8b1cf 100644 --- a/ml-algorithms/build.gradle +++ b/ml-algorithms/build.gradle @@ -54,9 +54,7 @@ dependencies { // Multi-tenant SDK Client implementation "org.opensearch:opensearch-remote-metadata-sdk:${opensearch_build}" implementation 'commons-beanutils:commons-beanutils:1.11.0' - implementation ("org.opensearch:opensearch-remote-metadata-sdk-ddb-client:${opensearch_build}") { - exclude group: "software.amazon.awssdk", module: "sts" - } + implementation "org.opensearch:opensearch-remote-metadata-sdk-ddb-client:${opensearch_build}" def os = DefaultNativePlatform.currentOperatingSystem //arm/macos doesn't support GPU