[SigEvents] Remove custom model selection, migrate index patterns to uiSettings#260741
Conversation
…ings. Move index selector to Kibana Advance settings
|
/ci |
|
Did manual testing of the PR, works as expected. When the default model is changed, a different model is used. Otherwise, all the default models are used. |
|
/ci-ralph |
|
/ralph fix the build issues and make it green |
… projects - Decrement SAVED_OBJECT_TYPES_COUNT from 155 to 154 after removing streams-significant-events-settings SO type - Update streams_app tsconfig.json: remove unused @kbn/inference-connectors, add required @kbn/deeplinks-management - Regenerate moon.yml to match tsconfig changes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Fixed the CI build failures from build #420664:
Verified the saved objects registration integration test passes locally. Written by cursor, wait for @achyutjhunjhunwala to chime in |
ApprovabilityVerdict: Needs human review This PR is a significant architectural change that removes a saved object type and migrates connector/model selection to use the centralized Inference Feature Registry. While mostly deletions, it changes runtime behavior for connector resolution and removes settings API endpoints. The author does not own any of the changed files, which are owned by multiple teams including obs-sig-events-team and kibana-core. You can customize Macroscope's approvability policy. Learn more. |
|
/ralph check the test failures of build 421192 and fix them Build URL: https://buildkite.com/elastic/kibana-pull-request/builds/421192 Use |
|
Investigated the test failures in build #421192. All 3 failures are not caused by this PR:
Previous builds #421000 and #420993 passed (with flaky retries), confirming these are not PR-related. No action needed in this PR. Written by Ralph, wait for @achyutjhunjhunwala to chime in |
💛 Build succeeded, but was flaky
Failed CI Steps
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
History
|
Resolve merge conflicts from upstream PR elastic#260741 which removed model_settings_config saved objects. Migrate the useMemory setting to a uiSetting (OBSERVABILITY_STREAMS_ENABLE_MEMORY), aligning with upstream's pattern. Replace all modelSettingsClient.getSettings() calls with uiSettingsClient.get() and remove connectorIdDiscovery references (now resolved via default AI connector). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
Cleans up the Significant Events settings page by removing our own per-feature model selection infrastructure and delegating connector resolution to the platform's Inference Feature Registry.
Before: The Settings tab had 3 connector dropdowns (KI extraction, query generation, discovery). Selections were stored in a custom saved object (
streams-significant-events-settings). Background tasks read that SO to decide which LLM to call.After: The Settings tab has a link to Stack Management → Model Settings, where admins configure connector overrides centrally (same place as every other inference feature in Kibana). The index patterns field stays on the page but is now stored as a Kibana uiSetting instead of the custom SO. The custom SO is gone entirely.
What changed and why
Settings tab (
tab.tsx)The 3 connector dropdowns, their
useLoadConnectorshooks, stale-connector callouts, and no-default callouts are all removed. In their place: a short paragraph and anEuiLinkto the Model Settings page, generated viaMANAGEMENT_APP_LOCATOR(the same locator pattern used by SLO, Synthetics, etc.).The index patterns textarea stays. It now reads the initial value from
core.uiSettings.get()and saves viacore.settings.client.set()— the built-in uiSettings HTTP API handles persistence, no custom route needed.New uiSetting:
observability:streamsSigEventsIndexPatternsfeature_flags.tsalongside the other streams flagsreadonly: true+readonlyMode: 'ui'— hidden from the Advanced Settings page, but the custom settings page can still read and write it programmaticallylogs*(same as the old SO default)Task definitions — connector resolution
All 4 tasks (
features_identification,significant_events_queries_generation,insights_discovery,onboarding) previously readconnectorId*fields from the custom SO and passed them throughresolveConnectorIdAndCheckAllowlist. They now callgetForFeaturedirectly:getForFeatureresolves the connector using this priority order:inference_settingsSO)recommendedEndpointsfrom our feature registration (register_significant_events_inference_features.ts)useIndexPatternsConfighookReplaced the API fetch (
GET /internal/streams/_significant_events/settings) with a directcore.uiSettings.get()read. Return signature is unchanged so the only consumer (streams_view.tsx) needs no updates.routes/utils/resolve_connector_id.tsis kept — it is still used by the significant events SSE endpoint and description generation route, which accept a caller-suppliedconnectorIdwith a fallback to the default AI connector.Test updates
Core SO integration tests — two platform-level tests that track all registered SO types were updated to remove
streams-significant-events-settings:src/core/server/integration_tests/saved_objects/registration/type_registrations.test.tssrc/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.tsEvals suite —
configureModelSelectionSettings()inkbn-evals-suite-significant-eventspreviously calledPUT /internal/streams/_significant_events/settings(now deleted). Updated to callPUT /internal/search_inference_endpoints/settingsinstead — the platform admin override API thatgetForFeaturechecks first.Data migration
Users with custom index patterns saved in the old SO will have them reset to
logs*after this change. Acceptable given the feature is in technical preview with limited adoption. No migration script — the old orphaned SO data causes no errors (Kibana ignores unknown SO types).How to test
logging.loggers[plugins.streams].level: debuginkibana.dev.yml)New Custom Settings Page