🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@ai-sdk/google

Package Overview
Dependencies
Maintainers
3
Versions
576
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.18
to
4.0.19
+1
-0
dist/index.d.ts

@@ -173,2 +173,3 @@ import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';

}[];
responseId?: string | null | undefined;
usageMetadata?: {

@@ -175,0 +176,0 @@ cachedContentTokenCount?: number | null | undefined;

@@ -211,2 +211,3 @@ import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';

}[];
responseId?: string | null | undefined;
usageMetadata?: {

@@ -213,0 +214,0 @@ cachedContentTokenCount?: number | null | undefined;

+1
-1
{
"name": "@ai-sdk/google",
"version": "4.0.18",
"version": "4.0.19",
"type": "module",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

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

// Associates a code execution result with its preceding call.
// Associates code execution results with their preceding call.
let lastCodeExecutionToolCallId: string | undefined;

@@ -439,3 +439,3 @@ // Associates a server-side tool response with its preceding call (tool combination).

type: 'tool-result',
// Assumes a result directly follows its corresponding call part.
// Results correspond to the most recent executable code part.
toolCallId: lastCodeExecutionToolCallId!,

@@ -448,4 +448,2 @@ toolName: 'code_execution',

});
// Clear the ID after use to avoid accidental reuse.
lastCodeExecutionToolCallId = undefined;
} else if ('text' in part && part.text != null) {

@@ -575,3 +573,4 @@ const thoughtSignatureMetadata = part.thoughtSignature

response: {
// TODO timestamp, model id, id
// TODO timestamp, model id
id: response.responseId ?? undefined,
headers: responseHeaders,

@@ -622,2 +621,3 @@ body: rawResponse,

let hasToolCalls = false;
let hasEmittedResponseMetadata = false;

@@ -631,3 +631,3 @@ // Track active blocks to group consecutive parts of same type

const emittedSourceUrls = new Set<string>();
// Associates a code execution result with its preceding call.
// Associates code execution results with their preceding call.
let lastCodeExecutionToolCallId: string | undefined;

@@ -702,2 +702,10 @@ // Associates a server-side tool response with its preceding call (tool combination).

if (!hasEmittedResponseMetadata && value.responseId != null) {
hasEmittedResponseMetadata = true;
controller.enqueue({
type: 'response-metadata',
id: value.responseId,
});
}
const usageMetadata = value.usageMetadata;

@@ -761,3 +769,3 @@

) {
// Assumes a result directly follows its corresponding call part.
// Results correspond to the most recent executable code part.
const toolCallId = lastCodeExecutionToolCallId;

@@ -775,4 +783,2 @@

});
// Clear the ID after use.
lastCodeExecutionToolCallId = undefined;
}

@@ -1543,2 +1549,3 @@ } else if ('text' in part && part.text != null) {

z.object({
responseId: z.string().nullish(),
candidates: z.array(

@@ -1590,2 +1597,3 @@ z.object({

z.object({
responseId: z.string().nullish(),
candidates: z

@@ -1592,0 +1600,0 @@ .array(

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