From b4fa5ee3cb0ac308a2dfd1533565dc4cccc721ca Mon Sep 17 00:00:00 2001 From: David Kyle Date: Tue, 7 Oct 2025 16:29:05 +0100 Subject: [PATCH] [ML] Make the Cohere service Model Id field is required (#136017) --- docs/changelog/136017.yaml | 5 +++++ .../xpack/inference/services/cohere/CohereService.java | 2 +- .../xpack/inference/services/cohere/CohereServiceTests.java | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 docs/changelog/136017.yaml diff --git a/docs/changelog/136017.yaml b/docs/changelog/136017.yaml new file mode 100644 index 0000000000000..75ecbccf243cf --- /dev/null +++ b/docs/changelog/136017.yaml @@ -0,0 +1,5 @@ +pr: 136017 +summary: Cohere service Model Id field is required +area: Machine Learning +type: bug +issues: [] diff --git a/x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/cohere/CohereService.java b/x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/cohere/CohereService.java index 6c87ee5b86d68..2bf813c0abc1f 100644 --- a/x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/cohere/CohereService.java +++ b/x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/cohere/CohereService.java @@ -367,7 +367,7 @@ public static InferenceServiceConfiguration get() { "The name of the model to use for the inference task." ) .setLabel("Model ID") - .setRequired(false) + .setRequired(true) .setSensitive(false) .setUpdatable(false) .setType(SettingsConfigurationFieldType.STRING) diff --git a/x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/cohere/CohereServiceTests.java b/x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/cohere/CohereServiceTests.java index 52e4f904a4de0..f91c731268377 100644 --- a/x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/cohere/CohereServiceTests.java +++ b/x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/cohere/CohereServiceTests.java @@ -1557,7 +1557,7 @@ public void testGetConfiguration() throws Exception { "model_id": { "description": "The name of the model to use for the inference task.", "label": "Model ID", - "required": false, + "required": true, "sensitive": false, "updatable": false, "type": "str",