BedrockModelOptions
Defined in: src/models/bedrock.ts:325
Options for creating a BedrockModel instance.
Extends
Section titled “Extends”Properties
Section titled “Properties”maxTokens?
Section titled “maxTokens?”optional maxTokens?: number;Defined in: src/models/bedrock.ts:242
Maximum number of tokens to generate in the response.
https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InferenceConfiguration.html
Inherited from
Section titled “Inherited from”temperature?
Section titled “temperature?”optional temperature?: number;Defined in: src/models/bedrock.ts:249
Controls randomness in generation.
https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InferenceConfiguration.html
Inherited from
Section titled “Inherited from”BedrockModelConfig.temperature
optional topP?: number;Defined in: src/models/bedrock.ts:256
Controls diversity via nucleus sampling.
https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InferenceConfiguration.html
Inherited from
Section titled “Inherited from”stopSequences?
Section titled “stopSequences?”optional stopSequences?: string[];Defined in: src/models/bedrock.ts:261
Array of sequences that will stop generation when encountered.
Inherited from
Section titled “Inherited from”BedrockModelConfig.stopSequences
cacheConfig?
Section titled “cacheConfig?”optional cacheConfig?: CacheConfig;Defined in: src/models/bedrock.ts:268
Configuration for prompt caching.
https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-caching.html
Inherited from
Section titled “Inherited from”BedrockModelConfig.cacheConfig
additionalRequestFields?
Section titled “additionalRequestFields?”optional additionalRequestFields?: JSONValue;Defined in: src/models/bedrock.ts:273
Additional fields to include in the Bedrock request.
Inherited from
Section titled “Inherited from”BedrockModelConfig.additionalRequestFields
additionalResponseFieldPaths?
Section titled “additionalResponseFieldPaths?”optional additionalResponseFieldPaths?: string[];Defined in: src/models/bedrock.ts:278
Additional response field paths to extract from the Bedrock response.
Inherited from
Section titled “Inherited from”BedrockModelConfig.additionalResponseFieldPaths
additionalArgs?
Section titled “additionalArgs?”optional additionalArgs?: JSONValue;Defined in: src/models/bedrock.ts:284
Additional arguments to pass through to the Bedrock Converse API.
Inherited from
Section titled “Inherited from”BedrockModelConfig.additionalArgs
stream?
Section titled “stream?”optional stream?: boolean;Defined in: src/models/bedrock.ts:294
Whether or not to stream responses from the model.
This will use the ConverseStream API instead of the Converse API.
- https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html
- https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html
Inherited from
Section titled “Inherited from”includeToolResultStatus?
Section titled “includeToolResultStatus?”optional includeToolResultStatus?: boolean | "auto";Defined in: src/models/bedrock.ts:302
Flag to include status field in tool results.
true: Always include status fieldfalse: Never include status field'auto': Automatically determine based on model ID (default)
Inherited from
Section titled “Inherited from”BedrockModelConfig.includeToolResultStatus
guardrailConfig?
Section titled “guardrailConfig?”optional guardrailConfig?: BedrockGuardrailConfig;Defined in: src/models/bedrock.ts:308
Guardrail configuration for content filtering and safety controls.
https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html
Inherited from
Section titled “Inherited from”BedrockModelConfig.guardrailConfig
useNativeTokenCount?
Section titled “useNativeTokenCount?”optional useNativeTokenCount?: boolean;Defined in: src/models/bedrock.ts:319
Whether to use the native Bedrock CountTokens API.
When true, countTokens() calls the Bedrock CountTokens API for
accurate counts. When false or not set (default), skips the API call and uses
the character-based heuristic estimator.
Default Value
Section titled “Default Value”falseInherited from
Section titled “Inherited from”BedrockModelConfig.useNativeTokenCount
region?
Section titled “region?”optional region?: string;Defined in: src/models/bedrock.ts:329
AWS region to use for the Bedrock service.
clientConfig?
Section titled “clientConfig?”optional clientConfig?: BedrockRuntimeClientConfig;Defined in: src/models/bedrock.ts:334
Configuration for the Bedrock Runtime client.
requestTimeout?
Section titled “requestTimeout?”optional requestTimeout?: number;Defined in: src/models/bedrock.ts:345
Milliseconds of stream inactivity before a Bedrock request is aborted.
Applies to the default request handler and takes precedence over
clientConfig.requestHandler.requestTimeout. Ignored when clientConfig.requestHandler
is a constructed handler instance, whose own timeouts apply.
Default Value
Section titled “Default Value”120000apiKey?
Section titled “apiKey?”optional apiKey?: string;Defined in: src/models/bedrock.ts:352
Amazon Bedrock API key for bearer token authentication. When provided, requests use the API key instead of SigV4 signing.
https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys.html
modelId?
Section titled “modelId?”optional modelId?: string;Defined in: src/models/model.ts:183
The model identifier. This typically specifies which model to use from the provider’s catalog.
Inherited from
Section titled “Inherited from”contextWindowLimit?
Section titled “contextWindowLimit?”optional contextWindowLimit?: number;Defined in: src/models/model.ts:216
Maximum context window size in tokens for the model.
This value represents the total token capacity shared between input and output. When not provided, it is automatically resolved from a built-in lookup table based on the configured model ID. An explicit value always takes precedence.
When modelId is changed via updateConfig(), this value is automatically
re-resolved if it was initially auto-populated. Explicitly set values are preserved.