Skip to content

Commit c5f28a1

Browse files
authored
[ML] Remove rate limit field from services API for EIS (#135838) (#136284)
The Elastic Inference Service does not accept a rate limit setting and should not be declared in service configuration.
1 parent 30beb2e commit c5f28a1

File tree

3 files changed

+5
-25
lines changed

3 files changed

+5
-25
lines changed

docs/changelog/135838.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 135838
2+
summary: Remove rate limit field from services API for EIS
3+
area: Machine Learning
4+
type: bug
5+
issues: []

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/elastic/ElasticInferenceService.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
import org.elasticsearch.xpack.inference.services.elastic.rerank.ElasticInferenceServiceRerankServiceSettings;
6565
import org.elasticsearch.xpack.inference.services.elastic.sparseembeddings.ElasticInferenceServiceSparseEmbeddingsModel;
6666
import org.elasticsearch.xpack.inference.services.elastic.sparseembeddings.ElasticInferenceServiceSparseEmbeddingsServiceSettings;
67-
import org.elasticsearch.xpack.inference.services.settings.RateLimitSettings;
6867
import org.elasticsearch.xpack.inference.telemetry.TraceContext;
6968

7069
import java.util.EnumSet;
@@ -683,12 +682,6 @@ public static InferenceServiceConfiguration createConfiguration(EnumSet<TaskType
683682
.build()
684683
);
685684

686-
configurationMap.putAll(
687-
RateLimitSettings.toSettingsConfiguration(
688-
EnumSet.of(TaskType.SPARSE_EMBEDDING, TaskType.CHAT_COMPLETION, TaskType.RERANK, TaskType.TEXT_EMBEDDING)
689-
)
690-
);
691-
692685
return new InferenceServiceConfiguration.Builder().setService(NAME)
693686
.setName(SERVICE_NAME)
694687
.setTaskTypes(enabledTaskTypes)

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/elastic/ElasticInferenceServiceTests.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -971,15 +971,6 @@ public void testCreateConfiguration() throws Exception {
971971
"name": "Elastic",
972972
"task_types": ["sparse_embedding", "chat_completion", "text_embedding"],
973973
"configurations": {
974-
"rate_limit.requests_per_minute": {
975-
"description": "Minimize the number of rate limit errors.",
976-
"label": "Rate Limit",
977-
"required": false,
978-
"sensitive": false,
979-
"updatable": false,
980-
"type": "int",
981-
"supported_task_types": ["text_embedding", "sparse_embedding" , "rerank", "chat_completion"]
982-
},
983974
"model_id": {
984975
"description": "The name of the model to use for the inference task.",
985976
"label": "Model ID",
@@ -1028,15 +1019,6 @@ public void testGetConfiguration_WithoutSupportedTaskTypes() throws Exception {
10281019
"name": "Elastic",
10291020
"task_types": [],
10301021
"configurations": {
1031-
"rate_limit.requests_per_minute": {
1032-
"description": "Minimize the number of rate limit errors.",
1033-
"label": "Rate Limit",
1034-
"required": false,
1035-
"sensitive": false,
1036-
"updatable": false,
1037-
"type": "int",
1038-
"supported_task_types": ["text_embedding", "sparse_embedding" , "rerank", "chat_completion"]
1039-
},
10401022
"model_id": {
10411023
"description": "The name of the model to use for the inference task.",
10421024
"label": "Model ID",

0 commit comments

Comments
 (0)