Skip to content

BedrockModelConfig

Defined in: src/models/bedrock.ts:192

Configuration interface for AWS Bedrock model provider.

Extends BaseModelConfig with Bedrock-specific configuration options for model parameters, caching, and additional request/response fields.

const config: BedrockModelConfig = {
modelId: 'global.anthropic.claude-sonnet-4-5-20250929-v1:0',
maxTokens: 1024,
temperature: 0.7,
cacheConfig: { strategy: 'auto' }
}
optional maxTokens: number;

Defined in: src/models/bedrock.ts:198

Maximum number of tokens to generate in the response.

https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InferenceConfiguration.html

BaseModelConfig.maxTokens


optional temperature: number;

Defined in: src/models/bedrock.ts:205

Controls randomness in generation.

https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InferenceConfiguration.html

BaseModelConfig.temperature


optional topP: number;

Defined in: src/models/bedrock.ts:212

Controls diversity via nucleus sampling.

https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InferenceConfiguration.html

BaseModelConfig.topP


optional stopSequences: string[];

Defined in: src/models/bedrock.ts:217

Array of sequences that will stop generation when encountered.


optional cacheConfig: CacheConfig;

Defined in: src/models/bedrock.ts:224

Configuration for prompt caching.

https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-caching.html


optional additionalRequestFields: JSONValue;

Defined in: src/models/bedrock.ts:229

Additional fields to include in the Bedrock request.


optional additionalResponseFieldPaths: string[];

Defined in: src/models/bedrock.ts:234

Additional response field paths to extract from the Bedrock response.


optional additionalArgs: JSONValue;

Defined in: src/models/bedrock.ts:240

Additional arguments to pass through to the Bedrock Converse API.

https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-runtime/command/ConverseStreamCommand/


optional stream: boolean;

Defined in: src/models/bedrock.ts:250

Whether or not to stream responses from the model.

This will use the ConverseStream API instead of the Converse API.


optional includeToolResultStatus: boolean | "auto";

Defined in: src/models/bedrock.ts:258

Flag to include status field in tool results.

  • true: Always include status field
  • false: Never include status field
  • 'auto': Automatically determine based on model ID (default)

optional guardrailConfig: BedrockGuardrailConfig;

Defined in: src/models/bedrock.ts:264

Guardrail configuration for content filtering and safety controls.

https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html


optional modelId: string;

Defined in: src/models/model.ts:71

The model identifier. This typically specifies which model to use from the provider’s catalog.

BaseModelConfig.modelId