-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Implement OpenShift AI integration for chat completion, embeddings, and reranking #136624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
DonalEvans
merged 90 commits into
elastic:main
from
Jan-Kazlouski-elastic:openshift-ai-integration
Nov 13, 2025
Merged
Changes from 35 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 fdb22ff
Refactor OpenShift AI service settings to use underscores in constant…
Jan-Kazlouski-elastic 8ce569e
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic b268e08
Add constructor to OpenShiftAiChatCompletionServiceSettings for URL h…
Jan-Kazlouski-elastic 9cae6b1
Add unit tests
Jan-Kazlouski-elastic f804331
[CI] Auto commit changes from spotless
af2fcd6
Add tests for UnifiedCompletionRequest model ID overrides in OpenShif…
Jan-Kazlouski-elastic b98d8d6
Add unit tests for OpenShiftAiChatCompletionResponseHandler
Jan-Kazlouski-elastic b19342f
Add unit tests for OpenShiftAiChatCompletionServiceSettings
Jan-Kazlouski-elastic 6af168c
Update request type description in OpenShiftAiCompletionResponseHandler
Jan-Kazlouski-elastic aadbfde
Refactor OpenShiftAiEmbeddingsServiceSettings to improve validation l…
Jan-Kazlouski-elastic fc5c182
Update OpenShiftAiChatCompletionRequestEntity to use new method for m…
Jan-Kazlouski-elastic d664644
Add unit tests for OpenShiftAiChatCompletionRequestEntity serialization
Jan-Kazlouski-elastic e6d4079
Add unit tests for OpenShiftAiEmbeddingsRequest and update model crea…
Jan-Kazlouski-elastic e0ecbc7
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic fb31094
Add unit tests for OpenShiftAiEmbeddingsRequestEntity
Jan-Kazlouski-elastic 8e78337
Fix Typo in OpenShiftAiRerankTaskSettings, add tests for request models
Jan-Kazlouski-elastic ce2cf92
Add unit tests for OpenShiftAiRerankServiceSettings and OpenShiftAiRe…
Jan-Kazlouski-elastic 6c6dfe5
[CI] Auto commit changes from spotless
52d439f
Add unit tests for OpenShiftAiRerankServiceSettings and OpenShiftAiRe…
Jan-Kazlouski-elastic d63f84f
Refactor tests in OpenShiftAIRerankRequestEntityTests and OpenShiftAi…
Jan-Kazlouski-elastic 63c2a58
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic 0a6da54
Enhance OpenShift AI service with detailed comments and utility class…
Jan-Kazlouski-elastic 5aef343
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic cc706be
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic 55bf99d
Refactor OpenShiftAiModel
Jan-Kazlouski-elastic d73f5da
Remove unused rateLimitSettings field from OpenShiftAiModel
Jan-Kazlouski-elastic 016efd6
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic 636d72a
Fix JavaDoc and update transport version
Jan-Kazlouski-elastic 95e7ef5
Add JavaDoc comments and null checks for OpenShift AI request entity
Jan-Kazlouski-elastic 065779d
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic bad5f31
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic 291f40a
Enhance mutation logic in OpenShift AI service settings tests
Jan-Kazlouski-elastic c34f6c4
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic e55f9fd
Update Transport Versions and refactor unit tests
Jan-Kazlouski-elastic c9640e2
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic c46a1e1
Fix OpenShiftAiServiceTests, update transport version
Jan-Kazlouski-elastic 53e8118
Enhance OpenShift AI model tests to support chunking settings and imp…
Jan-Kazlouski-elastic 1c3a86b
Merge remote-tracking branch 'origin/main' into feature/nvidia-integr…
Jan-Kazlouski-elastic 7e6d696
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic d68a636
Fix PR comments
Jan-Kazlouski-elastic 7f40459
Refactor accept methods in OpenShift AI models to include task settin…
Jan-Kazlouski-elastic ffd491d
Refactor OpenShift AI model to use model ID directly instead of Unifi…
Jan-Kazlouski-elastic 4fc2556
Update JinaAI rerank model token limit in rerankerWindowSize method
Jan-Kazlouski-elastic dbc1c56
Enhance documentation for OpenShift AI models and add task settings h…
Jan-Kazlouski-elastic e9fbce7
Refactor OpenShift AI Rerank handler to use JinaAIResponseHandler, us…
Jan-Kazlouski-elastic aeec397
Fix parameter documentation for modelId in OpenShift AI service setti…
Jan-Kazlouski-elastic 8813936
Refactor OpenShift AI service settings to streamline common settings …
Jan-Kazlouski-elastic 544ed20
Add check for empty or unchanged task settings in OpenShift AI rerank…
Jan-Kazlouski-elastic 7d0b5e1
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic 8b5c407
Replace TIMEOUT constant with ESTestCase.TEST_REQUEST_TIMEOUT in Open…
Jan-Kazlouski-elastic 9aaddfd
Refactor OpenShift AI service tests to use constants for URL, model I…
Jan-Kazlouski-elastic bd3cf05
Add assertions for OpenShift AI embeddings model service settings
Jan-Kazlouski-elastic 0902e9a
Refactor assertions in OpenShift AI tests to use Hamcrest matchers
Jan-Kazlouski-elastic a1a56b6
Update assertions in OpenShift AI chat completion model tests to use …
Jan-Kazlouski-elastic 6e7fbb4
Fix formatting issues in error messages for OpenShift AI chat complet…
Jan-Kazlouski-elastic 8c5524c
Refactor OpenShift AI tests to use constants for model ID, API key, a…
Jan-Kazlouski-elastic e9b5d97
Refactor OpenShift AI chat completion tests to use constants for URL,…
Jan-Kazlouski-elastic 356bd84
Refactor OpenShift AI tests to use getFirst() for request retrieval
Jan-Kazlouski-elastic 401ce6b
Remove redundant request body assertions in OpenShift AI action creat…
Jan-Kazlouski-elastic 40d07ae
Remove redundant assertions in OpenShift AI action creator tests
Jan-Kazlouski-elastic a10dc51
Rename input variables in OpenShift AI action creator tests for clarity
Jan-Kazlouski-elastic 662ccc6
Refactor error message assertions in OpenShift AI tests for improved …
Jan-Kazlouski-elastic 00d803f
Refactor OpenShift AI action creator tests to use NO_RETRY_SETTINGS f…
Jan-Kazlouski-elastic 9b4d560
Refactor OpenShift AI action creator tests to improve variable naming…
Jan-Kazlouski-elastic dc3a27f
Enhance OpenShift AI action creator tests with additional task settin…
Jan-Kazlouski-elastic c752a84
Refactor error message assertion in OpenShift AI tests for improved f…
Jan-Kazlouski-elastic b1c243b
Remove redundant assertion in OpenShift AI action creator tests for c…
Jan-Kazlouski-elastic 9de3fd6
Ensure non-null values for user-defined dimensions and URI in OpenShi…
Jan-Kazlouski-elastic 5f0cc26
Remove redundant test for OpenShift AI embeddings service settings se…
Jan-Kazlouski-elastic 21bda22
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic 01eb0ac
Refactor assertions in OpenShift AI tests for consistency and clarity
Jan-Kazlouski-elastic c75b710
Enhance OpenShift AI service settings tests for clarity and completeness
Jan-Kazlouski-elastic 27654f8
Refactor OpenShift AI request tests to improve variable naming and as…
Jan-Kazlouski-elastic 73e75dc
Refactor OpenShift AI test constants for improved clarity and consist…
Jan-Kazlouski-elastic d37cfaa
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic 30319bd
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic 1de3b06
Refactor OpenShift AI action creator tests for improved readability a…
Jan-Kazlouski-elastic 9a7586f
Add DIMENSIONS_SET_BY_USER constant and refactor variable names for c…
Jan-Kazlouski-elastic bb54f4b
Update OpenShift AI embeddings request tests to pass null for dimensions
Jan-Kazlouski-elastic 5fd79a7
Refactor OpenShift AI test constants for improved clarity and consist…
Jan-Kazlouski-elastic 6aa70a6
Refactor OpenShift AI test field names for clarity and consistency
Jan-Kazlouski-elastic e5c58b4
Add validation tests for invalid and empty URL in OpenShift AI settings
Jan-Kazlouski-elastic 4a0c7ba
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic 0e1b14b
Refactor OpenShift AI test constants for improved clarity and consist…
Jan-Kazlouski-elastic f242b74
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic a9974cc
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic 70bebeb
Add "openshift_ai" to various service lists in InferenceGetServicesIT
Jan-Kazlouski-elastic b30282d
Fix embeddings input handling in OpenShiftAiActionCreator
Jan-Kazlouski-elastic 6825e6c
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
Jan-Kazlouski-elastic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...er/src/main/resources/transport/definitions/referable/ml_inference_openshift_ai_added.csv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 9213000 | ||
| 9216000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| ml_inference_openshift_ai_added,9213000 | ||
| ml_inference_openshift_ai_added,9216000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
210 changes: 118 additions & 92 deletions
210
.../java/org/elasticsearch/xpack/inference/services/openshiftai/OpenShiftAiServiceTests.java
Large diffs are not rendered by default.
Oops, something went wrong.
649 changes: 410 additions & 239 deletions
649
...sticsearch/xpack/inference/services/openshiftai/action/OpenShiftAiActionCreatorTests.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that this test adds much value as is, since I can't think of any reasonable way it might be expected to fail in the event of a bug, and it doesn't allow us to differentiate between the case where the model name is overridden and the case where the original model name is used, because the outcome is the same in both.
If the
OpenShiftAiChatCompletionModel.of()method was modified to return the original model if the model names were equal, then this test could useassertThat(overriddenModel, is(sameInstance(model)));to make a meaningful assertion. ThesameInstance()assertion could also be used intestOverrideWith_UnifiedCompletionRequest_KeepsNullIfNoModelIdProvided()andtestOverrideWith_UnifiedCompletionRequest_UsesModelFields_WhenRequestDoesNotOverride()to strengthen those tests.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Fixed.