[AI Connector][Inference endpoint] Creation: adaptive allocations not set correctly on serverless#251357
Conversation
|
This PR is blocked due to an backend error. Inference team is looking into the issue now. Once fixed, we can test the UI changes. |
|
@elasticmachine merge upstream |
| } | ||
| : {}), | ||
| : { | ||
| ...(numAllocations !== undefined ? { num_allocations: numAllocations } : {}), |
There was a problem hiding this comment.
Just for clarity - why is this change to the serializer needed?
This is explicitly checking for undefined - is it possible for numAllocations to be null?
There was a problem hiding this comment.
When editing an endpoint on serverless, num_allocations was inside providerConfig and was being sent in the update request. However, Elasticsearch does not allow this field on serverless, so we need to remove it.
The cleanest solution is to remove (destructure) num_allocations from providerConfig at the beginning. After doing that, restProviderConfig will no longer include it.
For serverless, this is correct — the field should not be sent.
For stateful deployments, we still need num_allocations, so we add it back explicitly.
There was a problem hiding this comment.
is it possible for numAllocations to be null?
Yes. There is no
num_allocationsfield for OpenAI
| ...(config?.providerConfig?.num_allocations !== undefined && { | ||
| num_allocations: config.providerConfig.num_allocations, | ||
| }), | ||
| ...(adaptiveAllocations |
There was a problem hiding this comment.
For ease of understanding and maintenance, we should follow the kibana styleguide and not use nested ternary operators.
| }), | ||
| ...(adaptiveAllocations | ||
| ? { adaptive_allocations: adaptiveAllocations } | ||
| : numAllocations !== undefined |
There was a problem hiding this comment.
For this numAllocations undefined check - is it possible that it could be null?
There was a problem hiding this comment.
It can be null for OpenAI
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
💚 Build Succeeded
History
|
|
Starting backport for target branches: 9.3 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. 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) # Conflicts: # x-pack/platform/packages/shared/kbn-inference-endpoint-ui-common/src/components/inference_flyout_wrapper.test.tsx
… 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
… 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
…ns not set correctly on serverless (#251357) (#254585) # Backport This will backport the following commits from `main` to `9.3`: - [[AI Connector][Inference endpoint] Creation: adaptive allocations not set correctly on serverless (#251357)](#251357) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Saikat Sarkar","email":"132922331+saikatsarkar056@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-02-23T19:04:49Z","message":"[AI Connector][Inference endpoint] Creation: adaptive allocations not set correctly on serverless (#251357)\n\n## Summary\n\nFixes AI Connector inference endpoint creation failing on serverless\nwhen using the 'elasticsearch' provider with adaptive allocations\nenabled.\n\nThe issue was that `num_threads` and `num_allocations` were being sent\nin the `providerConfig` alongside `adaptive_allocations`, which causes a\nconflict since these properties cannot be set when adaptive allocations\nis enabled.\n\nThis PR updates the form serializer to exclude `num_threads` and\n`num_allocations` from the payload when adaptive allocations is\nconfigured.\n\n\n\nhttps://github.com/user-attachments/assets/5d4b42ff-db33-4f3a-ab70-b32fcccbc445\n\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n\n### Release note\nFixes AI Connector creation on serverless failing when adaptive\nallocations is enabled with the ElasticSearch provider.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Melissa <melissa.alvarez@elastic.co>\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"82dc85e41b82908e61c9afc0f9ab18dc4a734172","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Search","backport:version","v9.3.0","v9.4.0"],"title":"[AI Connector][Inference endpoint] Creation: adaptive allocations not set correctly on serverless","number":251357,"url":"https://github.com/elastic/kibana/pull/251357","mergeCommit":{"message":"[AI Connector][Inference endpoint] Creation: adaptive allocations not set correctly on serverless (#251357)\n\n## Summary\n\nFixes AI Connector inference endpoint creation failing on serverless\nwhen using the 'elasticsearch' provider with adaptive allocations\nenabled.\n\nThe issue was that `num_threads` and `num_allocations` were being sent\nin the `providerConfig` alongside `adaptive_allocations`, which causes a\nconflict since these properties cannot be set when adaptive allocations\nis enabled.\n\nThis PR updates the form serializer to exclude `num_threads` and\n`num_allocations` from the payload when adaptive allocations is\nconfigured.\n\n\n\nhttps://github.com/user-attachments/assets/5d4b42ff-db33-4f3a-ab70-b32fcccbc445\n\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n\n### Release note\nFixes AI Connector creation on serverless failing when adaptive\nallocations is enabled with the ElasticSearch provider.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Melissa <melissa.alvarez@elastic.co>\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"82dc85e41b82908e61c9afc0f9ab18dc4a734172"}},"sourceBranch":"main","suggestedTargetBranches":["9.3"],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/251357","number":251357,"mergeCommit":{"message":"[AI Connector][Inference endpoint] Creation: adaptive allocations not set correctly on serverless (#251357)\n\n## Summary\n\nFixes AI Connector inference endpoint creation failing on serverless\nwhen using the 'elasticsearch' provider with adaptive allocations\nenabled.\n\nThe issue was that `num_threads` and `num_allocations` were being sent\nin the `providerConfig` alongside `adaptive_allocations`, which causes a\nconflict since these properties cannot be set when adaptive allocations\nis enabled.\n\nThis PR updates the form serializer to exclude `num_threads` and\n`num_allocations` from the payload when adaptive allocations is\nconfigured.\n\n\n\nhttps://github.com/user-attachments/assets/5d4b42ff-db33-4f3a-ab70-b32fcccbc445\n\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n\n### Release note\nFixes AI Connector creation on serverless failing when adaptive\nallocations is enabled with the ElasticSearch provider.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Melissa <melissa.alvarez@elastic.co>\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"82dc85e41b82908e61c9afc0f9ab18dc4a734172"}}]}] BACKPORT-->
… 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>
Summary
Fixes AI Connector inference endpoint creation failing on serverless when using the 'elasticsearch' provider with adaptive allocations enabled.
The issue was that
num_threadsandnum_allocationswere being sent in theproviderConfigalongsideadaptive_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_threadsandnum_allocationsfrom the payload when adaptive allocations is configured.Screen.Recording.2026-02-02.at.2.58.32.PM.mov
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesbackport:*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.
Release note
Fixes AI Connector creation on serverless failing when adaptive allocations is enabled with the ElasticSearch provider.