Skip to content

Commit 00a5c6d

Browse files
authored
Revert "[ML] Return both modelId and inferenceId (#111490)" (#112508)
Both `model_id` and `inference_id` were returned from the inference API to support backwards compatibility while kibana migrates to `inference_id`. Now that the migration is complete, we will stop returning `model_id`. This reverts commit 3b8970c.
1 parent 9b2bad3 commit 00a5c6d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docs/changelog/112508.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 112508
2+
summary: "[ML] Create Inference API will no longer return model_id and now only return inference_id"
3+
area: Machine Learning
4+
type: bug
5+
issues: []

server/src/main/java/org/elasticsearch/inference/ModelConfigurations.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
126126
if (params.paramAsBoolean(USE_ID_FOR_INDEX, false)) {
127127
builder.field(INDEX_ONLY_ID_FIELD_NAME, inferenceEntityId);
128128
} else {
129-
builder.field(INDEX_ONLY_ID_FIELD_NAME, inferenceEntityId);
130129
builder.field(INFERENCE_ID_FIELD_NAME, inferenceEntityId);
131130
}
132131
builder.field(TaskType.NAME, taskType.toString());
@@ -143,7 +142,6 @@ public XContentBuilder toFilteredXContent(XContentBuilder builder, Params params
143142
if (params.paramAsBoolean(USE_ID_FOR_INDEX, false)) {
144143
builder.field(INDEX_ONLY_ID_FIELD_NAME, inferenceEntityId);
145144
} else {
146-
builder.field(INDEX_ONLY_ID_FIELD_NAME, inferenceEntityId);
147145
builder.field(INFERENCE_ID_FIELD_NAME, inferenceEntityId);
148146
}
149147
builder.field(TaskType.NAME, taskType.toString());

0 commit comments

Comments
 (0)