@ai-sdk/google 3.0.135 → 3.0.137

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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # @ai-sdk/google
2
2
 
3
+ ## 3.0.137
4
+
5
+ ### Patch Changes
6
+
7
+ - f536aa8: Defer validation schema construction until first use to reduce provider import time.
8
+ - Updated dependencies [1183cc4]
9
+ - Updated dependencies [d726591]
10
+ - @ai-sdk/provider-utils@4.0.62
11
+
12
+ ## 3.0.136
13
+
14
+ ### Patch Changes
15
+
16
+ - 8fccc63: Preserve grounding metadata from each automatically continued Google response in `groundingMetadataPerRequest`. Previously, a later response without grounding could leave earlier Search queries absent from the final provider metadata even though their sources were returned. The new array preserves request order and includes `null` for requests without grounding.
17
+
3
18
  ## 3.0.135
4
19
 
5
20
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -241,6 +241,8 @@ type GoogleGenerativeAIUsageMetadata = UsageMetadataSchema;
241
241
  interface GoogleGenerativeAIProviderMetadata {
242
242
  promptFeedback: GoogleGenerativeAIPromptFeedback | null;
243
243
  groundingMetadata: GoogleGenerativeAIGroundingMetadata | null;
244
+ /** Grounding from each automatically continued request, in request order. */
245
+ groundingMetadataPerRequest?: Array<GoogleGenerativeAIGroundingMetadata | null>;
244
246
  urlContextMetadata: GoogleGenerativeAIUrlContextMetadata | null;
245
247
  safetyRatings: GoogleGenerativeAISafetyRating[] | null;
246
248
  usageMetadata: GoogleGenerativeAIUsageMetadata | null;
@@ -463,17 +465,14 @@ type GoogleTranscriptionModelId = 'gemini-3.5-transcribe' | 'gemini-3.5-transcri
463
465
  * The live variant (`gemini-3.5-transcribe-live`) requires streaming
464
466
  * transcription, which is only available in AI SDK v7.
465
467
  */
466
- declare const googleTranscriptionModelOptions: z.ZodObject<{
467
- languageCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
468
- customVocabulary: z.ZodOptional<z.ZodArray<z.ZodString>>;
469
- wordTimestamp: z.ZodOptional<z.ZodBoolean>;
470
- diarization: z.ZodOptional<z.ZodBoolean>;
471
- mode: z.ZodOptional<z.ZodEnum<{
472
- SMART: "SMART";
473
- VERBATIM: "VERBATIM";
474
- }>>;
475
- }, z.core.$strip>;
476
- type GoogleTranscriptionModelOptions = z.infer<typeof googleTranscriptionModelOptions>;
468
+ declare const googleTranscriptionModelOptions: _ai_sdk_provider_utils.LazySchema<{
469
+ languageCodes?: string[] | undefined;
470
+ customVocabulary?: string[] | undefined;
471
+ wordTimestamp?: boolean | undefined;
472
+ diarization?: boolean | undefined;
473
+ mode?: "SMART" | "VERBATIM" | undefined;
474
+ }>;
475
+ type GoogleTranscriptionModelOptions = InferSchema<typeof googleTranscriptionModelOptions>;
477
476
 
478
477
  interface GoogleTranscriptionModelConfig {
479
478
  provider: string;
package/dist/index.d.ts CHANGED
@@ -241,6 +241,8 @@ type GoogleGenerativeAIUsageMetadata = UsageMetadataSchema;
241
241
  interface GoogleGenerativeAIProviderMetadata {
242
242
  promptFeedback: GoogleGenerativeAIPromptFeedback | null;
243
243
  groundingMetadata: GoogleGenerativeAIGroundingMetadata | null;
244
+ /** Grounding from each automatically continued request, in request order. */
245
+ groundingMetadataPerRequest?: Array<GoogleGenerativeAIGroundingMetadata | null>;
244
246
  urlContextMetadata: GoogleGenerativeAIUrlContextMetadata | null;
245
247
  safetyRatings: GoogleGenerativeAISafetyRating[] | null;
246
248
  usageMetadata: GoogleGenerativeAIUsageMetadata | null;
@@ -463,17 +465,14 @@ type GoogleTranscriptionModelId = 'gemini-3.5-transcribe' | 'gemini-3.5-transcri
463
465
  * The live variant (`gemini-3.5-transcribe-live`) requires streaming
464
466
  * transcription, which is only available in AI SDK v7.
465
467
  */
466
- declare const googleTranscriptionModelOptions: z.ZodObject<{
467
- languageCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
468
- customVocabulary: z.ZodOptional<z.ZodArray<z.ZodString>>;
469
- wordTimestamp: z.ZodOptional<z.ZodBoolean>;
470
- diarization: z.ZodOptional<z.ZodBoolean>;
471
- mode: z.ZodOptional<z.ZodEnum<{
472
- SMART: "SMART";
473
- VERBATIM: "VERBATIM";
474
- }>>;
475
- }, z.core.$strip>;
476
- type GoogleTranscriptionModelOptions = z.infer<typeof googleTranscriptionModelOptions>;
468
+ declare const googleTranscriptionModelOptions: _ai_sdk_provider_utils.LazySchema<{
469
+ languageCodes?: string[] | undefined;
470
+ customVocabulary?: string[] | undefined;
471
+ wordTimestamp?: boolean | undefined;
472
+ diarization?: boolean | undefined;
473
+ mode?: "SMART" | "VERBATIM" | undefined;
474
+ }>;
475
+ type GoogleTranscriptionModelOptions = InferSchema<typeof googleTranscriptionModelOptions>;
477
476
 
478
477
  interface GoogleTranscriptionModelConfig {
479
478
  provider: string;