Skip to content

[ML][Inference endpoints creation] Add support for headers in the OpenAI integration#241887

Merged
alvarezmelissa87 merged 1 commit intoelastic:mainfrom
alvarezmelissa87:inference-endpoints-creation-schema-update
Nov 5, 2025
Merged

[ML][Inference endpoints creation] Add support for headers in the OpenAI integration#241887
alvarezmelissa87 merged 1 commit intoelastic:mainfrom
alvarezmelissa87:inference-endpoints-creation-schema-update

Conversation

@alvarezmelissa87
Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 commented Nov 4, 2025

Summary

This PR is the first part of an effort to add custom header support for OpenAI in the inference endpoints creation UI.

Because adding new properties to a schema require a 2 step deployment (see #228371 (comment)), 2 PRs are needed for this.

step one - the schema changes in this PR
step two - things that can set the config property (so here, the UI) - PR here #242187

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, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests 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
  • 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 was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.
@alvarezmelissa87 alvarezmelissa87 self-assigned this Nov 4, 2025
@alvarezmelissa87 alvarezmelissa87 requested a review from a team as a code owner November 4, 2025 23:20
@alvarezmelissa87 alvarezmelissa87 added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Feature:Inference UI ML Inference endpoints UI and AI connector v9.3.0 Feature: AI Infra Relating to the AI Assistant flow and any work impacting/involving the AI/Inference Connector labels Nov 4, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

cc @alvarezmelissa87

Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@Samiul-TheSoccerFan Samiul-TheSoccerFan left a comment

Choose a reason for hiding this comment

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

LGTM

@alvarezmelissa87 alvarezmelissa87 merged commit a04b4e3 into elastic:main Nov 5, 2025
27 checks passed
@alvarezmelissa87 alvarezmelissa87 deleted the inference-endpoints-creation-schema-update branch November 5, 2025 17:42
wildemat pushed a commit to wildemat/kibana that referenced this pull request Nov 5, 2025
…nAI integration (elastic#241887)

## Summary

This PR is the first part of an effort to add custom header support for
OpenAI in the inference endpoints creation UI.

Because adding new properties to a schema require a 2 step deployment
(see
elastic#228371 (comment)),
2 PRs are needed for this.

step one - the schema changes in this PR
step two - things that can set the config property (so here, the UI) -
PR link to be added


### 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
- [ ] [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
- [ ] 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)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
alvarezmelissa87 added a commit that referenced this pull request Nov 21, 2025
## Summary

This PR is the second part of an effort to add custom header support for
OpenAI in the inference endpoints creation UI.

Because adding new properties to a schema require a 2 step deployment
(see
#228371 (comment)),
2 PRs are needed for this.

step one - the schema changes in
#241887 (this PR can't be merged
until this is in serverless)
step two - things that can set the config property (so here, the UI) -
in this PR

This PR improves the behavior of the headers input field.
- when toggling off the headers switch, headers are no longer removed -
the previous behavior was causing confusion
- switch label now reads 'Hide headers' when toggled on and 'Add
headers' when off (if editing with existing headers, reads 'View
headers' when toggled off)
- adds duplicate key check and adds error message when duplicate key is
detected
- headers input field now keeps it's own state (array list for the
headers) in order to detect the duplicate keys and the form state is
updated onblur and when no duplicates are present. This ensures the form
updates only when the user is done typing and cuts down on unnecessary
re-renders.



https://github.com/user-attachments/assets/53e59c78-4619-4b34-959e-5382a369882c



Flaky test runner for updates
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/9818
Flaky test runner after behavior update (last commit)
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/9854


### 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
- [ ] [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
- [ ] 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)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
eokoneyo pushed a commit to eokoneyo/kibana that referenced this pull request Dec 2, 2025
…nAI integration (elastic#241887)

## Summary

This PR is the first part of an effort to add custom header support for
OpenAI in the inference endpoints creation UI.

Because adding new properties to a schema require a 2 step deployment
(see
elastic#228371 (comment)),
2 PRs are needed for this.

step one - the schema changes in this PR
step two - things that can set the config property (so here, the UI) -
PR link to be added


### 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
- [ ] [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
- [ ] 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)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
eokoneyo pushed a commit to eokoneyo/kibana that referenced this pull request Dec 2, 2025
…#242187)

## Summary

This PR is the second part of an effort to add custom header support for
OpenAI in the inference endpoints creation UI.

Because adding new properties to a schema require a 2 step deployment
(see
elastic#228371 (comment)),
2 PRs are needed for this.

step one - the schema changes in
elastic#241887 (this PR can't be merged
until this is in serverless)
step two - things that can set the config property (so here, the UI) -
in this PR

This PR improves the behavior of the headers input field.
- when toggling off the headers switch, headers are no longer removed -
the previous behavior was causing confusion
- switch label now reads 'Hide headers' when toggled on and 'Add
headers' when off (if editing with existing headers, reads 'View
headers' when toggled off)
- adds duplicate key check and adds error message when duplicate key is
detected
- headers input field now keeps it's own state (array list for the
headers) in order to detect the duplicate keys and the form state is
updated onblur and when no duplicates are present. This ensures the form
updates only when the user is done typing and cuts down on unnecessary
re-renders.



https://github.com/user-attachments/assets/53e59c78-4619-4b34-959e-5382a369882c



Flaky test runner for updates
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/9818
Flaky test runner after behavior update (last commit)
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/9854


### 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
- [ ] [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
- [ ] 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)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature: AI Infra Relating to the AI Assistant flow and any work impacting/involving the AI/Inference Connector Feature:Inference UI ML Inference endpoints UI and AI connector :ml release_note:skip Skip the PR/issue when compiling release notes v9.3.0

4 participants