You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/elasticsearch/ElasticsearchInternalService.java
+14-9Lines changed: 14 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -152,6 +152,7 @@ public void parseRequestConfig(
152
152
config,
153
153
preferredModelVariant,
154
154
serviceSettingsMap,
155
+
true,
155
156
chunkingSettings,
156
157
modelListener
157
158
)
@@ -183,6 +184,7 @@ public void parseRequestConfig(
183
184
config,
184
185
preferredModelVariant,
185
186
serviceSettingsMap,
187
+
OLD_ELSER_SERVICE_NAME.equals(serviceName),
186
188
chunkingSettings,
187
189
modelListener
188
190
)
@@ -342,6 +344,7 @@ private void elserCase(
342
344
Map<String, Object> config,
343
345
PreferredModelVariantpreferredModelVariant,
344
346
Map<String, Object> serviceSettingsMap,
347
+
booleanisElserService,
345
348
ChunkingSettingschunkingSettings,
346
349
ActionListener<Model> modelListener
347
350
) {
@@ -372,15 +375,17 @@ private void elserCase(
372
375
}
373
376
}
374
377
375
-
DEPRECATION_LOGGER.warn(
376
-
DeprecationCategory.API,
377
-
"inference_api_elser_service",
378
-
"The [{}] service is deprecated and will be removed in a future release. Use the [{}] service instead, with"
379
-
+ " [model_id] set to [{}] in the [service_settings]",
380
-
OLD_ELSER_SERVICE_NAME,
381
-
ElasticsearchInternalService.NAME,
382
-
defaultModelId
383
-
);
378
+
if (isElserService) {
379
+
DEPRECATION_LOGGER.warn(
380
+
DeprecationCategory.API,
381
+
"inference_api_elser_service",
382
+
"The [{}] service is deprecated and will be removed in a future release. Use the [{}] service instead, with"
383
+
+ " [model_id] set to [{}] in the [service_settings]",
384
+
OLD_ELSER_SERVICE_NAME,
385
+
ElasticsearchInternalService.NAME,
386
+
defaultModelId
387
+
);
388
+
}
384
389
385
390
if (modelVariantDoesNotMatchArchitecturesAndIsNotPlatformAgnostic(preferredModelVariant, esServiceSettingsBuilder.getModelId())) {
0 commit comments