[Security assistant] Use inference connector in security AI features#204505
[Security assistant] Use inference connector in security AI features#204505stephmilovic merged 70 commits intoelastic:mainfrom
Conversation
…:YulNaumenko/kibana into ai-connector-inference-completion-openai
…n-openai' into inference_assistant_unified
…n-openai' into inference_assistant_unified
…:YulNaumenko/kibana into ai-connector-inference-completion-openai
…nce-completion-openai
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
|
@elasticmachine merge upstream |
Has anything changed w/r/t the "queued" nature of the connector; specifically that we don't use task manager to arrange to run the connector "later". Asking since it has not be "queued" in the past, which means it is somewhat exempt from some ZDT/BWC issues (the thorny ones). |
|
@elasticmachine merge upstream |
No, we’re not using task manager to queue inference tasks |
pmuellr
left a comment
There was a problem hiding this comment.
ResponseOps changes LGTM, assuming the connectors are not queued via task manager ... (left a question on that in the PR comments)
| tap((line) => { | ||
| if ('error' in line) { | ||
| throw new Error(line.error.message); | ||
| throw new Error(line.error.message ?? line.error.reason ?? 'Unknown error'); |
There was a problem hiding this comment.
I suggest using || instead of ??, as ?? will allow "" to pass through as the value:
> x = ""
''
> y = ""
''
> x ?? y ?? 'abc'
''
> x || y || 'abc'
'abc'…/kibana into inference_assistant_unified
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
|
YulNaumenko
left a comment
There was a problem hiding this comment.
LGTM! Great work!
Very exciting to see the puzzle peaces are coming together.
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/12673749960 |
…lastic#204505) (cherry picked from commit c6501da)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…tures (#204505) (#205923) # Backport This will backport the following commits from `main` to `8.x`: - [[Security assistant] Use inference connector in security AI features (#204505)](#204505) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Steph Milovic","email":"stephanie.milovic@elastic.co"},"sourceCommit":{"committedDate":"2025-01-08T15:30:15Z","message":"[Security assistant] Use inference connector in security AI features (#204505)","sha":"c6501da809c5ff8dc5f16076205ec65abaffcb54","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","v9.0.0","Team: SecuritySolution","backport:prev-minor","Team:Security Generative AI","v8.18.0"],"title":"[Security assistant] Use inference connector in security AI features","number":204505,"url":"https://github.com/elastic/kibana/pull/204505","mergeCommit":{"message":"[Security assistant] Use inference connector in security AI features (#204505)","sha":"c6501da809c5ff8dc5f16076205ec65abaffcb54"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204505","number":204505,"mergeCommit":{"message":"[Security assistant] Use inference connector in security AI features (#204505)","sha":"c6501da809c5ff8dc5f16076205ec65abaffcb54"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Summary
Enables new inference connector in the AI Assistant and Attack Discovery. To use with Attack Discovery, you must increase the rate limit of the connector and set the number of alerts sent to minimum (50).
Only preconfigured inference connectors will be shown in Security until all the providers will support unified completion.
To test
xpack.stack_connectors.enableExperimental: ['inferenceConnectorOn']inkibana.dev.ymlopenai-completion-preconfig