fix: Ensure all tool calls are complete before submitting responses (#689)

This commit is contained in:
N. Taylor Mullen
2025-06-02 01:50:28 -07:00
committed by GitHub
parent 27ba28ef76
commit 34b81abd9c
2 changed files with 312 additions and 7 deletions

View File

@@ -530,7 +530,10 @@ export const useGeminiStream = (
},
);
if (completedAndReadyToSubmitTools.length > 0) {
if (
completedAndReadyToSubmitTools.length > 0 &&
completedAndReadyToSubmitTools.length === toolCalls.length
) {
const responsesToSend: PartListUnion[] =
completedAndReadyToSubmitTools.map(
(toolCall) => toolCall.response.responseParts,