We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2571f92 commit 9804a36Copy full SHA for 9804a36
src/providers/bedrock/utils.ts
@@ -137,10 +137,10 @@ export const transformAnthropicAdditionalModelRequestFields = (
137
additionalModelRequestFields['anthropic_beta'] = params['anthropic_beta'];
138
}
139
140
- if (params['tools']) {
+ if (params.tools && params.tools.length) {
141
const anthropicTools: any[] = [];
142
params.tools.forEach((tool: Tool) => {
143
- if (tool.type != 'function') {
+ if (tool.type !== 'function') {
144
const toolOptions = tool[tool.type];
145
anthropicTools.push({
146
...(toolOptions && { ...toolOptions }),
0 commit comments