File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -46,14 +46,23 @@ interface BedrockInferenceConfig {
4646 topP ?: number
4747}
4848
49+ // Define interface for Bedrock thinking configuration
50+ interface BedrockThinkingConfig {
51+ thinking : {
52+ type : "enabled"
53+ budget_tokens : number
54+ }
55+ [ key : string ] : any // Add index signature to be compatible with DocumentType
56+ }
57+
4958// Define interface for Bedrock payload
5059interface BedrockPayload {
5160 modelId : BedrockModelId | string
5261 messages : Message [ ]
5362 system ?: SystemContentBlock [ ]
5463 inferenceConfig : BedrockInferenceConfig
5564 anthropic_version ?: string
56- additionalModelRequestFields ?: any
65+ additionalModelRequestFields ?: BedrockThinkingConfig
5766}
5867
5968// Define types for stream events based on AWS SDK
@@ -315,7 +324,7 @@ export class AwsBedrockHandler extends BaseProvider implements SingleCompletionH
315324 conversationId ,
316325 )
317326
318- let additionalModelRequestFields : any | undefined
327+ let additionalModelRequestFields : BedrockThinkingConfig | undefined
319328 let thinkingEnabled = false
320329
321330 if (
You can’t perform that action at this time.
0 commit comments