[9.4] [One Workflow] Deprecate direct AI connector step types in favor of ai.prompt (#263694)#264354
Merged
Kiryous merged 1 commit intoelastic:9.4from Apr 20, 2026
Merged
Conversation
…i.prompt (elastic#263694) ## Summary Extends the workflow step deprecation mechanism to support **prefix-based matching** and deprecates all direct AI connector step types (`inference.*`, `bedrock.*`, `gen-ai.*`, `gemini.*`) in favor of the purpose-built `ai.prompt` step. - Users were confused by the availability of raw AI connector steps alongside the purpose-built `ai.*` steps ([Slack thread](https://elastic.slack.com/archives/C08U04SUN49/p1776097440515239)) - Deprecated steps are hidden from autocomplete, the Add Action menu, and AI agent discovery - Existing workflows using these step types continue to work — they just show a deprecation warning in the editor ### Changes - Added `DEPRECATED_STEP_PREFIX_METADATA` to `@kbn/workflows` for prefix-based deprecation matching - Updated `getDeprecatedStepMetadata()` to check prefix matches after exact matches - Migrated all deprecation consumers from direct map access (`deprecatedMap[key]`) to function calls (`getDeprecatedStepMetadata(key)`) - Updated the agent builder tool to detect prefix deprecation on dynamic connector steps ### Screenshots **Editor deprecation warnings** — `inference.completion` and `bedrock.invokeAI` now show deprecation squiggles and hover tooltip: | Before (main) | After | |---|---| |  |  | **Deprecation hover tooltip** — hovering on a deprecated AI connector step shows the replacement suggestion:  **Autocomplete** — typing `inference` shows "No suggestions" (all `inference.*` steps are filtered):  **Add Action menu** — searching for "inference" or "bedrock" returns no options:  **`ai.prompt` not affected** — searching "ai" in the actions menu still shows AI Prompt, AI Classify, AI Summarize:  **Exact-match deprecation still works** — `kibana.createCase` still shows deprecation warning (existing behavior preserved):  Closes elastic/security-team#16816 ## Test plan - [x] Verify `inference.*`, `bedrock.*`, `gen-ai.*`, `gemini.*` steps no longer appear in autocomplete suggestions - [x] Verify these steps no longer appear in the Add Action menu - [x] Verify existing workflows using these steps show a deprecation warning in the editor - [x] Verify `ai.prompt` step is not affected by the deprecation - [x] Verify `kibana.*` Cases steps still show exact-match deprecation warnings 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> (cherry picked from commit 9af9077)
5 tasks
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Public APIs missing comments
Async chunks
History |
rosomri
approved these changes
Apr 20, 2026
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.
Backport
This will backport the following commits from
mainto9.4:Questions ?
Please refer to the Backport tool documentation