Skip to content

Commit 9804a36

Browse files
committed
changes per comments
1 parent 2571f92 commit 9804a36

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/providers/bedrock/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@ export const transformAnthropicAdditionalModelRequestFields = (
137137
additionalModelRequestFields['anthropic_beta'] = params['anthropic_beta'];
138138
}
139139
}
140-
if (params['tools']) {
140+
if (params.tools && params.tools.length) {
141141
const anthropicTools: any[] = [];
142142
params.tools.forEach((tool: Tool) => {
143-
if (tool.type != 'function') {
143+
if (tool.type !== 'function') {
144144
const toolOptions = tool[tool.type];
145145
anthropicTools.push({
146146
...(toolOptions && { ...toolOptions }),

0 commit comments

Comments
 (0)