Skip to content

Commit 0753e91

Browse files
kibanamachineKDKHD
andauthored
[9.2] [GenAi] Enable the Default LLM Setting feature flag by default >9.2 (#238982) (#239075)
# Backport This will backport the following commits from `main` to `9.2`: - [[GenAi] Enable the Default LLM Setting feature flag by default >9.2 (#238982)](#238982) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Kenneth Kreindler","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-10-15T08:35:29Z","message":"[GenAi] Enable the Default LLM Setting feature flag by default >9.2 (#238982)\n\n## Summary\n\nSummarize your PR. If it involves visual changes include a screenshot or\ngif.\n\nEnables the new Default LLM setting by default in preparation for the\nfinal 9.2 build candidate.\n\nThe feature flag will be cleaned up in the future.\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [X] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [X]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [X] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [X] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [X] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [X] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [X] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [X] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n---------\n\nCo-authored-by: kibanamachine <[email protected]>","sha":"7ed27fe75e919c53556adbbc2bc211ecf632c916","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Security Generative AI","backport:version","v9.2.0","v9.3.0"],"title":"[GenAi] Enable the Default LLM Setting feature flag by default >9.2","number":238982,"url":"https://github.com/elastic/kibana/pull/238982","mergeCommit":{"message":"[GenAi] Enable the Default LLM Setting feature flag by default >9.2 (#238982)\n\n## Summary\n\nSummarize your PR. If it involves visual changes include a screenshot or\ngif.\n\nEnables the new Default LLM setting by default in preparation for the\nfinal 9.2 build candidate.\n\nThe feature flag will be cleaned up in the future.\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [X] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [X]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [X] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [X] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [X] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [X] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [X] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [X] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n---------\n\nCo-authored-by: kibanamachine <[email protected]>","sha":"7ed27fe75e919c53556adbbc2bc211ecf632c916"}},"sourceBranch":"main","suggestedTargetBranches":["9.2"],"targetPullRequestStates":[{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/238982","number":238982,"mergeCommit":{"message":"[GenAi] Enable the Default LLM Setting feature flag by default >9.2 (#238982)\n\n## Summary\n\nSummarize your PR. If it involves visual changes include a screenshot or\ngif.\n\nEnables the new Default LLM setting by default in preparation for the\nfinal 9.2 build candidate.\n\nThe feature flag will be cleaned up in the future.\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [X] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [X]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [X] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [X] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [X] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [X] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [X] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [X] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n---------\n\nCo-authored-by: kibanamachine <[email protected]>","sha":"7ed27fe75e919c53556adbbc2bc211ecf632c916"}}]}] BACKPORT--> Co-authored-by: Kenneth Kreindler <[email protected]>
1 parent 9a659ed commit 0753e91

File tree

6 files changed

+18
-6
lines changed

6 files changed

+18
-6
lines changed

x-pack/platform/plugins/private/gen_ai_settings/common/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
export const NO_DEFAULT_CONNECTOR = 'NO_DEFAULT_CONNECTOR';
99
export const AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED =
1010
'aiAssistant.defaultLlmSettingEnabled' as const;
11+
export const AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED_VALUE = true as const;

x-pack/platform/plugins/private/gen_ai_settings/public/components/gen_ai_settings_app.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ import type { ManagementAppMountParams } from '@kbn/management-plugin/public';
2626

2727
import { getSpaceIdFromPath } from '@kbn/spaces-utils';
2828
import { isEmpty } from 'lodash';
29-
import { AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED } from '../../common/constants';
29+
import {
30+
AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED,
31+
AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED_VALUE,
32+
} from '../../common/constants';
3033
import { useEnabledFeatures } from '../contexts/enabled_features_context';
3134
import { useKibana } from '../hooks/use_kibana';
3235
import { GoToSpacesButton } from './go_to_spaces_button';
@@ -96,7 +99,7 @@ export const GenAiSettingsApp: React.FC<GenAiSettingsAppProps> = ({ setBreadcrum
9699

97100
const showDefaultLlmSetting = featureFlags.getBooleanValue(
98101
AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED,
99-
false
102+
AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED_VALUE
100103
);
101104

102105
const connectorDescription = useMemo(() => {

x-pack/solutions/security/plugins/security_solution/common/constants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ export const DEFAULT_AI_CONNECTOR = 'securitySolution:defaultAIConnector' as con
188188
export const AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED =
189189
'aiAssistant.defaultLlmSettingEnabled' as const;
190190

191+
/** The default value for the default AI connector setting */
192+
export const AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED_VALUE = true as const;
193+
191194
/** This Kibana Advanced Setting sets a default AI value report minutes per alert */
192195
export const DEFAULT_VALUE_REPORT_MINUTES = 'securitySolution:defaultValueReportMinutes' as const;
193196

x-pack/solutions/security/plugins/security_solution/public/common/hooks/use_default_ai_connector_id.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { useAIConnectors } from './use_ai_connectors';
1212
import { getDefaultConnector } from '@kbn/elastic-assistant/impl/assistant/helpers';
1313
import {
1414
AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED,
15+
AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED_VALUE,
1516
DEFAULT_AI_CONNECTOR,
1617
} from '../../../common/constants';
1718

@@ -96,7 +97,7 @@ describe('useDefaultAIConnectorId', () => {
9697

9798
expect(mockFeatureFlags.getBooleanValue).toHaveBeenCalledWith(
9899
AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED,
99-
false
100+
AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED_VALUE
100101
);
101102
});
102103

x-pack/solutions/security/plugins/security_solution/public/common/hooks/use_default_ai_connector_id.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { getDefaultConnector } from '@kbn/elastic-assistant/impl/assistant/helpe
99
import { useMemo } from 'react';
1010
import {
1111
AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED,
12+
AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED_VALUE,
1213
DEFAULT_AI_CONNECTOR,
1314
} from '../../../common/constants';
1415
import { useAIConnectors } from './use_ai_connectors';
@@ -21,7 +22,7 @@ export const useDefaultAIConnectorId = () => {
2122
const legacyDefaultConnectorId = uiSettings.get<string>(DEFAULT_AI_CONNECTOR);
2223
const useNewDefaultConnector = featureFlags.getBooleanValue(
2324
AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED,
24-
false
25+
AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED_VALUE
2526
);
2627
const newDefaultConnectorId = getDefaultConnector(connectors, settings)?.id;
2728

x-pack/solutions/security/plugins/security_solution/public/flyout/ai_for_soc/components/connector_missing_callout.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ import { EuiCallOut, EuiLink } from '@elastic/eui';
1010
import { useNavigateTo } from '@kbn/security-solution-navigation';
1111
import { i18n } from '@kbn/i18n';
1212
import { useKibana } from '../../../common/lib/kibana';
13-
import { AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED } from '../../../../common/constants';
13+
import {
14+
AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED,
15+
AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED_VALUE,
16+
} from '../../../../common/constants';
1417

1518
const MISSING_CONNECTOR = i18n.translate('xpack.securitySolution.alertSummary.missingConnector', {
1619
defaultMessage: 'Missing connector',
@@ -56,7 +59,7 @@ export const ConnectorMissingCallout = memo(
5659
const { featureFlags } = useKibana().services;
5760
const useNewDefaultConnector = featureFlags.getBooleanValue(
5861
AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED,
59-
false
62+
AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED_VALUE
6063
);
6164
const { navigateTo } = useNavigateTo();
6265
const goToKibanaSettings = useCallback(

0 commit comments

Comments
 (0)