Skip to content

Commit 9e89b04

Browse files
[Inference API] Fix bug checking for e5 or reranker default IDs (elastic#119797)
* Fix bug checking for non-elser defaults * Update docs/changelog/119797.yaml * fix typo
1 parent b398448 commit 9e89b04

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

docs/changelog/119797.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 119797
2+
summary: "[Inference API] Fix bug checking for e5 or reranker default IDs"
3+
area: Machine Learning
4+
type: bug
5+
issues: []

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public void parseRequestConfig(
138138
Map<String, Object> config,
139139
ActionListener<Model> modelListener
140140
) {
141-
if (inferenceEntityId.equals(DEFAULT_ELSER_ID)) {
141+
if (isDefaultId(inferenceEntityId)) {
142142
modelListener.onFailure(
143143
new ElasticsearchStatusException(
144144
"[{}] is a reserved inference Id. Cannot create a new inference endpoint with a reserved Id",

0 commit comments

Comments
 (0)