Skip to content

[Search][Playground] Fix loading context limit for EIS model#225360

Merged
TattdCodeMonkey merged 3 commits intoelastic:mainfrom
TattdCodeMonkey:fix/eis-model-token-limit-not-set
Jun 30, 2025
Merged

[Search][Playground] Fix loading context limit for EIS model#225360
TattdCodeMonkey merged 3 commits intoelastic:mainfrom
TattdCodeMonkey:fix/eis-model-token-limit-not-set

Conversation

@TattdCodeMonkey
Copy link
Contributor

@TattdCodeMonkey TattdCodeMonkey commented Jun 25, 2025

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

After:
image

Checklist

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests 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
  • 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 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

Release note

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

@TattdCodeMonkey
Copy link
Contributor Author

@joemcelroy if you have time for a review you likely have the most context for my changes here.

@TattdCodeMonkey TattdCodeMonkey force-pushed the fix/eis-model-token-limit-not-set branch from 896af8d to 074679f Compare June 30, 2025 14:52
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

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 196.9KB 197.1KB +261.0B

History

@TattdCodeMonkey TattdCodeMonkey merged commit 34dfd62 into elastic:main Jun 30, 2025
10 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.18, 8.19, 9.0, 9.1

https://github.com/elastic/kibana/actions/runs/15978899845

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.18, 8.19, 9.0, 9.1

https://github.com/elastic/kibana/actions/runs/15978905835

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 30, 2025
…#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)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.18 Backport failed because of merge conflicts
8.19 Backport failed because of merge conflicts
9.0 Backport failed because of merge conflicts
9.1

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 225360

Questions ?

Please refer to the Backport tool documentation

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 30, 2025
…#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)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.18 Backport failed because of merge conflicts
8.19 Backport failed because of merge conflicts
9.0 Backport failed because of merge conflicts
9.1

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 225360

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jun 30, 2025
…225360) (#225889)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Search][Playground] Fix loading context limit for EIS model
(#225360)](#225360)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Rodney
Norris","email":"rodney.norris@elastic.co"},"sourceCommit":{"committedDate":"2025-06-30T16:53:03Z","message":"[Search][Playground]
Fix loading context limit for EIS model (#225360)\n\n##
Summary\n\nUpdates the playground to properly load the right context
token limit\nwhen using the EIS model as well as sending the model to
the chat\nendpoint.\n\nAdditionally updated the backend to load the
correct chat parameters for\nthe EIS model.\n\nFixes issue where too
large context error was received from connector\ninstead of being cause
by
playground.\n\nBefore:\n\n![image](https://github.com/user-attachments/assets/578f841c-3ef7-4ec7-a2b3-d3c03fd8387f)\n\nAfter:\n\n![image](https://github.com/user-attachments/assets/52a6fa9f-d1d6-42ab-acc1-83171bb2eb25)\n\n###
Checklist\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\n##
Release note\n\nFixes issue in Search Playground where context limit
errors were not\nhandled well when using the Elastic Managed
LLM.","sha":"34dfd6293390e6343e07c0933a04b807d4817fac","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Search","backport:version","v9.1.0","v8.19.0","v9.2.0","v8.18.4","v9.0.4"],"title":"[Search][Playground]
Fix loading context limit for EIS
model","number":225360,"url":"https://github.com/elastic/kibana/pull/225360","mergeCommit":{"message":"[Search][Playground]
Fix loading context limit for EIS model (#225360)\n\n##
Summary\n\nUpdates the playground to properly load the right context
token limit\nwhen using the EIS model as well as sending the model to
the chat\nendpoint.\n\nAdditionally updated the backend to load the
correct chat parameters for\nthe EIS model.\n\nFixes issue where too
large context error was received from connector\ninstead of being cause
by
playground.\n\nBefore:\n\n![image](https://github.com/user-attachments/assets/578f841c-3ef7-4ec7-a2b3-d3c03fd8387f)\n\nAfter:\n\n![image](https://github.com/user-attachments/assets/52a6fa9f-d1d6-42ab-acc1-83171bb2eb25)\n\n###
Checklist\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\n##
Release note\n\nFixes issue in Search Playground where context limit
errors were not\nhandled well when using the Elastic Managed
LLM.","sha":"34dfd6293390e6343e07c0933a04b807d4817fac"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19","8.18","9.0"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225360","number":225360,"mergeCommit":{"message":"[Search][Playground]
Fix loading context limit for EIS model (#225360)\n\n##
Summary\n\nUpdates the playground to properly load the right context
token limit\nwhen using the EIS model as well as sending the model to
the chat\nendpoint.\n\nAdditionally updated the backend to load the
correct chat parameters for\nthe EIS model.\n\nFixes issue where too
large context error was received from connector\ninstead of being cause
by
playground.\n\nBefore:\n\n![image](https://github.com/user-attachments/assets/578f841c-3ef7-4ec7-a2b3-d3c03fd8387f)\n\nAfter:\n\n![image](https://github.com/user-attachments/assets/52a6fa9f-d1d6-42ab-acc1-83171bb2eb25)\n\n###
Checklist\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\n##
Release note\n\nFixes issue in Search Playground where context limit
errors were not\nhandled well when using the Elastic Managed
LLM.","sha":"34dfd6293390e6343e07c0933a04b807d4817fac"}},{"branch":"8.18","label":"v8.18.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Rodney Norris <rodney.norris@elastic.co>
TattdCodeMonkey added a commit to TattdCodeMonkey/kibana that referenced this pull request Jun 30, 2025
…#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 added a commit to TattdCodeMonkey/kibana that referenced this pull request Jun 30, 2025
…#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/public/providers/unsaved_form_provider.tsx
TattdCodeMonkey added a commit that referenced this pull request Jun 30, 2025
…225360) (#225905)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Search][Playground] Fix loading context limit for EIS model
(#225360)](#225360)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Rodney
Norris","email":"rodney.norris@elastic.co"},"sourceCommit":{"committedDate":"2025-06-30T16:53:03Z","message":"[Search][Playground]
Fix loading context limit for EIS model (#225360)\n\n##
Summary\n\nUpdates the playground to properly load the right context
token limit\nwhen using the EIS model as well as sending the model to
the chat\nendpoint.\n\nAdditionally updated the backend to load the
correct chat parameters for\nthe EIS model.\n\nFixes issue where too
large context error was received from connector\ninstead of being cause
by
playground.\n\nBefore:\n\n![image](https://github.com/user-attachments/assets/578f841c-3ef7-4ec7-a2b3-d3c03fd8387f)\n\nAfter:\n\n![image](https://github.com/user-attachments/assets/52a6fa9f-d1d6-42ab-acc1-83171bb2eb25)\n\n###
Checklist\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\n##
Release note\n\nFixes issue in Search Playground where context limit
errors were not\nhandled well when using the Elastic Managed
LLM.","sha":"34dfd6293390e6343e07c0933a04b807d4817fac","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Search","backport:version","v9.1.0","v8.19.0","v9.2.0","v8.18.4","v9.0.4"],"title":"[Search][Playground]
Fix loading context limit for EIS
model","number":225360,"url":"https://github.com/elastic/kibana/pull/225360","mergeCommit":{"message":"[Search][Playground]
Fix loading context limit for EIS model (#225360)\n\n##
Summary\n\nUpdates the playground to properly load the right context
token limit\nwhen using the EIS model as well as sending the model to
the chat\nendpoint.\n\nAdditionally updated the backend to load the
correct chat parameters for\nthe EIS model.\n\nFixes issue where too
large context error was received from connector\ninstead of being cause
by
playground.\n\nBefore:\n\n![image](https://github.com/user-attachments/assets/578f841c-3ef7-4ec7-a2b3-d3c03fd8387f)\n\nAfter:\n\n![image](https://github.com/user-attachments/assets/52a6fa9f-d1d6-42ab-acc1-83171bb2eb25)\n\n###
Checklist\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\n##
Release note\n\nFixes issue in Search Playground where context limit
errors were not\nhandled well when using the Elastic Managed
LLM.","sha":"34dfd6293390e6343e07c0933a04b807d4817fac"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","8.18","9.0"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/225889","number":225889,"state":"OPEN"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225360","number":225360,"mergeCommit":{"message":"[Search][Playground]
Fix loading context limit for EIS model (#225360)\n\n##
Summary\n\nUpdates the playground to properly load the right context
token limit\nwhen using the EIS model as well as sending the model to
the chat\nendpoint.\n\nAdditionally updated the backend to load the
correct chat parameters for\nthe EIS model.\n\nFixes issue where too
large context error was received from connector\ninstead of being cause
by
playground.\n\nBefore:\n\n![image](https://github.com/user-attachments/assets/578f841c-3ef7-4ec7-a2b3-d3c03fd8387f)\n\nAfter:\n\n![image](https://github.com/user-attachments/assets/52a6fa9f-d1d6-42ab-acc1-83171bb2eb25)\n\n###
Checklist\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\n##
Release note\n\nFixes issue in Search Playground where context limit
errors were not\nhandled well when using the Elastic Managed
LLM.","sha":"34dfd6293390e6343e07c0933a04b807d4817fac"}},{"branch":"8.18","label":"v8.18.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
TattdCodeMonkey added a commit that referenced this pull request Jun 30, 2025
…225360) (#225910)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Search][Playground] Fix loading context limit for EIS model
(#225360)](#225360)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Rodney
Norris","email":"rodney.norris@elastic.co"},"sourceCommit":{"committedDate":"2025-06-30T16:53:03Z","message":"[Search][Playground]
Fix loading context limit for EIS model (#225360)\n\n##
Summary\n\nUpdates the playground to properly load the right context
token limit\nwhen using the EIS model as well as sending the model to
the chat\nendpoint.\n\nAdditionally updated the backend to load the
correct chat parameters for\nthe EIS model.\n\nFixes issue where too
large context error was received from connector\ninstead of being cause
by
playground.\n\nBefore:\n\n![image](https://github.com/user-attachments/assets/578f841c-3ef7-4ec7-a2b3-d3c03fd8387f)\n\nAfter:\n\n![image](https://github.com/user-attachments/assets/52a6fa9f-d1d6-42ab-acc1-83171bb2eb25)\n\n###
Checklist\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\n##
Release note\n\nFixes issue in Search Playground where context limit
errors were not\nhandled well when using the Elastic Managed
LLM.","sha":"34dfd6293390e6343e07c0933a04b807d4817fac","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Search","backport:version","v9.1.0","v8.19.0","v9.2.0","v8.18.4","v9.0.4"],"title":"[Search][Playground]
Fix loading context limit for EIS
model","number":225360,"url":"https://github.com/elastic/kibana/pull/225360","mergeCommit":{"message":"[Search][Playground]
Fix loading context limit for EIS model (#225360)\n\n##
Summary\n\nUpdates the playground to properly load the right context
token limit\nwhen using the EIS model as well as sending the model to
the chat\nendpoint.\n\nAdditionally updated the backend to load the
correct chat parameters for\nthe EIS model.\n\nFixes issue where too
large context error was received from connector\ninstead of being cause
by
playground.\n\nBefore:\n\n![image](https://github.com/user-attachments/assets/578f841c-3ef7-4ec7-a2b3-d3c03fd8387f)\n\nAfter:\n\n![image](https://github.com/user-attachments/assets/52a6fa9f-d1d6-42ab-acc1-83171bb2eb25)\n\n###
Checklist\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\n##
Release note\n\nFixes issue in Search Playground where context limit
errors were not\nhandled well when using the Elastic Managed
LLM.","sha":"34dfd6293390e6343e07c0933a04b807d4817fac"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","8.18","9.0"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/225889","number":225889,"state":"OPEN"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225360","number":225360,"mergeCommit":{"message":"[Search][Playground]
Fix loading context limit for EIS model (#225360)\n\n##
Summary\n\nUpdates the playground to properly load the right context
token limit\nwhen using the EIS model as well as sending the model to
the chat\nendpoint.\n\nAdditionally updated the backend to load the
correct chat parameters for\nthe EIS model.\n\nFixes issue where too
large context error was received from connector\ninstead of being cause
by
playground.\n\nBefore:\n\n![image](https://github.com/user-attachments/assets/578f841c-3ef7-4ec7-a2b3-d3c03fd8387f)\n\nAfter:\n\n![image](https://github.com/user-attachments/assets/52a6fa9f-d1d6-42ab-acc1-83171bb2eb25)\n\n###
Checklist\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\n##
Release note\n\nFixes issue in Search Playground where context limit
errors were not\nhandled well when using the Elastic Managed
LLM.","sha":"34dfd6293390e6343e07c0933a04b807d4817fac"}},{"branch":"8.18","label":"v8.18.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants