From 93a894e15412202ac0e7bf48c6034eee7215bb03 Mon Sep 17 00:00:00 2001 From: Jagadeesh Date: Wed, 15 Oct 2025 00:47:57 +1100 Subject: [PATCH 1/5] Sanitize error messages to avoid reflecting user input Signed-off-by: Jagadeesh --- .../opensearch/ml/common/agent/MLAgent.java | 12 +++------- .../connector/MLCreateConnectorInput.java | 2 ++ .../ml/common/agent/MLAgentTest.java | 5 ++-- .../MLCreateConnectorInputTests.java | 23 +++++++++++++++++-- .../engine/algorithms/agent/AgentUtils.java | 2 +- .../algorithms/agent/MLAgentExecutor.java | 10 +++----- .../FunctionCallingFactory.java | 6 ++++- .../algorithms/agent/MLAgentExecutorTest.java | 5 ++++ .../agents/TransportRegisterAgentAction.java | 2 +- .../RestMLMcpToolsRegisterAction.java | 2 +- 10 files changed, 45 insertions(+), 24 deletions(-) diff --git a/common/src/main/java/org/opensearch/ml/common/agent/MLAgent.java b/common/src/main/java/org/opensearch/ml/common/agent/MLAgent.java index b66a23f11e..c19acc7f62 100644 --- a/common/src/main/java/org/opensearch/ml/common/agent/MLAgent.java +++ b/common/src/main/java/org/opensearch/ml/common/agent/MLAgent.java @@ -12,13 +12,7 @@ import java.io.IOException; import java.time.Instant; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Optional; -import java.util.Set; +import java.util.*; import org.opensearch.Version; import org.opensearch.core.common.io.stream.StreamInput; @@ -122,7 +116,7 @@ private void validate() { for (MLToolSpec toolSpec : tools) { String toolName = Optional.ofNullable(toolSpec.getName()).orElse(toolSpec.getType()); if (toolNames.contains(toolName)) { - throw new IllegalArgumentException("Duplicate tool defined: " + toolName); + throw new IllegalArgumentException("Duplicate tool defined in agent configuration"); } else { toolNames.add(toolName); } @@ -138,7 +132,7 @@ private void validateMLAgentType(String agentType) { MLAgentType.valueOf(agentType.toUpperCase(Locale.ROOT)); // Use toUpperCase() to allow case-insensitive matching } catch (IllegalArgumentException e) { // The typeStr does not match any MLAgentType, so throw a new exception with a clearer message. - throw new IllegalArgumentException(agentType + " is not a valid Agent Type"); + throw new IllegalArgumentException("Invalid Agent Type, Please use one of " + Arrays.toString(MLAgentType.values())); } } } diff --git a/common/src/main/java/org/opensearch/ml/common/transport/connector/MLCreateConnectorInput.java b/common/src/main/java/org/opensearch/ml/common/transport/connector/MLCreateConnectorInput.java index f0d8cd656f..1d8094e316 100644 --- a/common/src/main/java/org/opensearch/ml/common/transport/connector/MLCreateConnectorInput.java +++ b/common/src/main/java/org/opensearch/ml/common/transport/connector/MLCreateConnectorInput.java @@ -35,6 +35,7 @@ import lombok.Builder; import lombok.Data; import lombok.Setter; +import org.opensearch.ml.common.connector.ConnectorProtocols; @Data public class MLCreateConnectorInput implements ToXContentObject, Writeable { @@ -121,6 +122,7 @@ public MLCreateConnectorInput( if ((url == null || url.isBlank()) && isMcpConnector) { throw new IllegalArgumentException("MCP Connector url is null or blank"); } + ConnectorProtocols.validateProtocol(protocol); } this.name = name; this.description = description; diff --git a/common/src/test/java/org/opensearch/ml/common/agent/MLAgentTest.java b/common/src/test/java/org/opensearch/ml/common/agent/MLAgentTest.java index da2f5f5c1e..f5e3ca73d3 100644 --- a/common/src/test/java/org/opensearch/ml/common/agent/MLAgentTest.java +++ b/common/src/test/java/org/opensearch/ml/common/agent/MLAgentTest.java @@ -9,6 +9,7 @@ import java.io.IOException; import java.time.Instant; +import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; @@ -114,7 +115,7 @@ public void constructor_NullLLMSpec() { @Test public void constructor_DuplicateTool() { exceptionRule.expect(IllegalArgumentException.class); - exceptionRule.expectMessage("Duplicate tool defined: test"); + exceptionRule.expectMessage("Duplicate tool defined in agent configuration"); MLAgent agent = new MLAgent( "test_name", @@ -353,7 +354,7 @@ public void fromStream() throws IOException { @Test public void constructor_InvalidAgentType() { exceptionRule.expect(IllegalArgumentException.class); - exceptionRule.expectMessage(" is not a valid Agent Type"); + exceptionRule.expectMessage("Invalid Agent Type, Please use one of "+ Arrays.toString(MLAgentType.values())); new MLAgent( "test_name", diff --git a/common/src/test/java/org/opensearch/ml/common/transport/connector/MLCreateConnectorInputTests.java b/common/src/test/java/org/opensearch/ml/common/transport/connector/MLCreateConnectorInputTests.java index a7df00618a..09fc8af85f 100644 --- a/common/src/test/java/org/opensearch/ml/common/transport/connector/MLCreateConnectorInputTests.java +++ b/common/src/test/java/org/opensearch/ml/common/transport/connector/MLCreateConnectorInputTests.java @@ -10,8 +10,7 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; -import static org.opensearch.ml.common.connector.ConnectorProtocols.MCP_SSE; -import static org.opensearch.ml.common.connector.ConnectorProtocols.MCP_STREAMABLE_HTTP; +import static org.opensearch.ml.common.connector.ConnectorProtocols.*; import java.io.IOException; import java.util.Arrays; @@ -169,6 +168,26 @@ public void constructorMLCreateConnectorInput_NullProtocol() { assertEquals("Connector protocol is null", exception.getMessage()); } + @Test + public void constructorMLCreateConnectorInput_InvalidProtocol() { + Throwable exception = assertThrows(IllegalArgumentException.class, () -> { + MLCreateConnectorInput + .builder() + .name(TEST_CONNECTOR_NAME) + .description(TEST_CONNECTOR_DESCRIPTION) + .version(TEST_CONNECTOR_VERSION) + .protocol("dummy") + .parameters(Map.of(TEST_PARAM_KEY, TEST_PARAM_VALUE)) + .credential(Map.of(TEST_CREDENTIAL_KEY, TEST_CREDENTIAL_VALUE)) + .actions(List.of()) + .access(AccessMode.PUBLIC) + .backendRoles(Arrays.asList(TEST_ROLE1, TEST_ROLE2)) + .addAllBackendRoles(false) + .build(); + }); + assertEquals( "Unsupported connector protocol. Please use one of " + Arrays.toString(VALID_PROTOCOLS.toArray(new String[0])), exception.getMessage()); + } + @Test public void constructorMLCreateConnectorInput_NullCredential() { Throwable exception = assertThrows(IllegalArgumentException.class, () -> { diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/AgentUtils.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/AgentUtils.java index 7de547127a..75384efc82 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/AgentUtils.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/AgentUtils.java @@ -993,7 +993,7 @@ public static List getToolNames(Map tools) { public static Tool createTool(Map toolFactories, Map executeParams, MLToolSpec toolSpec) { if (!toolFactories.containsKey(toolSpec.getType())) { - throw new IllegalArgumentException("Tool not found: " + toolSpec.getType()); + throw new IllegalArgumentException("Tool type not found" ); } Map toolParams = new HashMap<>(); toolParams.putAll(executeParams); diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/MLAgentExecutor.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/MLAgentExecutor.java index 1594506cf4..577d5546cb 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/MLAgentExecutor.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/MLAgentExecutor.java @@ -21,12 +21,7 @@ import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; import java.time.Instant; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Objects; +import java.util.*; import org.opensearch.ExceptionsHelper; import org.opensearch.OpenSearchException; @@ -654,7 +649,8 @@ protected MLAgentRunner getAgentRunner(MLAgent mlAgent) { encryptor ); default: - throw new IllegalArgumentException("Unsupported agent type: " + mlAgent.getType()); + throw new IllegalArgumentException("Unsupported agent type. Please use one of " + + Arrays.toString(MLAgentType.values())); } } diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/function_calling/FunctionCallingFactory.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/function_calling/FunctionCallingFactory.java index 5a38d0b7bd..d7ea013cc2 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/function_calling/FunctionCallingFactory.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/function_calling/FunctionCallingFactory.java @@ -27,7 +27,11 @@ public static FunctionCalling create(String llmInterface) { case LLM_INTERFACE_BEDROCK_CONVERSE_DEEPSEEK_R1: return new BedrockConverseDeepseekR1FunctionCalling(); default: - throw new IllegalArgumentException(String.format("Invalid _llm_interface: %s", llmInterface)); + throw new IllegalArgumentException( + String.format("Invalid _llm_interface. Supported values are %s,%s,%s", + LLM_INTERFACE_BEDROCK_CONVERSE_CLAUDE, + LLM_INTERFACE_OPENAI_V1_CHAT_COMPLETIONS, + LLM_INTERFACE_BEDROCK_CONVERSE_DEEPSEEK_R1)); } } } diff --git a/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/agent/MLAgentExecutorTest.java b/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/agent/MLAgentExecutorTest.java index efc84d8f8c..cf46673b08 100644 --- a/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/agent/MLAgentExecutorTest.java +++ b/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/agent/MLAgentExecutorTest.java @@ -32,7 +32,9 @@ import org.junit.Assert; import org.junit.Before; +import org.junit.Rule; import org.junit.Test; +import org.junit.rules.ExpectedException; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.Mock; @@ -140,6 +142,9 @@ public class MLAgentExecutorTest { @Captor private ArgumentCaptor exceptionCaptor; + @Rule + public ExpectedException exceptionRule = ExpectedException.none(); + private DiscoveryNode localNode = new DiscoveryNode( "mockClusterManagerNodeId", "mockClusterManagerNodeId", diff --git a/plugin/src/main/java/org/opensearch/ml/action/agents/TransportRegisterAgentAction.java b/plugin/src/main/java/org/opensearch/ml/action/agents/TransportRegisterAgentAction.java index e91d27c9bb..0680cc0bfd 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/agents/TransportRegisterAgentAction.java +++ b/plugin/src/main/java/org/opensearch/ml/action/agents/TransportRegisterAgentAction.java @@ -104,7 +104,7 @@ private void registerAgent(MLAgent agent, ActionListener !buildInToolNames.contains(type)) .collect(Collectors.toSet()); if (!unrecognizedTools.isEmpty()) { - exception.addValidationError(String.format(Locale.ROOT, "Unrecognized tool in request: %s", unrecognizedTools)); + exception.addValidationError("Unrecognized tool in request"); throw exception; } return channel -> client.execute(MLMcpToolsRegisterAction.INSTANCE, registerNodesRequest, new RestToXContentListener<>(channel)); From d7115cce66d689074fa80ef0dd605615fc6fa611 Mon Sep 17 00:00:00 2001 From: Jagadeesh Date: Wed, 15 Oct 2025 00:52:53 +1100 Subject: [PATCH 2/5] Formatting changes Signed-off-by: Jagadeesh --- .../connector/MLCreateConnectorInput.java | 2 +- .../ml/common/agent/MLAgentTest.java | 2 +- .../MLCreateConnectorInputTests.java | 29 ++++++++++--------- .../engine/algorithms/agent/AgentUtils.java | 2 +- .../algorithms/agent/MLAgentExecutor.java | 3 +- .../FunctionCallingFactory.java | 12 +++++--- 6 files changed, 28 insertions(+), 22 deletions(-) diff --git a/common/src/main/java/org/opensearch/ml/common/transport/connector/MLCreateConnectorInput.java b/common/src/main/java/org/opensearch/ml/common/transport/connector/MLCreateConnectorInput.java index 1d8094e316..d138093ba0 100644 --- a/common/src/main/java/org/opensearch/ml/common/transport/connector/MLCreateConnectorInput.java +++ b/common/src/main/java/org/opensearch/ml/common/transport/connector/MLCreateConnectorInput.java @@ -31,11 +31,11 @@ import org.opensearch.ml.common.CommonValue; import org.opensearch.ml.common.connector.ConnectorAction; import org.opensearch.ml.common.connector.ConnectorClientConfig; +import org.opensearch.ml.common.connector.ConnectorProtocols; import lombok.Builder; import lombok.Data; import lombok.Setter; -import org.opensearch.ml.common.connector.ConnectorProtocols; @Data public class MLCreateConnectorInput implements ToXContentObject, Writeable { diff --git a/common/src/test/java/org/opensearch/ml/common/agent/MLAgentTest.java b/common/src/test/java/org/opensearch/ml/common/agent/MLAgentTest.java index f5e3ca73d3..d272877597 100644 --- a/common/src/test/java/org/opensearch/ml/common/agent/MLAgentTest.java +++ b/common/src/test/java/org/opensearch/ml/common/agent/MLAgentTest.java @@ -354,7 +354,7 @@ public void fromStream() throws IOException { @Test public void constructor_InvalidAgentType() { exceptionRule.expect(IllegalArgumentException.class); - exceptionRule.expectMessage("Invalid Agent Type, Please use one of "+ Arrays.toString(MLAgentType.values())); + exceptionRule.expectMessage("Invalid Agent Type, Please use one of " + Arrays.toString(MLAgentType.values())); new MLAgent( "test_name", diff --git a/common/src/test/java/org/opensearch/ml/common/transport/connector/MLCreateConnectorInputTests.java b/common/src/test/java/org/opensearch/ml/common/transport/connector/MLCreateConnectorInputTests.java index 09fc8af85f..bac44679fc 100644 --- a/common/src/test/java/org/opensearch/ml/common/transport/connector/MLCreateConnectorInputTests.java +++ b/common/src/test/java/org/opensearch/ml/common/transport/connector/MLCreateConnectorInputTests.java @@ -172,20 +172,23 @@ public void constructorMLCreateConnectorInput_NullProtocol() { public void constructorMLCreateConnectorInput_InvalidProtocol() { Throwable exception = assertThrows(IllegalArgumentException.class, () -> { MLCreateConnectorInput - .builder() - .name(TEST_CONNECTOR_NAME) - .description(TEST_CONNECTOR_DESCRIPTION) - .version(TEST_CONNECTOR_VERSION) - .protocol("dummy") - .parameters(Map.of(TEST_PARAM_KEY, TEST_PARAM_VALUE)) - .credential(Map.of(TEST_CREDENTIAL_KEY, TEST_CREDENTIAL_VALUE)) - .actions(List.of()) - .access(AccessMode.PUBLIC) - .backendRoles(Arrays.asList(TEST_ROLE1, TEST_ROLE2)) - .addAllBackendRoles(false) - .build(); + .builder() + .name(TEST_CONNECTOR_NAME) + .description(TEST_CONNECTOR_DESCRIPTION) + .version(TEST_CONNECTOR_VERSION) + .protocol("dummy") + .parameters(Map.of(TEST_PARAM_KEY, TEST_PARAM_VALUE)) + .credential(Map.of(TEST_CREDENTIAL_KEY, TEST_CREDENTIAL_VALUE)) + .actions(List.of()) + .access(AccessMode.PUBLIC) + .backendRoles(Arrays.asList(TEST_ROLE1, TEST_ROLE2)) + .addAllBackendRoles(false) + .build(); }); - assertEquals( "Unsupported connector protocol. Please use one of " + Arrays.toString(VALID_PROTOCOLS.toArray(new String[0])), exception.getMessage()); + assertEquals( + "Unsupported connector protocol. Please use one of " + Arrays.toString(VALID_PROTOCOLS.toArray(new String[0])), + exception.getMessage() + ); } @Test diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/AgentUtils.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/AgentUtils.java index 75384efc82..42af6dad29 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/AgentUtils.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/AgentUtils.java @@ -993,7 +993,7 @@ public static List getToolNames(Map tools) { public static Tool createTool(Map toolFactories, Map executeParams, MLToolSpec toolSpec) { if (!toolFactories.containsKey(toolSpec.getType())) { - throw new IllegalArgumentException("Tool type not found" ); + throw new IllegalArgumentException("Tool type not found"); } Map toolParams = new HashMap<>(); toolParams.putAll(executeParams); diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/MLAgentExecutor.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/MLAgentExecutor.java index 577d5546cb..bd8c5145eb 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/MLAgentExecutor.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/MLAgentExecutor.java @@ -649,8 +649,7 @@ protected MLAgentRunner getAgentRunner(MLAgent mlAgent) { encryptor ); default: - throw new IllegalArgumentException("Unsupported agent type. Please use one of " + - Arrays.toString(MLAgentType.values())); + throw new IllegalArgumentException("Unsupported agent type. Please use one of " + Arrays.toString(MLAgentType.values())); } } diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/function_calling/FunctionCallingFactory.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/function_calling/FunctionCallingFactory.java index d7ea013cc2..66fac6a609 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/function_calling/FunctionCallingFactory.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/function_calling/FunctionCallingFactory.java @@ -28,10 +28,14 @@ public static FunctionCalling create(String llmInterface) { return new BedrockConverseDeepseekR1FunctionCalling(); default: throw new IllegalArgumentException( - String.format("Invalid _llm_interface. Supported values are %s,%s,%s", - LLM_INTERFACE_BEDROCK_CONVERSE_CLAUDE, - LLM_INTERFACE_OPENAI_V1_CHAT_COMPLETIONS, - LLM_INTERFACE_BEDROCK_CONVERSE_DEEPSEEK_R1)); + String + .format( + "Invalid _llm_interface. Supported values are %s,%s,%s", + LLM_INTERFACE_BEDROCK_CONVERSE_CLAUDE, + LLM_INTERFACE_OPENAI_V1_CHAT_COMPLETIONS, + LLM_INTERFACE_BEDROCK_CONVERSE_DEEPSEEK_R1 + ) + ); } } } From 01c633afa8b7b433e7a4d5b318dfba5db8eb9a4e Mon Sep 17 00:00:00 2001 From: Jagadeesh Date: Wed, 15 Oct 2025 00:56:35 +1100 Subject: [PATCH 3/5] Reverting unused imports and property Signed-off-by: Jagadeesh --- .../ml/engine/algorithms/agent/MLAgentExecutorTest.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/agent/MLAgentExecutorTest.java b/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/agent/MLAgentExecutorTest.java index cf46673b08..efc84d8f8c 100644 --- a/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/agent/MLAgentExecutorTest.java +++ b/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/agent/MLAgentExecutorTest.java @@ -32,9 +32,7 @@ import org.junit.Assert; import org.junit.Before; -import org.junit.Rule; import org.junit.Test; -import org.junit.rules.ExpectedException; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.Mock; @@ -142,9 +140,6 @@ public class MLAgentExecutorTest { @Captor private ArgumentCaptor exceptionCaptor; - @Rule - public ExpectedException exceptionRule = ExpectedException.none(); - private DiscoveryNode localNode = new DiscoveryNode( "mockClusterManagerNodeId", "mockClusterManagerNodeId", From 7ce35021cbb7864a44c3a10f7abef032eb02dbb5 Mon Sep 17 00:00:00 2001 From: Jagadeesh Date: Wed, 15 Oct 2025 01:18:49 +1100 Subject: [PATCH 4/5] Correcting imports Signed-off-by: Jagadeesh --- .../java/org/opensearch/ml/common/agent/MLAgent.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/org/opensearch/ml/common/agent/MLAgent.java b/common/src/main/java/org/opensearch/ml/common/agent/MLAgent.java index c19acc7f62..d1ef79f52a 100644 --- a/common/src/main/java/org/opensearch/ml/common/agent/MLAgent.java +++ b/common/src/main/java/org/opensearch/ml/common/agent/MLAgent.java @@ -12,7 +12,14 @@ import java.io.IOException; import java.time.Instant; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Optional; +import java.util.Set; import org.opensearch.Version; import org.opensearch.core.common.io.stream.StreamInput; From c39d814157a573940ff978b77c874ca6188f25fc Mon Sep 17 00:00:00 2001 From: Jagadeesh Date: Wed, 22 Oct 2025 00:25:25 +1100 Subject: [PATCH 5/5] Updating tests with correct protocol Signed-off-by: Jagadeesh --- .../org/opensearch/ml/client/MachineLearningClientTest.java | 2 +- .../org/opensearch/ml/client/MachineLearningNodeClientTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/test/java/org/opensearch/ml/client/MachineLearningClientTest.java b/client/src/test/java/org/opensearch/ml/client/MachineLearningClientTest.java index 9af058c734..52f5e48486 100644 --- a/client/src/test/java/org/opensearch/ml/client/MachineLearningClientTest.java +++ b/client/src/test/java/org/opensearch/ml/client/MachineLearningClientTest.java @@ -466,7 +466,7 @@ public void createConnector() { .name("test") .description("description") .version("testModelVersion") - .protocol("testProtocol") + .protocol("http") .parameters(params) .credential(credentials) .actions(null) diff --git a/client/src/test/java/org/opensearch/ml/client/MachineLearningNodeClientTest.java b/client/src/test/java/org/opensearch/ml/client/MachineLearningNodeClientTest.java index 1aa00c95d2..6e777c4cd8 100644 --- a/client/src/test/java/org/opensearch/ml/client/MachineLearningNodeClientTest.java +++ b/client/src/test/java/org/opensearch/ml/client/MachineLearningNodeClientTest.java @@ -1033,7 +1033,7 @@ public void createConnector() { .name("test") .description("description") .version("testModelVersion") - .protocol("testProtocol") + .protocol("http") .parameters(params) .credential(credentials) .actions(null)