Skip to content

Commit fc3a5cb

Browse files
committed
fix: tools cache_control parameter mapping for bedrock unified messages request transformer
1 parent f6bc63c commit fc3a5cb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/providers/bedrock/utils/messagesUtils.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,14 @@ export const transformToolsConfig = (params: BedrockMessagesParams) => {
7575
inputSchema: { json: tool.input_schema },
7676
description: tool.description,
7777
},
78-
...(tool.cache_control && {
78+
});
79+
if (tool.cache_control) {
80+
tools.push({
7981
cachePoint: {
8082
type: 'default',
8183
},
82-
}),
83-
});
84+
});
85+
}
8486
}
8587
}
8688
}

0 commit comments

Comments
 (0)