Add GET /inference_features route to expose feature registry#258044
Add GET /inference_features route to expose feature registry#258044saikatsarkar056 merged 24 commits intoelastic:mainfrom
Conversation
|
🤖 Jobs for this PR can be triggered through checkboxes. 🚧
ℹ️ To trigger the CI, please tick the checkbox below 👇
|
…res_route_api Made-with: Cursor # Conflicts: # yarn.lock
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#11136[✅] x-pack/platform/test/serverless/api_integration/configs/search/config.group1.ts: 25/25 tests passed. |
|
@elasticmachine merge upstream |
steliosmavro
left a comment
There was a problem hiding this comment.
QA owned file changes look good. Tests are passing the flaky test runner. Just some CI checks that need fix. Overall LGTM! 🚀
…r056/kibana into inference_features_route_api
…r056/kibana into inference_features_route_api
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#11157[✅] x-pack/platform/test/api_integration/apis/search_inference_endpoints/config.ts: 25/25 tests passed. |
sphilipse
left a comment
There was a problem hiding this comment.
Code looks good to me. I question whether we really need end to end tests to check whether these routes work. That feels like bloating the test suite without adding much testing value. I'd much rather have a few focused browser tests at the end to round it all up rather than a bunch of e2e API tests that test the functionality of an API in isolation.
Let me remove the integration tests and keep only the unit tests. |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
|
…d_agent_navigation2 * commit '9289d6b5502db245e645e190b0246554396c6c20': (34 commits) [api-docs] 2026-03-19 Daily api_docs build (elastic#258471) [Shared UX][DateRangePicker] Missing parts (elastic#258229) [Dashboard] Keep pinned_panels separate in read response (elastic#258444) Move inheritance: true to top level in .coderabbit.yml (elastic#258461) [DOCS] 9.3.2 Kibana release notes (elastic#257332) adds routing accept metric attribute to the cps metric (elastic#258168) [ML] AI/Inference Connector creation: use 'location' field to correctly set provider config (elastic#250838) [Lens] Add e2e test for legend list layout (elastic#258160) [SigEvents] Convert feature duplication evaluators to createPrompt pattern (elastic#256534) Add actionable-obs author to .coderabbit.yml (elastic#257922) [DOCS] 9.2.7 Kibana release notes (elastic#257331) Grant Serverless editor/viewer access to ES v2 indices (elastic#258384) [SigEvents][Evals] Rename terminology for KI features and KI queries (elastic#258361) [EDR Workflows][Osquery] Add shared table toolbar components and redesign saved queries list (elastic#258394) [Automatic Import V2] Upload samples using an existing index (elastic#258074) Add GET /inference_features route to expose feature registry (elastic#258044) fix additional fields not included (elastic#257625) [Discover] [Metrics] Add tier 2 journeys for Metrics in Discover E2E (elastic#255036) [Lens as code] Support correct X-Axis types in ES|QL visualizations (elastic#258159) Update APM (main) (elastic#254880) ...
…#258044) ## Summary Adds an internal `GET /internal/search_inference_endpoints/features` route that exposes the Inference Feature Registry. The Model Settings UI needs this route to read all registered features and render the parent-child feature tree. #### Manual Testing I manually tested the this by temporarily registering a test feature in the AI Assistant plugin's start() method and verifying the API response via curl. The route correctly returns registered features. ``` ➜ kibana git:(inference_features_route_api) ✗ curl -su elastic:changeme 'http://localhost:5601/tyn/internal/search_inference_endpoints/features' -H 'x-elastic-internal-origin: kibana' -H 'elastic-api-version: 1' | jq . { "features": [ { "featureId": "ai_assistant", "featureName": "AI Assistant", "featureDescription": "Conversational AI assistant for security workflows", "taskType": "completion", "recommendedEndpoints": [ ".rainbow-sprinkles-completion" ] } ] } ``` ### 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. - [x] [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) - [ ] ... --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…#258044) ## Summary Adds an internal `GET /internal/search_inference_endpoints/features` route that exposes the Inference Feature Registry. The Model Settings UI needs this route to read all registered features and render the parent-child feature tree. #### Manual Testing I manually tested the this by temporarily registering a test feature in the AI Assistant plugin's start() method and verifying the API response via curl. The route correctly returns registered features. ``` ➜ kibana git:(inference_features_route_api) ✗ curl -su elastic:changeme 'http://localhost:5601/tyn/internal/search_inference_endpoints/features' -H 'x-elastic-internal-origin: kibana' -H 'elastic-api-version: 1' | jq . { "features": [ { "featureId": "ai_assistant", "featureName": "AI Assistant", "featureDescription": "Conversational AI assistant for security workflows", "taskType": "completion", "recommendedEndpoints": [ ".rainbow-sprinkles-completion" ] } ] } ``` ### 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. - [x] [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) - [ ] ... --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
Adds an internal
GET /internal/search_inference_endpoints/featuresroute that exposes the Inference Feature Registry. The Model Settings UI needs this route to read all registered features and render the parent-child feature tree.Manual Testing
I manually tested the this by temporarily registering a test feature in the AI Assistant plugin's start() method and verifying the API response via curl. The route correctly returns registered features.
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.