Registration for AWS Bedrock, through the Converse and ConverseStream APIs.
A section names the AWS region (required, never defaulted: a model is only available in some regions, and a silent default would send traffic to the wrong one). With no credentials it authenticates through the AWS default credential chain; it can instead name a profile, or set accessKeyId and secretAccessKey (plus sessionToken for temporary credentials). Bedrock has no single API key, so there is no llm4s.credentials.bedrock block.
claude-bedrock {
provider = "bedrock"
model = "anthropic.claude-3-5-sonnet-20241022-v2:0"
region = ${?AWS_REGION}
}
baseUrl is an optional endpoint override (a VPC endpoint, or a test server).
Constructs the client for a ProviderConfig this provider produced.
Constructs the client for a ProviderConfig this provider produced.
config is whatever the caller passed, so implementations must check the type rather than cast — ProviderDescriptor.expectConfig does that and produces the standard mismatch error.
Turns a validated config section into the runtime ProviderConfig for this provider.
Turns a validated config section into the runtime ProviderConfig for this provider.
The section has already been checked against configSpec, so required fields are present and section.extras holds exactly the declared provider-specific keys that have a value (defaults applied, deprecated aliases resolved). A Left here means something configSpec cannot express (a malformed value, say).
Value parameters
providerName
the user's instance name (llm4s.providers.<name>), for error messages.