File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ export namespace ProviderTransform {
179179 cacheControl : { type : "ephemeral" } ,
180180 } ,
181181 bedrock : {
182- cachePoint : { type : "ephemeral " } ,
182+ cachePoint : { type : "default " } ,
183183 } ,
184184 openaiCompatible : {
185185 cache_control : { type : "ephemeral" } ,
@@ -190,7 +190,8 @@ export namespace ProviderTransform {
190190 }
191191
192192 for ( const msg of unique ( [ ...system , ...final ] ) ) {
193- const shouldUseContentOptions = providerID !== "anthropic" && Array . isArray ( msg . content ) && msg . content . length > 0
193+ const useMessageLevelOptions = providerID === "anthropic" || providerID . includes ( "bedrock" )
194+ const shouldUseContentOptions = ! useMessageLevelOptions && Array . isArray ( msg . content ) && msg . content . length > 0
194195
195196 if ( shouldUseContentOptions ) {
196197 const lastContent = msg . content [ msg . content . length - 1 ]
Original file line number Diff line number Diff line change @@ -1166,7 +1166,7 @@ describe("ProviderTransform.message - claude w/bedrock custom inference profile"
11661166 expect ( result [ 0 ] . providerOptions ?. bedrock ) . toEqual (
11671167 expect . objectContaining ( {
11681168 cachePoint : {
1169- type : "ephemeral " ,
1169+ type : "default " ,
11701170 } ,
11711171 } ) ,
11721172 )
You can’t perform that action at this time.
0 commit comments