[Serverless] Preconfigured Connectors: adds new connectors and updates existing one#242791
Conversation
5cf73af to
37451e2
Compare
|
Pinging @elastic/ml-ui (:ml) |
|
/ci |
Samiul-TheSoccerFan
left a comment
There was a problem hiding this comment.
Left few questions in the PR. Are the inference endpoints are also preconfigured or only the connectors?
x-pack/platform/packages/shared/kbn-elastic-assistant/impl/assistant/helpers.ts
Show resolved
Hide resolved
| }; | ||
| export const INTERNAL_INFERENCE_CONNECTORS = ['Elastic-Managed-LLM']; | ||
| export const INTERNAL_INFERENCE_CONNECTORS = [ | ||
| 'Elastic-Managed-LLM', |
There was a problem hiding this comment.
Same question if we need Elastic-Managed-LLM in here and in the following file.
There was a problem hiding this comment.
Ya, it looks like this PR removes Elastic-Managed-LLM and adds General-Purpose-LLM-v{1,2,3}.
Anyone who has a saved object that references Elastic-Managed-LLM won't have access to it after this change. Will be returned as "not found". I'm not sure what, if anything, might have a reference. I don't think these can be used directly as actions from alerting rules. If they can, then I think this will be a problem.
Or perhaps these connector id's are never referenced directly, just used internally?
There was a problem hiding this comment.
@pmuellr - thanks for taking a look! 🙏
This updates the name of the preconfigured connector -Elastic-Managed-LLM to General-Purpose-LLM-v1 - the underlying inference endpoint and model are unchanged. I also updated the places in kibana that reference the connector id directly to look for both the old and new name. We've updated the naming/connector ids for preconfigured connectors in the past and it should not present a problem. The connector ids are internal - it's the underlying inference endpoint ids that are used.
The additional preconfigured connectors added (v2, v3) will only be returned by the actions client getAll once the backing inference endpoint exists, so no issue there either.
There was a problem hiding this comment.
Sounds good. I'd go ahead and try testing an upgrade, if you haven't already, by running
yarn es serverless --license trial --projectType $PROJECT_TYPE
and then run Kibana from main to do something to get a reference to Elastic-Managed-LLM, then kill Kibana, then run the same from your PR to see if everything survived "migration".
yarn start --no-base-path --serverless $PROJECT_TYPE
MichelLosier
left a comment
There was a problem hiding this comment.
Looks good from Fleet!
|
@elasticmachine merge upstream |
tomsonpl
left a comment
There was a problem hiding this comment.
Defend Workflows code changes LGTM 👍
pmuellr
left a comment
There was a problem hiding this comment.
ResponseOps changes LGTM. I noted some concerns here: #242791 (comment)
Sounds like the connector id's are never persisted anywhere (like other saved objects), so when the existing connector Elastic-Managed-LLM disappears when this PR is merged, nothing will break.
config/serverless.es.yml
Outdated
| inferenceId: ".gp-llm-v2-chat_completion" | ||
| providerConfig: | ||
| model_id: "gp-llm-v2" | ||
| General-Purpose-LLM-v1: |
There was a problem hiding this comment.
We want Rainbow Sprinkles to be the "first" in this list, so that it's what's used by default for various AI tools. But I have no issue with adding more models.
There was a problem hiding this comment.
Thank you for taking a look, @seanstory! 🙏
So in this PR I updated the places where the old name was being specifically checked for things like order/defaults to make sure both names are recognized (in case of timing issues with the cloud changes).
I will go through and ensure the default is unchanged for assistants/playground. Other entry points I may have missed will need to be addressed specifically.
I will also have a follow up to update all the copy that references the old name but was trying to keep this PR smaller and isolate the required changes more for better tracking.
The plan is to update default to v2 once this change is in and all teams are happy with changes. Aiming for before FF 9.3.
There was a problem hiding this comment.
To be clear, I don't care about the name. What I care about is the order of this list for xpack.actions.preconfigured.
A number of AI features in Kibana predate any settings/configurations for when you might have multiple LLM connectors. Instead, they do something naive, like llmConnection = listConnectors().filter(c -> c.type == 'llm')[0], so it's important that we keep the expected default LLM as the "first" in the list.
It's possible that I'm out of touch, and that the new v3/v2 LLMs are already what we want the "default" to be. If that's the case, I retract this comment thread.
There was a problem hiding this comment.
Good point! To be safe - updated the order so it's v1, v2, v3 in 0146ed4
I'm dismissing my review so that I'm not blocking you. As long as someone from Inference is happy with this and how it changes the "default LLM connector" for AI assistants and Agent Builder, I'm sure it's fine. :)
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
|
/ci |
1 similar comment
|
/ci |
|
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
|
## Summary Related issue #243094 Follow up to this PR #242791 - naming request updated. This PR is part of the work to support multiple managed LLMs. This PR moves away from generic naming and updates names for preconfigured connectors. Because these configurations are in yaml files, the connector id cannot use a period without escaping it. There seems to be way to escape special chars by using something like `preconfigured.["sonnet-3.7"].actionTypeId` but it hasn't been used so far in kibana and would need to be tested. Given the time sensitive nature of this change, I updated the id and replaced the period with a dash in the PRs. E.g. `Anthropic-Claude-Sonnet-3.7` becomes `Anthropic-Claude-Sonnet-3-7` From what I can see in kibana, there is no logic depending on the id to match the name exactly so this solution should be fine. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] 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) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] 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) - [ ] 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. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] 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) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…existing one (elastic#242791) ## Summary Related issue elastic#243094 This PR is part of the work to support multiple managed LLMs. This PR: - Adds the "General Purpose LLM v2" which uses `.gp-llm-v2-chat_completion` as the inference id and "General Purpose LLM v3" which uses `.gp-llm-v3-chat_completion` as the inference id. - It should be okay to add before the inference endpoint is available as it will be filtered out of the connectors returned to Kibana if the endpoint does not exist. See relevant [code.](elastic#217641) - Once the endpoint is available, the preconfigured connector will show up in the connectors list. - Renames "Elastic Managed LLM" to "General Purpose LLM v1" - This change also required some updates in places that rely on the old name when checking if a connector is internal/preconfigured. - In those cases, both the new connector names have been added <img width="1679" height="393" alt="image" src="https://github.com/user-attachments/assets/fc7b1921-1c21-4eb9-8d6d-711ba4db783c" /> ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] 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) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] 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) - [ ] 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. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] 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) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
Serverless and on prem kibana pull from these yaml files for the preconfigured connector configurations. ESS changes are made in the cloud repo. A PR has also been raised for that.
Related issue #243094
This PR is part of the work to support multiple managed LLMs.
This PR:
.gp-llm-v2-chat_completionas the inference id and "General Purpose LLM v3" which uses.gp-llm-v3-chat_completionas the inference id.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.