BedrockModelOptions
Defined in: src/models/bedrock.ts:374
Options for creating a BedrockModel instance.
Extends
Section titled “Extends”Properties
Section titled “Properties”maxTokens?
Section titled “maxTokens?”maxTokens?: number;Defined in: src/models/bedrock.ts:273
Maximum number of tokens to generate in the response.
Default Value
Section titled “Default Value”the model’s maxOutputTokens from the model info when known; otherwise maxTokens is not
sent and Bedrock’s per-model default applies.
https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InferenceConfiguration.html
Inherited from
Section titled “Inherited from”temperature?
Section titled “temperature?”temperature?: number;Defined in: src/models/bedrock.ts:280
Controls randomness in generation.
https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InferenceConfiguration.html
Inherited from
Section titled “Inherited from”BedrockModelConfig.temperature
topP?: number;Defined in: src/models/bedrock.ts:287
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?”stopSequences?: string[];Defined in: src/models/bedrock.ts:292
Array of sequences that will stop generation when encountered.
Inherited from
Section titled “Inherited from”BedrockModelConfig.stopSequences
cacheConfig?
Section titled “cacheConfig?”cacheConfig?: CacheConfig;Defined in: src/models/bedrock.ts:299
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?”additionalRequestFields?: JSONValue;Defined in: src/models/bedrock.ts:304
Additional fields to include in the Bedrock request.
Inherited from
Section titled “Inherited from”BedrockModelConfig.additionalRequestFields
additionalResponseFieldPaths?
Section titled “additionalResponseFieldPaths?”additionalResponseFieldPaths?: string[];Defined in: src/models/bedrock.ts:309
Additional response field paths to extract from the Bedrock response.
Inherited from
Section titled “Inherited from”BedrockModelConfig.additionalResponseFieldPaths
additionalArgs?
Section titled “additionalArgs?”additionalArgs?: JSONValue;Defined in: src/models/bedrock.ts:315
Additional arguments to pass through to the Bedrock Converse API.
Inherited from
Section titled “Inherited from”BedrockModelConfig.additionalArgs
stream?
Section titled “stream?”stream?: boolean;Defined in: src/models/bedrock.ts:325
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?”includeToolResultStatus?: boolean | "auto";Defined in: src/models/bedrock.ts:333
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?”guardrailConfig?: BedrockGuardrailConfig;Defined in: src/models/bedrock.ts:339
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?”useNativeTokenCount?: boolean;Defined in: src/models/bedrock.ts:350
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
strictTools?
Section titled “strictTools?”strictTools?: boolean;Defined in: src/models/bedrock.ts:368
Constrain the model to emit tool names and inputs that conform to each tool’s schema.
When true, every tool is sent with strict: true and a copy of its inputSchema with
additionalProperties: false added to each object type, so a free-form { type: 'object' }
parameter becomes one the model can only fill with {}. Bedrock rejects schemas that use
features outside its strict subset (recursive or external $ref, minimum/maximum/
multipleOf, minLength/maxLength, additionalProperties other than false) with a 400
at request time, and compiles each new schema on first use, which can take minutes.
Incompatible with citations for Anthropic models.
- https://docs.aws.amazon.com/bedrock/latest/userguide/structured-output.html
- https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ToolSpecification.html
Default Value
Section titled “Default Value”falseInherited from
Section titled “Inherited from”BedrockModelConfig.strictTools
region?
Section titled “region?”region?: string;Defined in: src/models/bedrock.ts:378
AWS region to use for the Bedrock service.
clientConfig?
Section titled “clientConfig?”clientConfig?: BedrockRuntimeClientConfig;Defined in: src/models/bedrock.ts:383
Configuration for the Bedrock Runtime client.
requestTimeout?
Section titled “requestTimeout?”requestTimeout?: number;Defined in: src/models/bedrock.ts:394
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?”apiKey?: string;Defined in: src/models/bedrock.ts:401
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?”modelId?: string;Defined in: src/models/model.ts:204
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?”contextWindowLimit?: number;Defined in: src/models/model.ts:235
Maximum context window size in tokens for the model.
The same fact as modelInfo.limits.contextWindow; setting it here is shorthand for setting it
through modelInfo, and it wins over the shared model info. When both are set, modelInfo wins.
When not provided, vended providers still populate it from the shared model info for
callers that read getConfig(); modelInfo is the resolved view to read.
Inherited from
Section titled “Inherited from”BedrockModelConfig.contextWindowLimit
modelInfo?
Section titled “modelInfo?”modelInfo?: ModelInfo;Defined in: src/models/model.ts:243
Overrides for what the SDK knows about the model. Fields set here win over the shared model
info and the provider; capabilities.stateful changes how the agent loop sends history, so set
it only for a provider that keeps state server-side. updateConfig({ modelInfo }) replaces the
previous override entirely, it does not merge into it.