@ai-sdk/google 3.0.5 → 3.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  } from "@ai-sdk/provider-utils";
8
8
 
9
9
  // src/version.ts
10
- var VERSION = true ? "3.0.5" : "0.0.0-test";
10
+ var VERSION = true ? "3.0.7" : "0.0.0-test";
11
11
 
12
12
  // src/google-generative-ai-embedding-model.ts
13
13
  import {
@@ -1106,7 +1106,10 @@ var GoogleGenerativeAILanguageModel = class {
1106
1106
  finishReason: {
1107
1107
  unified: mapGoogleGenerativeAIFinishReason({
1108
1108
  finishReason: candidate.finishReason,
1109
- hasToolCalls: content.some((part) => part.type === "tool-call")
1109
+ // Only count client-executed tool calls for finish reason determination.
1110
+ hasToolCalls: content.some(
1111
+ (part) => part.type === "tool-call" && !part.providerExecuted
1112
+ )
1110
1113
  }),
1111
1114
  raw: (_e = candidate.finishReason) != null ? _e : void 0
1112
1115
  },
@@ -1209,7 +1212,6 @@ var GoogleGenerativeAILanguageModel = class {
1209
1212
  input: JSON.stringify(part.executableCode),
1210
1213
  providerExecuted: true
1211
1214
  });
1212
- hasToolCalls = true;
1213
1215
  } else if ("codeExecutionResult" in part && part.codeExecutionResult) {
1214
1216
  const toolCallId = lastCodeExecutionToolCallId;
1215
1217
  if (toolCallId) {