Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@ai-sdk/google

Package Overview
Dependencies
Maintainers
3
Versions
377
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
3.0.15
to
3.0.16
+8
-0
CHANGELOG.md
# @ai-sdk/google
## 3.0.16
### Patch Changes
- 97b3ebb: fix (provider/google): make `segment` optional in `groundingSupports` schema
The Google Generative AI API sometimes returns grounding supports without a `segment` field. This change makes the `segment` field optional to handle these responses correctly.
## 3.0.15

@@ -4,0 +12,0 @@

+2
-2

@@ -108,7 +108,7 @@ import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';

groundingSupports?: {
segment: {
segment?: {
startIndex?: number | null | undefined;
endIndex?: number | null | undefined;
text?: string | null | undefined;
};
} | null | undefined;
segment_text?: string | null | undefined;

@@ -115,0 +115,0 @@ groundingChunkIndices?: number[] | null | undefined;

@@ -108,7 +108,7 @@ import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';

groundingSupports?: {
segment: {
segment?: {
startIndex?: number | null | undefined;
endIndex?: number | null | undefined;
text?: string | null | undefined;
};
} | null | undefined;
segment_text?: string | null | undefined;

@@ -115,0 +115,0 @@ groundingChunkIndices?: number[] | null | undefined;

@@ -56,7 +56,7 @@ import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';

groundingSupports: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
segment: z.ZodObject<{
segment: z.ZodOptional<z.ZodNullable<z.ZodObject<{
startIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
endIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
}, z.core.$strip>>>;
segment_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;

@@ -141,7 +141,7 @@ groundingChunkIndices: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;

groundingSupports?: {
segment: {
segment?: {
startIndex?: number | null | undefined;
endIndex?: number | null | undefined;
text?: string | null | undefined;
};
} | null | undefined;
segment_text?: string | null | undefined;

@@ -148,0 +148,0 @@ groundingChunkIndices?: number[] | null | undefined;

@@ -56,7 +56,7 @@ import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';

groundingSupports: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
segment: z.ZodObject<{
segment: z.ZodOptional<z.ZodNullable<z.ZodObject<{
startIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
endIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
}, z.core.$strip>>>;
segment_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;

@@ -141,7 +141,7 @@ groundingChunkIndices: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;

groundingSupports?: {
segment: {
segment?: {
startIndex?: number | null | undefined;
endIndex?: number | null | undefined;
text?: string | null | undefined;
};
} | null | undefined;
segment_text?: string | null | undefined;

@@ -148,0 +148,0 @@ groundingChunkIndices?: number[] | null | undefined;

@@ -1348,3 +1348,3 @@ "use strict";

text: import_v43.z.string().nullish()
}),
}).nullish(),
segment_text: import_v43.z.string().nullish(),

@@ -1351,0 +1351,0 @@ groundingChunkIndices: import_v43.z.array(import_v43.z.number()).nullish(),

@@ -1337,3 +1337,3 @@ // src/google-generative-ai-language-model.ts

text: z3.string().nullish()
}),
}).nullish(),
segment_text: z3.string().nullish(),

@@ -1340,0 +1340,0 @@ groundingChunkIndices: z3.array(z3.number()).nullish(),

{
"name": "@ai-sdk/google",
"version": "3.0.15",
"version": "3.0.16",
"license": "Apache-2.0",

@@ -5,0 +5,0 @@ "sideEffects": false,

@@ -843,7 +843,9 @@ import {

z.object({
segment: z.object({
startIndex: z.number().nullish(),
endIndex: z.number().nullish(),
text: z.string().nullish(),
}),
segment: z
.object({
startIndex: z.number().nullish(),
endIndex: z.number().nullish(),
text: z.string().nullish(),
})
.nullish(),
segment_text: z.string().nullish(),

@@ -850,0 +852,0 @@ groundingChunkIndices: z.array(z.number()).nullish(),

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

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