You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[9.0] [Obs AI Assistant]fixing error - Display results and Visualize query Bedrock Error (#218213) (#218716)
# Backport
This will backport the following commits from `main` to `9.0`:
- [[Obs AI Assistant]fixing error - Display results and Visualize query
Bedrock Error (#218213)](#218213)
<!--- Backport version: 9.6.6 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT [{"author":{"name":"Arturo
Lidueña","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-04-21T08:51:18Z","message":"[Obs
AI Assistant]fixing error - Display results and Visualize query Bedrock
Error (#218213)\n\n### Fix: Bedrock Streaming Error on ES|QL
Actions\n\n#### Summary\n\nWhen an ES|QL is generated, we present two
action buttons:\n- Visualize Query\n- Display Results\n\nThese actions
were not working as expected when using Bedrock as the\nmodel
provider.\n\n#### Error Details\n```txt\nEncountered error in Bedrock
stream of type validationException messages.8: Did not find 1
`tool_result` block(s) at the beginning of this message. Messages
following `tool_use` blocks must begin with a matching number of
`tool_result` blocks.\n```\n#### Root Cause\n\nWe were sending a
tool_use block in the assistant message without\nimmediately following
it with the corresponding tool_result block. This\nviolates Bedrock’s
message
protocol.","sha":"33993b7123bc0d6c85d9c42b15610cc0d5092281","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport:prev-minor","Team:Obs
AI Assistant","ci:project-deploy-observability","v9.1.0"],"title":"[Obs
AI Assistant]fixing error - Display results and Visualize query Bedrock
Error","number":218213,"url":"https://github.com/elastic/kibana/pull/218213","mergeCommit":{"message":"[Obs
AI Assistant]fixing error - Display results and Visualize query Bedrock
Error (#218213)\n\n### Fix: Bedrock Streaming Error on ES|QL
Actions\n\n#### Summary\n\nWhen an ES|QL is generated, we present two
action buttons:\n- Visualize Query\n- Display Results\n\nThese actions
were not working as expected when using Bedrock as the\nmodel
provider.\n\n#### Error Details\n```txt\nEncountered error in Bedrock
stream of type validationException messages.8: Did not find 1
`tool_result` block(s) at the beginning of this message. Messages
following `tool_use` blocks must begin with a matching number of
`tool_result` blocks.\n```\n#### Root Cause\n\nWe were sending a
tool_use block in the assistant message without\nimmediately following
it with the corresponding tool_result block. This\nviolates Bedrock’s
message
protocol.","sha":"33993b7123bc0d6c85d9c42b15610cc0d5092281"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/218213","number":218213,"mergeCommit":{"message":"[Obs
AI Assistant]fixing error - Display results and Visualize query Bedrock
Error (#218213)\n\n### Fix: Bedrock Streaming Error on ES|QL
Actions\n\n#### Summary\n\nWhen an ES|QL is generated, we present two
action buttons:\n- Visualize Query\n- Display Results\n\nThese actions
were not working as expected when using Bedrock as the\nmodel
provider.\n\n#### Error Details\n```txt\nEncountered error in Bedrock
stream of type validationException messages.8: Did not find 1
`tool_result` block(s) at the beginning of this message. Messages
following `tool_use` blocks must begin with a matching number of
`tool_result` blocks.\n```\n#### Root Cause\n\nWe were sending a
tool_use block in the assistant message without\nimmediately following
it with the corresponding tool_result block. This\nviolates Bedrock’s
message protocol.","sha":"33993b7123bc0d6c85d9c42b15610cc0d5092281"}}]}]
BACKPORT-->
Copy file name to clipboardExpand all lines: x-pack/platform/plugins/shared/observability_ai_assistant/public/components/message_panel/message_text.tsx
0 commit comments