@ai-sdk/google
Advanced tools
+8
-0
| # @ai-sdk/google | ||
| ## 2.0.60 | ||
| ### Patch Changes | ||
| - 3f0102b: fix(provider/google): make `segment` optional in `groundingSupports` schema | ||
| Backport of #12002. When using image search grounding, the Google API returns `groundingSupports` entries without a `segment` field, causing schema validation to fail with "Invalid JSON response". | ||
| ## 2.0.59 | ||
@@ -4,0 +12,0 @@ |
+2
-2
@@ -114,7 +114,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; | ||
@@ -121,0 +121,0 @@ groundingChunkIndices?: number[] | null | undefined; |
+2
-2
@@ -114,7 +114,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; | ||
@@ -121,0 +121,0 @@ groundingChunkIndices?: number[] | null | undefined; |
@@ -63,7 +63,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>>; | ||
@@ -154,7 +154,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; | ||
@@ -161,0 +161,0 @@ groundingChunkIndices?: number[] | null | undefined; |
@@ -63,7 +63,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>>; | ||
@@ -154,7 +154,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; | ||
@@ -161,0 +161,0 @@ groundingChunkIndices?: number[] | null | undefined; |
@@ -1319,3 +1319,3 @@ "use strict"; | ||
| text: import_v43.z.string().nullish() | ||
| }), | ||
| }).nullish(), | ||
| segment_text: import_v43.z.string().nullish(), | ||
@@ -1322,0 +1322,0 @@ groundingChunkIndices: import_v43.z.array(import_v43.z.number()).nullish(), |
@@ -1311,3 +1311,3 @@ // src/google-generative-ai-language-model.ts | ||
| text: z3.string().nullish() | ||
| }), | ||
| }).nullish(), | ||
| segment_text: z3.string().nullish(), | ||
@@ -1314,0 +1314,0 @@ groundingChunkIndices: z3.array(z3.number()).nullish(), |
+3
-3
| { | ||
| "name": "@ai-sdk/google", | ||
| "version": "2.0.59", | ||
| "version": "2.0.60", | ||
| "license": "Apache-2.0", | ||
@@ -29,4 +29,4 @@ "sideEffects": false, | ||
| "dependencies": { | ||
| "@ai-sdk/provider": "2.0.1", | ||
| "@ai-sdk/provider-utils": "3.0.22" | ||
| "@ai-sdk/provider-utils": "3.0.22", | ||
| "@ai-sdk/provider": "2.0.1" | ||
| }, | ||
@@ -33,0 +33,0 @@ "devDependencies": { |
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
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
816901
0.09%