Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] RAG: Handle BWC for bedrock converse API #3126

Open
pyek-bot opened this issue Oct 17, 2024 · 0 comments
Open

[BUG] RAG: Handle BWC for bedrock converse API #3126

pyek-bot opened this issue Oct 17, 2024 · 0 comments
Labels
bug Something isn't working untriaged

Comments

@pyek-bot
Copy link
Contributor

What is the bug?
Support for bedrock converse API was added in 2.18. Along with it, a new field called llmMessages was added to GenerativeQaParameters.java If you upgrade the cluster from 2.17 to 2.18, the byte streams are incompatible for the request and response. This needs to be handled gracefully.

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Create a cluster with one master and one data node
  2. Create a rag pipeline
  3. Send request to the rag pipeline

What is the expected behavior?
Request should be successfully processed and response returned.

Do you have any screenshots?

{
  "error": {
    "root_cause": [
      {
        "type": "illegal_state_exception",
        "reason": "unexpected byte [0x04]"
      }
    ],
    "type": "search_phase_execution_exception",
    "reason": "all shards failed",
    "phase": "query",
    "grouped": true,
    "failed_shards": [
      {
        "shard": 0,
        "index": "my_rag_test_data_1",
        "node": "_IF1uLW5THyB_ZlfxcFRqQ",
        "reason": {
          "type": "illegal_state_exception",
          "reason": "unexpected byte [0x04]"
        }
      }
    ],
    "caused_by": {
      "type": "illegal_state_exception",
      "reason": "unexpected byte [0x04]",
      "caused_by": {
        "type": "illegal_state_exception",
        "reason": "unexpected byte [0x04]"
      }
    }
  },
  "status": 500
}

Example stack trace:

2024-10-09 14:34:47 Caused by: org.opensearch.OpenSearchException$3: unexpected byte [0x02]
2024-10-09 14:34:47     at org.opensearch.OpenSearchException.guessRootCauses(OpenSearchException.java:710) ~[opensearch-core-2.18.0.jar:2.18.0]
2024-10-09 14:34:47     at org.opensearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:393) [opensearch-2.18.0.jar:2.18.0]
2024-10-09 14:34:47     ... 51 more
2024-10-09 14:34:47 Caused by: java.lang.IllegalStateException: unexpected byte [0x02]
2024-10-09 14:34:47     at org.opensearch.core.common.io.stream.StreamInput.readBoolean(StreamInput.java:596) ~[opensearch-core-2.18.0.jar:2.18.0]
2024-10-09 14:34:47     at org.opensearch.core.common.io.stream.StreamInput.readBoolean(StreamInput.java:586) ~[opensearch-core-2.18.0.jar:2.18.0]
2024-10-09 14:34:47     at org.opensearch.search.builder.SearchSourceBuilder.<init>(SearchSourceBuilder.java:302) ~[opensearch-2.18.0.jar:2.18.0]
2024-10-09 14:34:47     at org.opensearch.core.common.io.stream.StreamInput.readOptionalWriteable(StreamInput.java:1013) ~[opensearch-core-2.18.0.jar:2.18.0]
2024-10-09 14:34:47     at org.opensearch.search.internal.ShardSearchRequest.<init>(ShardSearchRequest.java:245) ~[opensearch-2.18.0.jar:2.18.0]
...

Context:
#2851

@pyek-bot pyek-bot added bug Something isn't working untriaged labels Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged
Projects
None yet
Development

No branches or pull requests

1 participant