Skip to content

[8.19] [GenAi] Clean up default LLM setting feature flag. (#242543)#243247

Open
KDKHD wants to merge 9 commits intoelastic:8.19from
KDKHD:backport/8.19/pr-242543
Open

[8.19] [GenAi] Clean up default LLM setting feature flag. (#242543)#243247
KDKHD wants to merge 9 commits intoelastic:8.19from
KDKHD:backport/8.19/pr-242543

Conversation

@KDKHD
Copy link
Copy Markdown
Member

@KDKHD KDKHD commented Nov 17, 2025

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

## Summary

Summarize your PR. If it involves visual changes include a screenshot or
gif.

Removes the `aiAssistant.defaultLlmSettingEnabled` feature flag and
associated cleanup.

### Changes

- **Removed feature flag**: Deleted
`AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED` and
`AI_ASSISTANT_DEFAULT_LLM_SETTING_ENABLED_VALUE` constants from both
`gen_ai_settings` and `security_solution` plugins
- **Simplified code**: Removed all feature flag checks - now always uses
the new default connector behavior
- **Centralized constants**: Moved `DEFAULT_VALUE_REPORT_*` settings to
`@kbn/management-settings-ids` package to avoid duplication
- **Fixed serverless**: Added value report settings to
`SECURITY_PROJECT_SETTINGS` whitelist and removed unnecessary async
wrapper in `security_solution_serverless` plugin
- Serverless settings properly whitelisted for value report features

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [X] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [X]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [X] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [X] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [X] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [X] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [X] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [X] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 2c75d4f)

# Conflicts:
#	src/platform/packages/shared/kbn-management/settings/setting_ids/index.ts
#	src/platform/packages/shared/serverless/settings/security_project/index.ts
#	x-pack/platform/plugins/private/gen_ai_settings/public/components/gen_ai_settings_app.test.tsx
#	x-pack/platform/plugins/private/gen_ai_settings/public/components/gen_ai_settings_app.tsx
#	x-pack/solutions/security/plugins/security_solution/public/common/hooks/use_default_ai_connector_id.test.ts
#	x-pack/solutions/security/plugins/security_solution/public/common/hooks/use_default_ai_connector_id.ts
#	x-pack/solutions/security/plugins/security_solution/public/flyout/ai_for_soc/components/connector_missing_callout.test.tsx
#	x-pack/solutions/security/plugins/security_solution/public/flyout/ai_for_soc/components/connector_missing_callout.tsx
#	x-pack/solutions/security/plugins/security_solution/public/reports/components/ai_value/executive_summary.tsx
#	x-pack/solutions/security/plugins/security_solution/public/reports/components/ai_value/index.test.tsx
#	x-pack/solutions/security/plugins/security_solution/public/reports/components/ai_value/index.tsx
#	x-pack/solutions/security/plugins/security_solution/server/ui_settings.ts
#	x-pack/solutions/security/plugins/security_solution/tsconfig.json
#	x-pack/solutions/security/plugins/security_solution_serverless/server/plugin.ts
#	x-pack/solutions/security/plugins/security_solution_serverless/tsconfig.json
@KDKHD KDKHD requested a review from kibanamachine as a code owner November 17, 2025 16:36
@KDKHD KDKHD added the backport This PR is a backport of another PR label Nov 17, 2025
@KDKHD KDKHD enabled auto-merge (squash) November 17, 2025 16:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This is a backport of PR #242543 to the 8.19 branch, which removes the aiAssistant.defaultLlmSettingEnabled feature flag and associated code cleanup.

Key Changes:

  • Removed feature flag implementation and conditional code that was no longer needed
  • Updated navigation path to point to the centralized Gen AI settings page
  • Cleaned up dependencies that are no longer required after the feature flag removal

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
x-pack/solutions/security/plugins/security_solution_serverless/tsconfig.json Removed unused @kbn/inference-common dependency from TypeScript configuration
x-pack/solutions/security/plugins/security_solution_serverless/server/plugin.ts Removed async wrapper code that dynamically registered default AI connector settings based on available connectors
x-pack/solutions/security/plugins/security_solution/server/ui_settings.ts Removed getDefaultAIConnectorSetting function and related imports that were part of the feature flag implementation
x-pack/solutions/security/plugins/security_solution/public/flyout/ai_for_soc/components/connector_missing_callout.tsx Updated navigation path from Kibana settings query to Gen AI settings management page
x-pack/solutions/security/plugins/security_solution/public/flyout/ai_for_soc/components/connector_missing_callout.test.tsx Updated test expectations to reflect new navigation path and added mock for common lib/kibana
src/platform/packages/shared/kbn-management/settings/setting_ids/index.ts Minor formatting change removing an unnecessary empty line

@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Dec 1, 2025

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #5 / DefaultAIConnector rendering does not render when feature flag is off
  • [job] [logs] Jest Tests #5 / DefaultAIConnector rendering does not render when feature flag is off

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
observabilityAiAssistantManagement 129.2KB 129.1KB -82.0B
securitySolution 9.5MB 9.5MB -106.0B
total -188.0B

History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants