Skip to content

BedrockModel

Namespace: E2E

public sealed class BedrockModel : IAgentModel, IDisposable

Amazon Bedrock Converse API client. It signs with AWS Signature Version 4 from the standard AWS environment variables or, with none set, from the AWS credential chain (shared profile, SSO, container and instance roles), as the AI SDK’s amazon-bedrock provider does, or sends a Bedrock API key (AWS_BEARER_TOKEN_BEDROCK) as a bearer token when one is set.

Inheritance: object

Implements: IAgentModel, IDisposable

View source

BedrockModel(BedrockModelOptions, HttpClient?)

Section titled “BedrockModel(BedrockModelOptions, HttpClient?)”
public BedrockModel(BedrockModelOptions options, HttpClient? httpClient = null)

Parameters

Name Type Description
options BedrockModelOptions
httpClient HttpClient

View source

public string Name { get; }

Provider and model id, printed in the run summary. Changing it does not miss the replay cache.

Value: string

View source

CompleteAsync(ModelRequest, CancellationToken)

Section titled “CompleteAsync(ModelRequest, CancellationToken)”
public Task<ModelResponse> CompleteAsync(ModelRequest request, CancellationToken cancellationToken)

Parameters

Name Type Description
request ModelRequest
cancellationToken CancellationToken

Returns: Task<ModelResponse>

View source

public void Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

View source