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 {
4949}
5050
5151export interface BedrockConverseAnthropicChatCompletionsParams
52- extends BedrockChatCompletionsParams {
52+ extends Omit < BedrockChatCompletionsParams , 'anthropic_beta' > {
5353 anthropic_version ?: string ;
5454 user ?: string ;
5555 thinking ?: {
5656 type : string ;
5757 budget_tokens : number ;
5858 } ;
59+ anthropic_beta ?: string | string [ ] ;
5960}
6061
6162export interface BedrockConverseCohereChatCompletionsParams
Original file line number Diff line number Diff line change @@ -127,6 +127,15 @@ export const transformAnthropicAdditionalModelRequestFields = (
127127 if ( params [ 'thinking' ] ) {
128128 additionalModelRequestFields [ 'thinking' ] = params [ 'thinking' ] ;
129129 }
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+ }
130139 return additionalModelRequestFields ;
131140} ;
132141
You can’t perform that action at this time.
0 commit comments