-
Notifications
You must be signed in to change notification settings - Fork 634
Description
Checkboxes for prior research
- I've gone through Developer Guide and API reference
- I've checked AWS Forums and StackOverflow.
- I've searched for previous similar issues and didn't find any solution.
Describe the bug
New Relic Node Agent team here. This commit from April 28 mentions adding http2 support to client-bedrock-runtime, but instead replaces the NodeHttpHandler
with the NodeHttp2Handler
.
Has the client-bedrock-runtime library deprecated the NodeHttpHandler
, intending to standardize on http2 for future releases? Or is the removal of http support accidental?
Regression Issue
- Select this option if this issue appears to be a regression.
SDK version number
3.798.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v22.0.0
Reproduction Steps
New Relic's versioned tests of different libraries run at regular intervals. The versioned test for client-bedrock-runtime
is here, and began failing with the release of aws-sdk v3.798.0, as http response headers are undefined.
We can see in this commit that NodeHttpHandler was replaced with NodeHttp2Handler. That change causes the error.
Observed Behavior
The root issue is the switch from NodeHttpHandler to NodeHttp2Handler, so our agent's attempt to parse the response headers results in repeated errors like this: error: "Cannot read properties of undefined (reading 'headers')"
Expected Behavior
Expected behavior: client-bedrock-runtime supports http 1.1 chat completion responses, and not only http2.
Possible Solution
client-bedrock-runtime could support both http 1.1 and http2, instead of switching to http2 to the exclusion of http 1.1.
Additional Information/Context
No response