Skip to content

Commit 7766b8e

Browse files
Remove DeepSeek checkModelConfig and fix tests
1 parent 1033c36 commit 7766b8e

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

x-pack/plugin/inference/qa/inference-service-tests/src/javaRestTest/java/org/elasticsearch/xpack/inference/InferenceGetServicesIT.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public void testGetServicesWithoutTaskType() throws IOException {
6464
@SuppressWarnings("unchecked")
6565
public void testGetServicesWithTextEmbeddingTaskType() throws IOException {
6666
List<Object> services = getServices(TaskType.TEXT_EMBEDDING);
67-
assertThat(services.size(), equalTo(15));
67+
assertThat(services.size(), equalTo(16));
6868

6969
String[] providers = new String[services.size()];
7070
for (int i = 0; i < services.size(); i++) {
@@ -86,6 +86,7 @@ public void testGetServicesWithTextEmbeddingTaskType() throws IOException {
8686
"jinaai",
8787
"mistral",
8888
"openai",
89+
"test_service",
8990
"text_embedding_test_service",
9091
"voyageai",
9192
"watsonxai"
@@ -157,7 +158,7 @@ public void testGetServicesWithChatCompletionTaskType() throws IOException {
157158
@SuppressWarnings("unchecked")
158159
public void testGetServicesWithSparseEmbeddingTaskType() throws IOException {
159160
List<Object> services = getServices(TaskType.SPARSE_EMBEDDING);
160-
assertThat(services.size(), equalTo(5));
161+
assertThat(services.size(), equalTo(6));
161162

162163
String[] providers = new String[services.size()];
163164
for (int i = 0; i < services.size(); i++) {
@@ -166,7 +167,14 @@ public void testGetServicesWithSparseEmbeddingTaskType() throws IOException {
166167
}
167168

168169
assertArrayEquals(
169-
List.of("alibabacloud-ai-search", "elastic", "elasticsearch", "hugging_face", "test_service").toArray(),
170+
List.of(
171+
"alibabacloud-ai-search",
172+
"elastic",
173+
"elasticsearch",
174+
"hugging_face",
175+
"streaming_completion_test_service",
176+
"test_service"
177+
).toArray(),
170178
providers
171179
);
172180
}

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/deepseek/DeepSeekService.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import org.elasticsearch.xpack.inference.services.SenderService;
3333
import org.elasticsearch.xpack.inference.services.ServiceComponents;
3434
import org.elasticsearch.xpack.inference.services.settings.DefaultSecretSettings;
35-
import org.elasticsearch.xpack.inference.services.validation.ModelValidatorBuilder;
3635

3736
import java.util.EnumSet;
3837
import java.util.HashMap;
@@ -173,12 +172,6 @@ public Set<TaskType> supportedStreamingTasks() {
173172
return SUPPORTED_TASK_TYPES_FOR_STREAMING;
174173
}
175174

176-
@Override
177-
public void checkModelConfig(Model model, ActionListener<Model> listener) {
178-
// TODO: Remove this function once all services have been updated to use the new model validators
179-
ModelValidatorBuilder.buildModelValidator(model.getTaskType()).validate(this, model, listener);
180-
}
181-
182175
private static class Configuration {
183176
public static InferenceServiceConfiguration get() {
184177
return configuration.getOrCompute();

0 commit comments

Comments
 (0)