Skip to content

[9.3] [AI Connector][Inference endpoint] Creation: adaptive allocations not set correctly on serverless (#251357)#254585

Merged
saikatsarkar056 merged 1 commit intoelastic:9.3from
saikatsarkar056:backport/9.3/pr-251357
Feb 23, 2026
Merged

[9.3] [AI Connector][Inference endpoint] Creation: adaptive allocations not set correctly on serverless (#251357)#254585
saikatsarkar056 merged 1 commit intoelastic:9.3from
saikatsarkar056:backport/9.3/pr-251357

Conversation

@saikatsarkar056
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.3:

Questions ?

Please refer to the Backport tool documentation

… set correctly on serverless (elastic#251357)

## Summary

Fixes AI Connector inference endpoint creation failing on serverless
when using the 'elasticsearch' provider with adaptive allocations
enabled.

The issue was that `num_threads` and `num_allocations` were being sent
in the `providerConfig` alongside `adaptive_allocations`, which causes a
conflict since these properties cannot be set when adaptive allocations
is enabled.

This PR updates the form serializer to exclude `num_threads` and
`num_allocations` from the payload when adaptive allocations is
configured.

https://github.com/user-attachments/assets/5d4b42ff-db33-4f3a-ab70-b32fcccbc445

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

### Release note
Fixes AI Connector creation on serverless failing when adaptive
allocations is enabled with the ElasticSearch provider.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Melissa <melissa.alvarez@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 82dc85e)
Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	x-pack/platform/packages/shared/kbn-inference-endpoint-ui-common/src/components/inference_flyout_wrapper.test.tsx
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
indexManagement 737.0KB 737.3KB +245.0B
onechat 523.5KB 523.5KB -4.0B
searchInferenceEndpoints 142.9KB 143.1KB +231.0B
securitySolution 10.8MB 10.8MB +9.0B
stackConnectors 1.1MB 1.1MB +13.0B
total +494.0B

Copy link
Copy Markdown
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - code review only

@saikatsarkar056 saikatsarkar056 merged commit 342266a into elastic:9.3 Feb 23, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants