@ai-sdk/google 3.0.5 → 3.0.6
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/CHANGELOG.md +6 -0
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +4 -2
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +4 -2
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
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.
|
|
10
|
+
var VERSION = true ? "3.0.6" : "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
|
-
|
|
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) {
|