Skip to content

[9.0] [Search][Playground] Fix loading context limit for EIS model (#225360)#225905

Merged
TattdCodeMonkey merged 1 commit intoelastic:9.0from
TattdCodeMonkey:backport/9.0/pr-225360
Jun 30, 2025
Merged

[9.0] [Search][Playground] Fix loading context limit for EIS model (#225360)#225905
TattdCodeMonkey merged 1 commit intoelastic:9.0from
TattdCodeMonkey:backport/9.0/pr-225360

Conversation

@TattdCodeMonkey
Copy link
Contributor

Backport

This will backport the following commits from main to 9.0:

Questions ?

Please refer to the Backport tool documentation

…#225360)

## Summary

Updates the playground to properly load the right context token limit
when using the EIS model as well as sending the model to the chat
endpoint.

Additionally updated the backend to load the correct chat parameters for
the EIS model.

Fixes issue where too large context error was received from connector
instead of being cause by playground.

Before:

![image](https://github.com/user-attachments/assets/578f841c-3ef7-4ec7-a2b3-d3c03fd8387f)

After:

![image](https://github.com/user-attachments/assets/52a6fa9f-d1d6-42ab-acc1-83171bb2eb25)

### Checklist

- [ ] 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
- [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
- [ ] 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
- [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)

## Release note

Fixes issue in Search Playground where context limit errors were not
handled well when using the Elastic Managed LLM.

(cherry picked from commit 34dfd62)

# Conflicts:
#	x-pack/platform/plugins/private/translations/translations/fr-FR.json
#	x-pack/platform/plugins/private/translations/translations/ja-JP.json
#	x-pack/platform/plugins/private/translations/translations/zh-CN.json
#	x-pack/solutions/search/plugins/search_playground/public/hooks/use_llms_models.ts
#	x-pack/solutions/search/plugins/search_playground/server/lib/get_chat_params.test.ts
#	x-pack/solutions/search/plugins/search_playground/server/lib/get_chat_params.ts
#	x-pack/solutions/search/plugins/search_playground/server/routes.ts
@TattdCodeMonkey TattdCodeMonkey added the backport This PR is a backport of another PR label Jun 30, 2025
@TattdCodeMonkey TattdCodeMonkey enabled auto-merge (squash) June 30, 2025 18:41
@TattdCodeMonkey TattdCodeMonkey merged commit 32a5131 into elastic:9.0 Jun 30, 2025
12 checks passed
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #19 / UserToolTip renders the tooltip when hovering

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
searchPlayground 184.7KB 184.9KB +259.0B

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.

3 participants