Skip to content

Commit 2571f92

Browse files
committed
add null check for tools
1 parent b22410a commit 2571f92

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/providers/bedrock/chatComplete.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,8 @@ export const BedrockConverseChatCompleteConfig: ProviderConfig = {
355355
}
356356
}
357357
}
358-
return { ...toolConfig, toolChoice };
358+
// TODO: split this into two provider options, one for tools and one for toolChoice
359+
return tools.length ? { ...toolConfig, toolChoice } : null;
359360
},
360361
},
361362
guardrailConfig: {

0 commit comments

Comments
 (0)