Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
3c67123
Implement OpenShift AI integration for chat completion, embeddings, a…
Jan-Kazlouski-elastic Oct 15, 2025
fdb22ff
Refactor OpenShift AI service settings to use underscores in constant…
Jan-Kazlouski-elastic Oct 15, 2025
8ce569e
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic Oct 16, 2025
b268e08
Add constructor to OpenShiftAiChatCompletionServiceSettings for URL h…
Jan-Kazlouski-elastic Oct 16, 2025
9cae6b1
Add unit tests
Jan-Kazlouski-elastic Oct 16, 2025
f804331
[CI] Auto commit changes from spotless
Oct 16, 2025
af2fcd6
Add tests for UnifiedCompletionRequest model ID overrides in OpenShif…
Jan-Kazlouski-elastic Oct 17, 2025
b98d8d6
Add unit tests for OpenShiftAiChatCompletionResponseHandler
Jan-Kazlouski-elastic Oct 17, 2025
b19342f
Add unit tests for OpenShiftAiChatCompletionServiceSettings
Jan-Kazlouski-elastic Oct 17, 2025
6af168c
Update request type description in OpenShiftAiCompletionResponseHandler
Jan-Kazlouski-elastic Oct 17, 2025
aadbfde
Refactor OpenShiftAiEmbeddingsServiceSettings to improve validation l…
Jan-Kazlouski-elastic Oct 17, 2025
fc5c182
Update OpenShiftAiChatCompletionRequestEntity to use new method for m…
Jan-Kazlouski-elastic Oct 17, 2025
d664644
Add unit tests for OpenShiftAiChatCompletionRequestEntity serialization
Jan-Kazlouski-elastic Oct 17, 2025
e6d4079
Add unit tests for OpenShiftAiEmbeddingsRequest and update model crea…
Jan-Kazlouski-elastic Oct 20, 2025
e0ecbc7
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic Oct 20, 2025
fb31094
Add unit tests for OpenShiftAiEmbeddingsRequestEntity
Jan-Kazlouski-elastic Oct 20, 2025
8e78337
Fix Typo in OpenShiftAiRerankTaskSettings, add tests for request models
Jan-Kazlouski-elastic Oct 20, 2025
ce2cf92
Add unit tests for OpenShiftAiRerankServiceSettings and OpenShiftAiRe…
Jan-Kazlouski-elastic Oct 20, 2025
6c6dfe5
[CI] Auto commit changes from spotless
Oct 20, 2025
52d439f
Add unit tests for OpenShiftAiRerankServiceSettings and OpenShiftAiRe…
Jan-Kazlouski-elastic Oct 20, 2025
d63f84f
Refactor tests in OpenShiftAIRerankRequestEntityTests and OpenShiftAi…
Jan-Kazlouski-elastic Oct 21, 2025
63c2a58
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic Oct 21, 2025
0a6da54
Enhance OpenShift AI service with detailed comments and utility class…
Jan-Kazlouski-elastic Oct 21, 2025
5aef343
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic Oct 22, 2025
cc706be
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic Oct 23, 2025
55bf99d
Refactor OpenShiftAiModel
Jan-Kazlouski-elastic Oct 23, 2025
d73f5da
Remove unused rateLimitSettings field from OpenShiftAiModel
Jan-Kazlouski-elastic Oct 23, 2025
016efd6
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic Oct 24, 2025
636d72a
Fix JavaDoc and update transport version
Jan-Kazlouski-elastic Oct 24, 2025
95e7ef5
Add JavaDoc comments and null checks for OpenShift AI request entity
Jan-Kazlouski-elastic Oct 24, 2025
065779d
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic Oct 27, 2025
bad5f31
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic Oct 29, 2025
291f40a
Enhance mutation logic in OpenShift AI service settings tests
Jan-Kazlouski-elastic Oct 29, 2025
c34f6c4
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic Oct 30, 2025
e55f9fd
Update Transport Versions and refactor unit tests
Jan-Kazlouski-elastic Oct 30, 2025
c9640e2
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic Oct 31, 2025
c46a1e1
Fix OpenShiftAiServiceTests, update transport version
Jan-Kazlouski-elastic Oct 31, 2025
53e8118
Enhance OpenShift AI model tests to support chunking settings and imp…
Jan-Kazlouski-elastic Oct 31, 2025
1c3a86b
Merge remote-tracking branch 'origin/main' into feature/nvidia-integr…
Jan-Kazlouski-elastic Nov 4, 2025
7e6d696
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic Nov 5, 2025
d68a636
Fix PR comments
Jan-Kazlouski-elastic Nov 5, 2025
7f40459
Refactor accept methods in OpenShift AI models to include task settin…
Jan-Kazlouski-elastic Nov 5, 2025
ffd491d
Refactor OpenShift AI model to use model ID directly instead of Unifi…
Jan-Kazlouski-elastic Nov 5, 2025
4fc2556
Update JinaAI rerank model token limit in rerankerWindowSize method
Jan-Kazlouski-elastic Nov 5, 2025
dbc1c56
Enhance documentation for OpenShift AI models and add task settings h…
Jan-Kazlouski-elastic Nov 6, 2025
e9fbce7
Refactor OpenShift AI Rerank handler to use JinaAIResponseHandler, us…
Jan-Kazlouski-elastic Nov 6, 2025
aeec397
Fix parameter documentation for modelId in OpenShift AI service setti…
Jan-Kazlouski-elastic Nov 6, 2025
8813936
Refactor OpenShift AI service settings to streamline common settings …
Jan-Kazlouski-elastic Nov 6, 2025
544ed20
Add check for empty or unchanged task settings in OpenShift AI rerank…
Jan-Kazlouski-elastic Nov 6, 2025
7d0b5e1
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic Nov 6, 2025
8b5c407
Replace TIMEOUT constant with ESTestCase.TEST_REQUEST_TIMEOUT in Open…
Jan-Kazlouski-elastic Nov 6, 2025
9aaddfd
Refactor OpenShift AI service tests to use constants for URL, model I…
Jan-Kazlouski-elastic Nov 6, 2025
bd3cf05
Add assertions for OpenShift AI embeddings model service settings
Jan-Kazlouski-elastic Nov 6, 2025
0902e9a
Refactor assertions in OpenShift AI tests to use Hamcrest matchers
Jan-Kazlouski-elastic Nov 7, 2025
a1a56b6
Update assertions in OpenShift AI chat completion model tests to use …
Jan-Kazlouski-elastic Nov 7, 2025
6e7fbb4
Fix formatting issues in error messages for OpenShift AI chat complet…
Jan-Kazlouski-elastic Nov 7, 2025
8c5524c
Refactor OpenShift AI tests to use constants for model ID, API key, a…
Jan-Kazlouski-elastic Nov 7, 2025
e9b5d97
Refactor OpenShift AI chat completion tests to use constants for URL,…
Jan-Kazlouski-elastic Nov 7, 2025
356bd84
Refactor OpenShift AI tests to use getFirst() for request retrieval
Jan-Kazlouski-elastic Nov 7, 2025
401ce6b
Remove redundant request body assertions in OpenShift AI action creat…
Jan-Kazlouski-elastic Nov 7, 2025
40d07ae
Remove redundant assertions in OpenShift AI action creator tests
Jan-Kazlouski-elastic Nov 7, 2025
a10dc51
Rename input variables in OpenShift AI action creator tests for clarity
Jan-Kazlouski-elastic Nov 7, 2025
662ccc6
Refactor error message assertions in OpenShift AI tests for improved …
Jan-Kazlouski-elastic Nov 7, 2025
00d803f
Refactor OpenShift AI action creator tests to use NO_RETRY_SETTINGS f…
Jan-Kazlouski-elastic Nov 7, 2025
9b4d560
Refactor OpenShift AI action creator tests to improve variable naming…
Jan-Kazlouski-elastic Nov 7, 2025
dc3a27f
Enhance OpenShift AI action creator tests with additional task settin…
Jan-Kazlouski-elastic Nov 7, 2025
c752a84
Refactor error message assertion in OpenShift AI tests for improved f…
Jan-Kazlouski-elastic Nov 7, 2025
b1c243b
Remove redundant assertion in OpenShift AI action creator tests for c…
Jan-Kazlouski-elastic Nov 7, 2025
9de3fd6
Ensure non-null values for user-defined dimensions and URI in OpenShi…
Jan-Kazlouski-elastic Nov 7, 2025
5f0cc26
Remove redundant test for OpenShift AI embeddings service settings se…
Jan-Kazlouski-elastic Nov 7, 2025
21bda22
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic Nov 8, 2025
01eb0ac
Refactor assertions in OpenShift AI tests for consistency and clarity
Jan-Kazlouski-elastic Nov 8, 2025
c75b710
Enhance OpenShift AI service settings tests for clarity and completeness
Jan-Kazlouski-elastic Nov 8, 2025
27654f8
Refactor OpenShift AI request tests to improve variable naming and as…
Jan-Kazlouski-elastic Nov 8, 2025
73e75dc
Refactor OpenShift AI test constants for improved clarity and consist…
Jan-Kazlouski-elastic Nov 8, 2025
d37cfaa
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic Nov 10, 2025
30319bd
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic Nov 10, 2025
1de3b06
Refactor OpenShift AI action creator tests for improved readability a…
Jan-Kazlouski-elastic Nov 10, 2025
9a7586f
Add DIMENSIONS_SET_BY_USER constant and refactor variable names for c…
Jan-Kazlouski-elastic Nov 10, 2025
bb54f4b
Update OpenShift AI embeddings request tests to pass null for dimensions
Jan-Kazlouski-elastic Nov 10, 2025
5fd79a7
Refactor OpenShift AI test constants for improved clarity and consist…
Jan-Kazlouski-elastic Nov 10, 2025
6aa70a6
Refactor OpenShift AI test field names for clarity and consistency
Jan-Kazlouski-elastic Nov 10, 2025
e5c58b4
Add validation tests for invalid and empty URL in OpenShift AI settings
Jan-Kazlouski-elastic Nov 10, 2025
4a0c7ba
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic Nov 11, 2025
0e1b14b
Refactor OpenShift AI test constants for improved clarity and consist…
Jan-Kazlouski-elastic Nov 12, 2025
f242b74
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic Nov 12, 2025
a9974cc
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic Nov 12, 2025
70bebeb
Add "openshift_ai" to various service lists in InferenceGetServicesIT
Jan-Kazlouski-elastic Nov 12, 2025
b30282d
Fix embeddings input handling in OpenShiftAiActionCreator
Jan-Kazlouski-elastic Nov 12, 2025
6825e6c
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic Nov 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/changelog/136624.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 136624
summary: Added OpenShift AI text_embedding, completion, chat_completion and rerank support to the Inference Plugin
area: Machine Learning
type: enhancement
issues: []
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9218000
2 changes: 1 addition & 1 deletion server/src/main/resources/transport/upper_bounds/9.3.csv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
resharding_shard_summary_in_esql,9217000
ml_inference_openshift_ai_added,9218000
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public void testGetServicesWithoutTaskType() throws IOException {
"llama",
"mistral",
"openai",
"openshift_ai",
"streaming_completion_test_service",
"completion_test_service",
"test_reranking_service",
Expand Down Expand Up @@ -116,6 +117,7 @@ public void testGetServicesWithTextEmbeddingTaskType() throws IOException {
"llama",
"mistral",
"openai",
"openshift_ai",
"text_embedding_test_service",
"voyageai",
"watsonxai"
Expand All @@ -140,6 +142,7 @@ public void testGetServicesWithRerankTaskType() throws IOException {
"elasticsearch",
"googlevertexai",
"jinaai",
"openshift_ai",
"test_reranking_service",
"voyageai",
"hugging_face",
Expand Down Expand Up @@ -167,6 +170,7 @@ public void testGetServicesWithCompletionTaskType() throws IOException {
"googleaistudio",
"googlevertexai",
"openai",
"openshift_ai",
"streaming_completion_test_service",
"completion_test_service",
"hugging_face",
Expand All @@ -188,6 +192,7 @@ public void testGetServicesWithChatCompletionTaskType() throws IOException {
"deepseek",
"elastic",
"openai",
"openshift_ai",
"streaming_completion_test_service",
"hugging_face",
"amazon_sagemaker",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@
import org.elasticsearch.xpack.inference.services.openai.completion.OpenAiChatCompletionTaskSettings;
import org.elasticsearch.xpack.inference.services.openai.embeddings.OpenAiEmbeddingsServiceSettings;
import org.elasticsearch.xpack.inference.services.openai.embeddings.OpenAiEmbeddingsTaskSettings;
import org.elasticsearch.xpack.inference.services.openshiftai.completion.OpenShiftAiChatCompletionServiceSettings;
import org.elasticsearch.xpack.inference.services.openshiftai.embeddings.OpenShiftAiEmbeddingsServiceSettings;
import org.elasticsearch.xpack.inference.services.openshiftai.rerank.OpenShiftAiRerankServiceSettings;
import org.elasticsearch.xpack.inference.services.openshiftai.rerank.OpenShiftAiRerankTaskSettings;
import org.elasticsearch.xpack.inference.services.sagemaker.model.SageMakerModel;
import org.elasticsearch.xpack.inference.services.sagemaker.schema.SageMakerSchemas;
import org.elasticsearch.xpack.inference.services.settings.DefaultSecretSettings;
Expand Down Expand Up @@ -172,6 +176,7 @@ public static List<NamedWriteableRegistry.Entry> getNamedWriteables() {
addCustomNamedWriteables(namedWriteables);
addLlamaNamedWriteables(namedWriteables);
addAi21NamedWriteables(namedWriteables);
addOpenShiftAiNamedWriteables(namedWriteables);

addUnifiedNamedWriteables(namedWriteables);

Expand Down Expand Up @@ -446,6 +451,33 @@ private static void addOpenAiNamedWriteables(List<NamedWriteableRegistry.Entry>
);
}

private static void addOpenShiftAiNamedWriteables(List<NamedWriteableRegistry.Entry> namedWriteables) {
namedWriteables.add(
new NamedWriteableRegistry.Entry(
ServiceSettings.class,
OpenShiftAiEmbeddingsServiceSettings.NAME,
OpenShiftAiEmbeddingsServiceSettings::new
)
);
namedWriteables.add(
new NamedWriteableRegistry.Entry(
ServiceSettings.class,
OpenShiftAiChatCompletionServiceSettings.NAME,
OpenShiftAiChatCompletionServiceSettings::new
)
);
namedWriteables.add(
new NamedWriteableRegistry.Entry(
ServiceSettings.class,
OpenShiftAiRerankServiceSettings.NAME,
OpenShiftAiRerankServiceSettings::new
)
);
namedWriteables.add(
new NamedWriteableRegistry.Entry(TaskSettings.class, OpenShiftAiRerankTaskSettings.NAME, OpenShiftAiRerankTaskSettings::new)
);
}

private static void addHuggingFaceNamedWriteables(List<NamedWriteableRegistry.Entry> namedWriteables) {
namedWriteables.add(
new NamedWriteableRegistry.Entry(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@
import org.elasticsearch.xpack.inference.services.llama.LlamaService;
import org.elasticsearch.xpack.inference.services.mistral.MistralService;
import org.elasticsearch.xpack.inference.services.openai.OpenAiService;
import org.elasticsearch.xpack.inference.services.openshiftai.OpenShiftAiService;
import org.elasticsearch.xpack.inference.services.sagemaker.SageMakerClient;
import org.elasticsearch.xpack.inference.services.sagemaker.SageMakerService;
import org.elasticsearch.xpack.inference.services.sagemaker.model.SageMakerConfiguration;
Expand Down Expand Up @@ -492,6 +493,7 @@ public List<InferenceServiceExtension.Factory> getInferenceServiceFactories() {
context -> new DeepSeekService(httpFactory.get(), serviceComponents.get(), context),
context -> new LlamaService(httpFactory.get(), serviceComponents.get(), context),
context -> new Ai21Service(httpFactory.get(), serviceComponents.get(), context),
context -> new OpenShiftAiService(httpFactory.get(), serviceComponents.get(), context),
ElasticsearchInternalService::new,
context -> new CustomService(httpFactory.get(), serviceComponents.get(), context)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public final class ServiceFields {

public static final String SIMILARITY = "similarity";
public static final String DIMENSIONS = "dimensions";
public static final String DIMENSIONS_SET_BY_USER = "dimensions_set_by_user";
// Typically we use this to define the maximum tokens for the input text (text being sent to an integration)
public static final String MAX_INPUT_TOKENS = "max_input_tokens";
public static final String URL = "url";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

package org.elasticsearch.xpack.inference.services.openshiftai;

import org.elasticsearch.inference.ModelConfigurations;
import org.elasticsearch.inference.ModelSecrets;
import org.elasticsearch.inference.ServiceSettings;
import org.elasticsearch.inference.TaskSettings;
import org.elasticsearch.xpack.inference.external.action.ExecutableAction;
import org.elasticsearch.xpack.inference.services.RateLimitGroupingModel;
import org.elasticsearch.xpack.inference.services.openshiftai.action.OpenShiftAiActionVisitor;
import org.elasticsearch.xpack.inference.services.settings.DefaultSecretSettings;
import org.elasticsearch.xpack.inference.services.settings.RateLimitSettings;

import java.util.Map;
import java.util.Objects;

/**
* Represents an OpenShift AI model that can be used for inference tasks.
* This class extends RateLimitGroupingModel to handle rate limiting based on modelId and API key.
*/
public abstract class OpenShiftAiModel extends RateLimitGroupingModel {

protected OpenShiftAiModel(ModelConfigurations configurations, ModelSecrets secrets) {
super(configurations, secrets);
}

protected OpenShiftAiModel(RateLimitGroupingModel model, ServiceSettings serviceSettings) {
super(model, serviceSettings);
}

protected OpenShiftAiModel(RateLimitGroupingModel model, TaskSettings taskSettings) {
super(model, taskSettings);
}

@Override
public RateLimitSettings rateLimitSettings() {
return getServiceSettings().rateLimitSettings();
}

@Override
public int rateLimitGroupingHash() {
return Objects.hash(getServiceSettings().uri(), getServiceSettings().modelId());
}

@Override
public OpenShiftAiServiceSettings getServiceSettings() {
return (OpenShiftAiServiceSettings) super.getServiceSettings();
}

@Override
public DefaultSecretSettings getSecretSettings() {
return (DefaultSecretSettings) super.getSecretSettings();
}

/**
* Accepts a visitor to create an executable action for this OpenShift AI model.
*
* @param creator the visitor that creates the executable action
* @param taskSettings the task settings to be used for the executable action
* @return an {@link ExecutableAction} specific to this OpenShift AI model
*/
public abstract ExecutableAction accept(OpenShiftAiActionVisitor creator, Map<String, Object> taskSettings);
}
Loading