Skip to content

[9.1] [ML] Correctly handle empty inputs in chunkedInfer() (#138632) - #138838

Merged
DonalEvans merged 1 commit into
elastic:9.1from
DonalEvans:backport/9.1/pr-138632
Dec 1, 2025
Merged

DonalEvans merged 1 commit into
elastic:9.1from
DonalEvans:backport/9.1/pr-138632

Conversation

@DonalEvans

Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.1:

Questions ?

Please refer to the Backport tool documentation

- Add method to allow services that implement SenderService to indicate
  whether they support chunked inference
- Return immediately if the input list is empty for services that
  support chunked inference
- Throw exception if the input list is empty for services that do not
  support chunked inference, to maintain existing behaviour
- Add tests for all services that implement doChunkedInfer()
- Update DeepSeekServiceTests for new error message

(cherry picked from commit f70dbb8)

# Conflicts:
#	x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/SenderService.java
#	x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/ai21/Ai21Service.java
#	x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/contextualai/ContextualAiService.java
#	x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/deepseek/DeepSeekServiceTests.java
#	x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/elastic/ElasticInferenceServiceTests.java
#	x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/elasticsearch/ElasticsearchInternalServiceTests.java
#	x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/googlevertexai/GoogleVertexAiServiceTests.java
#	x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/jinaai/JinaAIServiceTests.java
#	x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/llama/LlamaServiceTests.java
#	x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/openshiftai/OpenShiftAiServiceTests.java
@DonalEvans DonalEvans added >bug :ml Machine learning Team:ML Meta label for the ML team labels Dec 1, 2025
@DonalEvans
DonalEvans merged commit 7e119c7 into elastic:9.1 Dec 1, 2025
35 checks passed
@DonalEvans
DonalEvans deleted the backport/9.1/pr-138632 branch December 1, 2025 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport >bug :ml Machine learning Team:ML Meta label for the ML team v9.1.9

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants