Skip to content

[9.0] Feature/default llm setting ai settings (#233874)#236463

Merged
KDKHD merged 5 commits intoelastic:9.0from
KDKHD:backport/9.0/pr-233874
Sep 26, 2025
Merged

[9.0] Feature/default llm setting ai settings (#233874)#236463
KDKHD merged 5 commits intoelastic:9.0from
KDKHD:backport/9.0/pr-233874

Conversation

@KDKHD
Copy link
Member

@KDKHD KDKHD commented Sep 25, 2025

Backport

This will backport the following commits from 9.1 to 9.0:

Questions ?

Please refer to the Backport tool documentation

## Summary

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

Follow-up to this change: elastic#231940

The PR linked above could not be backported to 8.18, 9.19, 9.1 because
the GenAi settings page where the setting was added to does not exist in
the versions just listed. As this setting is needed on these version,
this PR is required. This PR adds the Default LLM setting to the
Security, Obs & ES AI settings pages.

<img width="1855" height="1171" alt="image"
src="https://github.com/user-attachments/assets/ab09be60-97b6-40d4-bcfc-5e9859360502"
/>

<img width="1855" height="1171" alt="image"
src="https://github.com/user-attachments/assets/b8c1ae43-e1ee-4f42-bbcb-d7f67be6a598"
/>

<img width="1855" height="1171" alt="image"
src="https://github.com/user-attachments/assets/5647de7f-d1de-4e46-9940-f165b1ef8b7b"
/>

<img width="1855" height="1171" alt="image"
src="https://github.com/user-attachments/assets/791c953e-a321-419c-a121-66974a6f8b34"
/>

### How to test:
- Enable the feature flag. Add
`feature_flags.overrides.aiAssistant.defaultLlmSettingEnabled: true` to
kibana.dev.yml
- Start Kibana and go to
http://localhost:5601/app/management/kibana/securityAiAssistantManagement?tab=connectors
or
http://localhost:5601/app/management/kibana/observabilityAiAssistantManagement
- You should see the `genAiSettings:defaultAIConnector` setting.
Changing the setting won't do anything just yet as changes within the
assistants still need to be configured.

TODO:
When the feature flag is lifted, we should remove the following Kibana
advanced setting as this one will rpelace it:
<img width="2412" height="198" alt="image"
src="https://github.com/user-attachments/assets/f3d1c421-f7c5-42b9-b5dc-85c29b8ef3eb"
/>

### 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 6141299)

# Conflicts:
#	src/platform/packages/shared/kbn-management/settings/setting_ids/index.ts
#	src/platform/plugins/private/kibana_usage_collection/server/collectors/management/schema.ts
#	src/platform/plugins/private/kibana_usage_collection/server/collectors/management/types.ts
#	src/platform/plugins/shared/ai_assistant_management/selection/server/plugin.test.ts
#	src/platform/plugins/shared/ai_assistant_management/selection/server/plugin.ts
#	src/platform/plugins/shared/ai_assistant_management/selection/tsconfig.json
#	src/platform/plugins/shared/telemetry/schema/oss_platform.json
#	x-pack/platform/packages/shared/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_management.tsx
#	x-pack/platform/packages/shared/kbn-elastic-assistant/impl/assistant/settings/search_ai_lake_configurations_settings_management.test.tsx
#	x-pack/platform/packages/shared/kbn-elastic-assistant/impl/assistant/settings/search_ai_lake_configurations_settings_management.tsx
#	x-pack/platform/packages/shared/kbn-elastic-assistant/impl/connectorland/ai_for_soc_connector_settings_management/index.tsx
#	x-pack/platform/packages/shared/kbn-elastic-assistant/tsconfig.json
#	x-pack/platform/plugins/private/observability_ai_assistant_management/public/routes/components/settings_tab/settings_tab.test.tsx
#	x-pack/platform/plugins/private/observability_ai_assistant_management/public/routes/components/settings_tab/ui_settings.tsx
#	x-pack/platform/plugins/private/observability_ai_assistant_management/tsconfig.json
#	x-pack/solutions/security/plugins/security_solution/public/assistant/stack_management/management_settings.tsx
#	x-pack/solutions/security/plugins/security_solution/public/configurations/tabs/ai_settings.test.tsx
#	x-pack/solutions/security/plugins/security_solution/public/configurations/tabs/ai_settings.tsx
@KDKHD KDKHD added the backport This PR is a backport of another PR label Sep 25, 2025
@KDKHD KDKHD enabled auto-merge (squash) September 25, 2025 14:05
@elasticmachine
Copy link
Contributor

elasticmachine commented Sep 25, 2025

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #16 / SettingsTab should render a “Go to spaces” button with the correct href
  • [job] [logs] Jest Tests #16 / SettingsTab should render a “Go to spaces” button with the correct href
  • [job] [logs] Jest Tests #16 / SettingsTab should render a “Manage connectors” button with the correct href
  • [job] [logs] Jest Tests #16 / SettingsTab should render a “Manage connectors” button with the correct href

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
observabilityAiAssistantManagement 384 389 +5
securitySolution 6909 6940 +31
total +36

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/ai-assistant-default-llm-setting - 10 +10
@kbn/management-settings-ids 135 137 +2
total +12

Async chunks

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

id before after diff
observabilityAiAssistantManagement 127.6KB 134.4KB +6.8KB
securitySolution 8.9MB 8.9MB +15.9KB
total +22.7KB
Unknown metric groups

API count

id before after diff
@kbn/ai-assistant-default-llm-setting - 10 +10
@kbn/management-settings-ids 136 138 +2
total +12

ESLint disabled line counts

id before after diff
@kbn/ai-assistant-default-llm-setting - 4 +4

Total ESLint disabled count

id before after diff
@kbn/ai-assistant-default-llm-setting - 4 +4

History

@KDKHD KDKHD merged commit 7ccfda3 into elastic:9.0 Sep 26, 2025
9 checks passed
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.

4 participants