File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -49,13 +49,14 @@ export interface BedrockChatCompletionsParams extends Params {
49
49
}
50
50
51
51
export interface BedrockConverseAnthropicChatCompletionsParams
52
- extends BedrockChatCompletionsParams {
52
+ extends Omit < BedrockChatCompletionsParams , 'anthropic_beta' > {
53
53
anthropic_version ?: string ;
54
54
user ?: string ;
55
55
thinking ?: {
56
56
type : string ;
57
57
budget_tokens : number ;
58
58
} ;
59
+ anthropic_beta ?: string | string [ ] ;
59
60
}
60
61
61
62
export interface BedrockConverseCohereChatCompletionsParams
Original file line number Diff line number Diff line change @@ -127,6 +127,15 @@ export const transformAnthropicAdditionalModelRequestFields = (
127
127
if ( params [ 'thinking' ] ) {
128
128
additionalModelRequestFields [ 'thinking' ] = params [ 'thinking' ] ;
129
129
}
130
+ if ( params [ 'anthropic_beta' ] ) {
131
+ if ( typeof params [ 'anthropic_beta' ] === 'string' ) {
132
+ additionalModelRequestFields [ 'anthropic_beta' ] = [
133
+ params [ 'anthropic_beta' ] ,
134
+ ] ;
135
+ } else {
136
+ additionalModelRequestFields [ 'anthropic_beta' ] = params [ 'anthropic_beta' ] ;
137
+ }
138
+ }
130
139
return additionalModelRequestFields ;
131
140
} ;
132
141
You can’t perform that action at this time.
0 commit comments