[Inference UI] Changing default model will not require a hard page refresh#262679
Conversation
ApprovabilityVerdict: Needs human review This PR introduces runtime behavior changes to how default model settings propagate across multiple plugins (reactive observables instead of static reads). The author does not own any of the 11 modified files, which span 5 different team ownerships. The designated code owners should review these changes to their respective components. You can customize Macroscope's approvability policy. Learn more. |
chrisbmar
left a comment
There was a problem hiding this comment.
agent builder changes LGTM
PhilippeOberti
left a comment
There was a problem hiding this comment.
Code review only, LGTM for the @elastic/security-threat-hunting-investigations team
|
@elasticmachine merge upstream |
💔 Build Failed
Failed CI StepsMetrics [docs]
History
|
…ar056/kibana into fix/default-model-stale-state
|
Heads-up: I restructured this PR after your approvals, so I'm re-requesting review. Why I changed itAfter #263843 ("Move model resolution entirely to backend") merged to main, pulling main into this branch quietly broke My original approach no longer fit the architecture. #263843 explicitly moved default-connector resolution to the server so the client wouldn't need to read these settings. Adding a subscription in the shared hook put that logic back in two places, which is exactly what #263843 was cleaning up. |
|
Thank you, @chrisbmar and @PhilippeOberti for reviewing the new changes. |
|
Starting backport for target branches: 9.4 https://github.com/elastic/kibana/actions/runs/24722995606 |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…age refresh (#262679) (#264697) # Backport This will backport the following commits from `main` to `9.4`: - [[Inference UI] Changing default model will not require a hard page refresh (#262679)](#262679) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Saikat Sarkar","email":"132922331+saikatsarkar056@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-04-21T12:43:24Z","message":"[Inference UI] Changing default model will not require a hard page refresh (#262679)\n\nPreviously, changing the default AI connector in settings required a\nhard page refresh for the change to take effect across the UI. This PR\nmakes the connector list and default connector selection reactive by\nsubscribing to UI settings change streams, so updates propagate\ninstantly.\n\n## Summary\n\nSummarize your PR. If it involves visual changes include a screenshot or\ngif.\n\n### Stateful\n\nhttps://github.com/user-attachments/assets/c52449db-6248-4627-9872-5fa6e3dcbbf5\n\n### Serverless\n\n\nhttps://github.com/user-attachments/assets/13a3353e-2706-484f-b868-3a305c1e2362\n\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] 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- [ ]\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- [ ] 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- [ ] 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- [ ] [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## Release note\nFixes an issue where changing the default AI connector in settings did\nnot take effect until the page was refreshed. The connector list and\ndefault selection now update automatically when settings are changed.\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"79536dd06970e4f8027ed95f41d834bef9077be4","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Search","backport:version","v9.4.0","v9.5.0"],"title":"[Inference UI] Changing default model will not require a hard page refresh","number":262679,"url":"https://github.com/elastic/kibana/pull/262679","mergeCommit":{"message":"[Inference UI] Changing default model will not require a hard page refresh (#262679)\n\nPreviously, changing the default AI connector in settings required a\nhard page refresh for the change to take effect across the UI. This PR\nmakes the connector list and default connector selection reactive by\nsubscribing to UI settings change streams, so updates propagate\ninstantly.\n\n## Summary\n\nSummarize your PR. If it involves visual changes include a screenshot or\ngif.\n\n### Stateful\n\nhttps://github.com/user-attachments/assets/c52449db-6248-4627-9872-5fa6e3dcbbf5\n\n### Serverless\n\n\nhttps://github.com/user-attachments/assets/13a3353e-2706-484f-b868-3a305c1e2362\n\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] 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- [ ]\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- [ ] 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- [ ] 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- [ ] [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## Release note\nFixes an issue where changing the default AI connector in settings did\nnot take effect until the page was refreshed. The connector list and\ndefault selection now update automatically when settings are changed.\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"79536dd06970e4f8027ed95f41d834bef9077be4"}},"sourceBranch":"main","suggestedTargetBranches":["9.4"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/262679","number":262679,"mergeCommit":{"message":"[Inference UI] Changing default model will not require a hard page refresh (#262679)\n\nPreviously, changing the default AI connector in settings required a\nhard page refresh for the change to take effect across the UI. This PR\nmakes the connector list and default connector selection reactive by\nsubscribing to UI settings change streams, so updates propagate\ninstantly.\n\n## Summary\n\nSummarize your PR. If it involves visual changes include a screenshot or\ngif.\n\n### Stateful\n\nhttps://github.com/user-attachments/assets/c52449db-6248-4627-9872-5fa6e3dcbbf5\n\n### Serverless\n\n\nhttps://github.com/user-attachments/assets/13a3353e-2706-484f-b868-3a305c1e2362\n\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] 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- [ ]\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- [ ] 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- [ ] 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- [ ] [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## Release note\nFixes an issue where changing the default AI connector in settings did\nnot take effect until the page was refreshed. The connector list and\ndefault selection now update automatically when settings are changed.\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"79536dd06970e4f8027ed95f41d834bef9077be4"}}]}] BACKPORT--> Co-authored-by: Saikat Sarkar <132922331+saikatsarkar056@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Previously, changing the default AI connector in settings required a hard page refresh for the change to take effect across the UI. This PR makes the connector list and default connector selection reactive by subscribing to UI settings change streams, so updates propagate instantly.
Summary
Summarize your PR. If it involves visual changes include a screenshot or gif.
Stateful
Screen.Recording.2026-04-20.at.6.38.23.PM.mov
Serverless
Screen.Recording.2026-04-20.at.10.50.05.PM.mov
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesbackport:*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.
Release note
Fixes an issue where changing the default AI connector in settings did not take effect until the page was refreshed. The connector list and default selection now update automatically when settings are changed.