Skip to content

Commit 20cc47d

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

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
@@ -136,7 +136,7 @@ public void parseRequestConfig(
136136
Map<String, Object> config,
137137
ActionListener<Model> modelListener
138138
) {
139-
if (inferenceEntityId.equals(DEFAULT_ELSER_ID)) {
139+
if (isDefaultId(inferenceEntityId)) {
140140
modelListener.onFailure(
141141
new ElasticsearchStatusException(
142142
"[{}] is a reserved inference Id. Cannot create a new inference endpoint with a reserved Id",

0 commit comments

Comments
 (0)