AWSBedrockBackendAdapter
Defined in: backend/src/providers/aws-bedrock.ts:124
Backend adapter for AWS Bedrock Converse API.
Features:
- Unified API for multiple foundation models
- AWS SigV4 authentication
- Vision support (select models)
- No function calling in Converse API
- Enterprise features (VPC, encryption, compliance)
- Pay-per-use pricing
Note: This adapter requires AWS credentials. Authentication can be provided via:
- Config (awsAccessKeyId, awsSecretAccessKey, awsSessionToken)
- Environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
- IAM roles (when running on AWS infrastructure)
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AWSBedrockBackendAdapter(
config):AWSBedrockBackendAdapter
Defined in: backend/src/providers/aws-bedrock.ts:130
Parameters
Section titled “Parameters”config
Section titled “config”Returns
Section titled “Returns”AWSBedrockBackendAdapter
Properties
Section titled “Properties”metadata
Section titled “metadata”
readonlymetadata:AdapterMetadata
Defined in: backend/src/providers/aws-bedrock.ts:125
Adapter metadata for identification and capabilities.
Implementation of
Section titled “Implementation of”Methods
Section titled “Methods”estimateCost()
Section titled “estimateCost()”estimateCost(
request):Promise<number|null>
Defined in: backend/src/providers/aws-bedrock.ts:512
Estimate cost. AWS Bedrock pricing varies by model and region.
Parameters
Section titled “Parameters”request
Section titled “request”Returns
Section titled “Returns”Promise<number | null>
Implementation of
Section titled “Implementation of”execute()
Section titled “execute()”execute(
request,signal?):Promise<IRChatResponse>
Defined in: backend/src/providers/aws-bedrock.ts:274
Execute non-streaming request.
Parameters
Section titled “Parameters”request
Section titled “request”signal?
Section titled “signal?”AbortSignal
Returns
Section titled “Returns”Promise<IRChatResponse>
Implementation of
Section titled “Implementation of”executeStream()
Section titled “executeStream()”executeStream(
request,signal?):IRChatStream
Defined in: backend/src/providers/aws-bedrock.ts:320
Execute streaming request. Note: Streaming support varies by model and region.
Parameters
Section titled “Parameters”request
Section titled “request”signal?
Section titled “signal?”AbortSignal
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”fromIR()
Section titled “fromIR()”fromIR(
request):BedrockRequest
Defined in: backend/src/providers/aws-bedrock.ts:166
Convert IR to Bedrock format.
Parameters
Section titled “Parameters”request
Section titled “request”Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”healthCheck()
Section titled “healthCheck()”healthCheck():
Promise<boolean>
Defined in: backend/src/providers/aws-bedrock.ts:498
Health check.
Returns
Section titled “Returns”Promise<boolean>
Implementation of
Section titled “Implementation of”toIR()
Section titled “toIR()”toIR(
response,originalRequest,latencyMs):IRChatResponse
Defined in: backend/src/providers/aws-bedrock.ts:230
Convert Bedrock response to IR.
Parameters
Section titled “Parameters”response
Section titled “response”originalRequest
Section titled “originalRequest”latencyMs
Section titled “latencyMs”number