Skip to content

Commit 6bb44a1

Browse files
authored
Merge pull request #1429 from siddharthsambharia-portkey/fix/hanle-empty-tool-call-array-in-messages
fix: return null for empty tools in transformToolsConfig
2 parents 6a76ee6 + 1c9fdd2 commit 6bb44a1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/providers/bedrock/utils/messagesUtils.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,8 @@ export const transformToolsConfig = (params: BedrockMessagesParams) => {
8686
}
8787
}
8888
}
89+
if (tools.length === 0) {
90+
return null;
91+
}
8992
return { tools, toolChoice };
9093
};

0 commit comments

Comments
 (0)