Sign In

@ai-sdk/google

Package Overview
Dependencies
Maintainers
3
Versions
626
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ai-sdk/google - npm Package Compare versions

Comparing version
4.0.46
to
4.0.47
+2
-2
package.json
{
"name": "@ai-sdk/google",
"version": "4.0.46",
"version": "4.0.47",
"type": "module",

@@ -39,3 +39,3 @@ "license": "Apache-2.0",

"@ai-sdk/provider": "4.0.7",
"@ai-sdk/provider-utils": "5.0.27"
"@ai-sdk/provider-utils": "5.0.28"
},

@@ -42,0 +42,0 @@ "devDependencies": {

@@ -469,3 +469,3 @@ import type {

type: 'tool-call' as const,
toolCallId: part.functionCall.id ?? this.config.generateId(),
toolCallId: part.functionCall.id || this.config.generateId(),
toolName: part.functionCall.name,

@@ -493,3 +493,3 @@ input: JSON.stringify(part.functionCall.args ?? {}),

} else if ('toolCall' in part && part.toolCall) {
const toolCallId = part.toolCall.id ?? this.config.generateId();
const toolCallId = part.toolCall.id || this.config.generateId();
lastServerToolCallId = toolCallId;

@@ -516,4 +516,4 @@ content.push({

const responseToolCallId =
lastServerToolCallId ??
part.toolResponse.id ??
lastServerToolCallId ||
part.toolResponse.id ||
this.config.generateId();

@@ -882,3 +882,3 @@ content.push({

} else if ('toolCall' in part && part.toolCall) {
const toolCallId = part.toolCall.id ?? generateId();
const toolCallId = part.toolCall.id || generateId();
lastServerToolCallId = toolCallId;

@@ -904,4 +904,4 @@ const serverMeta = wrapProviderMetadata({

const responseToolCallId =
lastServerToolCallId ??
part.toolResponse.id ??
lastServerToolCallId ||
part.toolResponse.id ||
generateId();

@@ -960,3 +960,3 @@ const serverMeta = wrapProviderMetadata({

if (part.functionCall.name != null) {
const toolCallId = part.functionCall.id ?? generateId();
const toolCallId = part.functionCall.id || generateId();
const accumulator = new GoogleJSONAccumulator();

@@ -1030,3 +1030,3 @@ activeStreamingToolCalls.push({

} else if (isCompleteCall) {
const toolCallId = part.functionCall.id ?? generateId();
const toolCallId = part.functionCall.id || generateId();
const toolName = part.functionCall.name!;

@@ -1068,3 +1068,3 @@ const args =

} else if (isNoArgsCompleteCall) {
const toolCallId = part.functionCall.id ?? generateId();
const toolCallId = part.functionCall.id || generateId();
const toolName = part.functionCall.name!;

@@ -1071,0 +1071,0 @@

@@ -338,3 +338,3 @@ import type {

} else if (stepType === 'function_call') {
const toolCallId = step?.id ?? blockId;
const toolCallId = step?.id || blockId;
const toolName = step?.name ?? 'unknown';

@@ -364,3 +364,3 @@ hasFunctionCall = true;

: builtinToolNameFromCallType(stepType);
const toolCallId = step?.id ?? blockId;
const toolCallId = step?.id || blockId;
const state: Extract<

@@ -387,3 +387,3 @@ OpenBlockState,

: builtinToolNameFromResultType(stepType);
const callId = step?.call_id ?? blockId;
const callId = step?.call_id || blockId;
const state: Extract<

@@ -614,3 +614,3 @@ OpenBlockState,

}
if (delta.id != null) {
if (delta.id != null && delta.id.length > 0) {
open.toolCallId = delta.id;

@@ -626,3 +626,5 @@ }

) {
if (delta.id != null) open.toolCallId = delta.id;
if (delta.id != null && delta.id.length > 0) {
open.toolCallId = delta.id;
}
if (

@@ -644,3 +646,5 @@ delta.arguments != null &&

) {
if (delta.call_id != null) open.callId = delta.call_id;
if (delta.call_id != null && delta.call_id.length > 0) {
open.callId = delta.call_id;
}
if (delta.result !== undefined) open.result = delta.result;

@@ -647,0 +651,0 @@ if (delta.is_error != null) open.isError = delta.is_error;

@@ -236,3 +236,3 @@ import type { JSONValue, LanguageModelV4Content } from '@ai-sdk/provider';

type: 'tool-call',
toolCallId: call.id ?? generateId(),
toolCallId: call.id || generateId(),
toolName,

@@ -255,3 +255,3 @@ input,

type: 'tool-result',
toolCallId: result.call_id ?? generateId(),
toolCallId: result.call_id || generateId(),
toolName,

@@ -258,0 +258,0 @@ result: (result.result ?? null) as NonNullable<JSONValue>,

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display