Skip to content

SDK errors with latest Bedrock clients import_client.setCredentialFeature and util_endpoints_2.EndpointCache is not a constructor #6716

@abhirpat

Description

@abhirpat

Checkboxes for prior research

Describe the bug

The npm package documentation shows RetrieveAndGenerateStream is available but it throws Error: TypeError: RetrieveAndGenerateStreamCommand is not a constructor with latest version.

Screenshot 2024-12-06 at 12 50 31 PM

Regression Issue

  • Select this option if this issue appears to be a regression.

SDK version number

@aws-sdk/client-bedrock-agent-runtime": "3.706.0"

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

v20.18.1

Reproduction Steps

To reproduce, try importing RetrieveAndGenerateStreamCommand and it's not available
Screenshot 2024-12-06 at 12 46 51 PM

Observed Behavior

Throws error

Error: TypeError: RetrieveAndGenerateStreamCommand is not a constructor
    at rag (/Users/Documents/Scripts/Node/bedrock-kb-dual.js:43:19)
    at Object.<anonymous> (/Users/Documents/Scripts/Node/bedrock-kb-dual.js:50:1)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:173:12)
    at node:internal/main/run_main_module:28:49

Expected Behavior

The command should be made available since it is documented in the package.

Possible Solution

No response

Additional Information/Context

No response

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.p2This is a standard priority issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions