Align Automatic Migrations connector resolution with Assistant and Agent Builder#259840
Merged
logeekal merged 4 commits intoelastic:mainfrom Mar 27, 2026
Merged
Conversation
…ent Builder Switch SIEM Migrations from the old loadAllActions connector loading path (which returns preconfigured YAML keys as IDs) to the inference plugin's connector resolution (which returns inference_id-based connector IDs), fixing "Saved object not found" errors with preconfigured inference connectors. Made-with: Cursor
sphilipse
approved these changes
Mar 26, 2026
angorayc
approved these changes
Mar 27, 2026
Contributor
Author
|
Thanks @delanni for triggering the build 🦸 |
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
|
SoniaSanzV
pushed a commit
to SoniaSanzV/kibana
that referenced
this pull request
Mar 30, 2026
…ent Builder (elastic#259840) ## Summary Aligns Automatic Migrations (SIEM Migrations) with the same connector resolution scheme used by Assistant and Agent Builder. After elastic#258530, Automatic Migrations was still using the old connector loading path (`loadAllActions` from triggers-actions-ui), which returns preconfigured connector YAML keys (e.g., `Anthropic-Claude-Opus-4-6`) as connector IDs. This meant the `connectorId` passed to [`naturalLanguageToEsql`](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/server/lib/siem_migrations/common/task/util/esql_knowledge_base.ts#L24) was a `model_id` (old scheme) instead of the `inference_id`, resulting in a `Saved object [action/.anthropic-claude-4.6-opus] not found` error. This PR switches Automatic Migrations to use the inference plugin's connector resolution (same as Assistant and Agent Builder), which returns `inference_id`-based connector IDs. ## Changes - **Frontend:** Replaced `useAIConnectors` / `loadAiConnectors` with `useLoadConnectors` / `loadConnectorsForFeature` from `@kbn/inference-connectors` (scoped to `featureId: 'siem_migrations'`) - **Backend:** Replaced `actionsClient.get()` with `inferenceClient.getConnectorById()` in rules and dashboards start routes - **`@kbn/inference-connectors`:** Extracted `loadConnectorsForFeature` as a reusable stateless function from `useLoadConnectors` ## Test plan - [ ] Select a preconfigured inference connector in the SIEM Migrations onboarding card - [ ] Start a rule migration — should succeed without "saved object not found" error - [ ] Start a dashboard migration — same - [ ] Verify connector selection persists across modal reopens (via localStorage) -- Made with Cursor --------- Co-authored-by: Alex Szabo <alex.szabo@elastic.co>
jeramysoucy
pushed a commit
to jeramysoucy/kibana
that referenced
this pull request
Apr 1, 2026
…ent Builder (elastic#259840) ## Summary Aligns Automatic Migrations (SIEM Migrations) with the same connector resolution scheme used by Assistant and Agent Builder. After elastic#258530, Automatic Migrations was still using the old connector loading path (`loadAllActions` from triggers-actions-ui), which returns preconfigured connector YAML keys (e.g., `Anthropic-Claude-Opus-4-6`) as connector IDs. This meant the `connectorId` passed to [`naturalLanguageToEsql`](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/server/lib/siem_migrations/common/task/util/esql_knowledge_base.ts#L24) was a `model_id` (old scheme) instead of the `inference_id`, resulting in a `Saved object [action/.anthropic-claude-4.6-opus] not found` error. This PR switches Automatic Migrations to use the inference plugin's connector resolution (same as Assistant and Agent Builder), which returns `inference_id`-based connector IDs. ## Changes - **Frontend:** Replaced `useAIConnectors` / `loadAiConnectors` with `useLoadConnectors` / `loadConnectorsForFeature` from `@kbn/inference-connectors` (scoped to `featureId: 'siem_migrations'`) - **Backend:** Replaced `actionsClient.get()` with `inferenceClient.getConnectorById()` in rules and dashboards start routes - **`@kbn/inference-connectors`:** Extracted `loadConnectorsForFeature` as a reusable stateless function from `useLoadConnectors` ## Test plan - [ ] Select a preconfigured inference connector in the SIEM Migrations onboarding card - [ ] Start a rule migration — should succeed without "saved object not found" error - [ ] Start a dashboard migration — same - [ ] Verify connector selection persists across modal reopens (via localStorage) -- Made with Cursor --------- Co-authored-by: Alex Szabo <alex.szabo@elastic.co>
paulinashakirova
pushed a commit
to paulinashakirova/kibana
that referenced
this pull request
Apr 2, 2026
…ent Builder (elastic#259840) ## Summary Aligns Automatic Migrations (SIEM Migrations) with the same connector resolution scheme used by Assistant and Agent Builder. After elastic#258530, Automatic Migrations was still using the old connector loading path (`loadAllActions` from triggers-actions-ui), which returns preconfigured connector YAML keys (e.g., `Anthropic-Claude-Opus-4-6`) as connector IDs. This meant the `connectorId` passed to [`naturalLanguageToEsql`](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/server/lib/siem_migrations/common/task/util/esql_knowledge_base.ts#L24) was a `model_id` (old scheme) instead of the `inference_id`, resulting in a `Saved object [action/.anthropic-claude-4.6-opus] not found` error. This PR switches Automatic Migrations to use the inference plugin's connector resolution (same as Assistant and Agent Builder), which returns `inference_id`-based connector IDs. ## Changes - **Frontend:** Replaced `useAIConnectors` / `loadAiConnectors` with `useLoadConnectors` / `loadConnectorsForFeature` from `@kbn/inference-connectors` (scoped to `featureId: 'siem_migrations'`) - **Backend:** Replaced `actionsClient.get()` with `inferenceClient.getConnectorById()` in rules and dashboards start routes - **`@kbn/inference-connectors`:** Extracted `loadConnectorsForFeature` as a reusable stateless function from `useLoadConnectors` ## Test plan - [ ] Select a preconfigured inference connector in the SIEM Migrations onboarding card - [ ] Start a rule migration — should succeed without "saved object not found" error - [ ] Start a dashboard migration — same - [ ] Verify connector selection persists across modal reopens (via localStorage) -- Made with Cursor --------- Co-authored-by: Alex Szabo <alex.szabo@elastic.co>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Aligns Automatic Migrations (SIEM Migrations) with the same connector resolution scheme used by Assistant and Agent Builder.
After #258530, Automatic Migrations was still using the old connector loading path (
loadAllActionsfrom triggers-actions-ui), which returns preconfigured connector YAML keys (e.g.,Anthropic-Claude-Opus-4-6) as connector IDs. This meant theconnectorIdpassed tonaturalLanguageToEsqlwas amodel_id(old scheme) instead of theinference_id, resulting in aSaved object [action/.anthropic-claude-4.6-opus] not founderror.This PR switches Automatic Migrations to use the inference plugin's connector resolution (same as Assistant and Agent Builder), which returns
inference_id-based connector IDs.Changes
useAIConnectors/loadAiConnectorswithuseLoadConnectors/loadConnectorsForFeaturefrom@kbn/inference-connectors(scoped tofeatureId: 'siem_migrations')actionsClient.get()withinferenceClient.getConnectorById()in rules and dashboards start routes@kbn/inference-connectors: ExtractedloadConnectorsForFeatureas a reusable stateless function fromuseLoadConnectorsTest plan
--
Made with Cursor