Register Streams AI features with the Inference Feature Registry#262018
Register Streams AI features with the Inference Feature Registry#262018thomheymann merged 5 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/obs-onboarding-team (Team:obs-onboarding) |
ApprovabilityVerdict: Needs human review This PR introduces new AI feature registrations with the Inference Feature Registry, removes an API endpoint, and refactors connector fetching to use a different library with changed behavior. The author does not own any of the modified files, which are all owned by obs-onboarding-team and obs-sig-events-team. The designated code owners should review these changes. You can customize Macroscope's approvability policy. Learn more. |
|
This seems to work well, but I'm not sure about the changes on the server side. We are still passing the connector ID from the client to the server in all cases. So it seems like the branch where it picks the default on the server side is never actually called. Should we still do it then? Is this a preparation for some future simplification? |
@flash1293 Yeh good point. It doesn't add much value for us currently. I think where that approach shines is for background tasks or jobs that aren't triggered via UI interaction. But we can add it when it comes to that. I'll revert for now |
Address PR feedback: the server-side resolveConnectorForFeature fallback was dead code since the client always sends a connector ID. Align with Pattern A used by other features (AI Assistant, Elastic Assistant, Automatic Import) where interactive routes require the client to provide the connector ID and the inference feature registry is used only for connector listing/discovery. Made-with: Cursor
The Streams routes use the chat completion API under the hood, so chat_completion is the accurate task type. The previous completion value was cosmetic-only but misleading on the Model Settings page. Made-with: Cursor
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
History
|
Summary
Registers Streams AI suggestion features (partitioning suggestions and processing suggestions) with the Inference Feature Registry so that connector selection is managed centrally rather than via a custom internal API.
registerSuggestionsInferenceFeatures()that registers a parentstreamsfeature and two child features (streams_partitioning_suggestions,streams_processing_suggestions) with thesearchInferenceEndpointsplugin at setup time.@kbn/streams-schema.GET /internal/streams/_connectorsroute with theuseLoadConnectorshook from@kbn/inference-connectors, passingfeatureIdso connector selection is scoped to the registered feature.useGenAIConnectorsby removing manual connector loading/filtering logic and exposingisConnectorSelectionRestrictedfrom the registry.connectorId.Screenshot
Made with Cursor