@ai-sdk/google 3.0.139 → 3.0.141

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,25 @@
1
1
  # @ai-sdk/google
2
2
 
3
+ ## 3.0.141
4
+
5
+ ### Patch Changes
6
+
7
+ - d900e58: fix(google): handle cycles and BigInt in functionResponse and parse string functionCall arguments
8
+ - d900e58: Omit all Google Interactions tools when `toolChoice` is `none`, including provider-defined tools.
9
+ - d900e58: Map Google RPC status names to HTTP status codes when streamed errors omit a numeric code, so transient failures such as `UNAVAILABLE` and `RESOURCE_EXHAUSTED` are marked retryable.
10
+ - Updated dependencies [d900e58]
11
+ - Updated dependencies [d900e58]
12
+ - Updated dependencies [d900e58]
13
+ - @ai-sdk/provider-utils@4.0.64
14
+
15
+ ## 3.0.140
16
+
17
+ ### Patch Changes
18
+
19
+ - 9c9a131: Add videoMetadata support for file parts. Pass startOffset, endOffset, and fps through per-file providerOptions to control video clipping and frame rate with the Google and Google Vertex providers.
20
+ - Updated dependencies [28252da]
21
+ - @ai-sdk/provider-utils@4.0.63
22
+
3
23
  ## 3.0.139
4
24
 
5
25
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -233,6 +233,13 @@ type SafetyRatingSchema = NonNullable<CandidateSchema['safetyRatings']>[number];
233
233
  type PromptFeedbackSchema = NonNullable<InferSchema<typeof responseSchema>['promptFeedback']>;
234
234
  type UsageMetadataSchema = NonNullable<InferSchema<typeof responseSchema>['usageMetadata']>;
235
235
 
236
+ declare const googleVideoMetadataSchema: z.ZodObject<{
237
+ startOffset: z.ZodOptional<z.ZodString>;
238
+ endOffset: z.ZodOptional<z.ZodString>;
239
+ fps: z.ZodOptional<z.ZodNumber>;
240
+ }, z.core.$strip>;
241
+ /** Metadata for preprocessing video file parts. */
242
+ type GoogleVideoMetadata = z.infer<typeof googleVideoMetadataSchema>;
236
243
  type GoogleGenerativeAIGroundingMetadata = GroundingMetadataSchema;
237
244
  type GoogleGenerativeAIUrlContextMetadata = UrlContextMetadataSchema;
238
245
  type GoogleGenerativeAISafetyRating = SafetyRatingSchema;
@@ -683,4 +690,4 @@ declare const google: GoogleGenerativeAIProvider;
683
690
 
684
691
  declare const VERSION: string;
685
692
 
686
- export { type GoogleEmbeddingModelOptions, type GoogleErrorData, type GoogleEmbeddingModelOptions as GoogleGenerativeAIEmbeddingProviderOptions, type GoogleImageModelOptions as GoogleGenerativeAIImageProviderOptions, type GoogleGenerativeAIProvider, type GoogleGenerativeAIProviderMetadata, type GoogleLanguageModelOptions as GoogleGenerativeAIProviderOptions, type GoogleGenerativeAIProviderSettings, type GoogleGenerativeAIVideoModelId, type GoogleVideoModelOptions as GoogleGenerativeAIVideoProviderOptions, type GoogleImageModelOptions, type GoogleInteractionsAgentName, type GoogleInteractionsModelId, type GoogleInteractionsProviderMetadata, type GoogleLanguageModelInteractionsOptions, type GoogleLanguageModelOptions, GoogleTranscriptionModel, type GoogleTranscriptionModelId, type GoogleTranscriptionModelOptions, type GoogleVideoModelOptions, VERSION, createGoogleGenerativeAI, google };
693
+ export { type GoogleEmbeddingModelOptions, type GoogleErrorData, type GoogleEmbeddingModelOptions as GoogleGenerativeAIEmbeddingProviderOptions, type GoogleImageModelOptions as GoogleGenerativeAIImageProviderOptions, type GoogleGenerativeAIProvider, type GoogleGenerativeAIProviderMetadata, type GoogleLanguageModelOptions as GoogleGenerativeAIProviderOptions, type GoogleGenerativeAIProviderSettings, type GoogleGenerativeAIVideoModelId, type GoogleVideoModelOptions as GoogleGenerativeAIVideoProviderOptions, type GoogleImageModelOptions, type GoogleInteractionsAgentName, type GoogleInteractionsModelId, type GoogleInteractionsProviderMetadata, type GoogleLanguageModelInteractionsOptions, type GoogleLanguageModelOptions, GoogleTranscriptionModel, type GoogleTranscriptionModelId, type GoogleTranscriptionModelOptions, type GoogleVideoMetadata, type GoogleVideoModelOptions, VERSION, createGoogleGenerativeAI, google };
package/dist/index.d.ts CHANGED
@@ -233,6 +233,13 @@ type SafetyRatingSchema = NonNullable<CandidateSchema['safetyRatings']>[number];
233
233
  type PromptFeedbackSchema = NonNullable<InferSchema<typeof responseSchema>['promptFeedback']>;
234
234
  type UsageMetadataSchema = NonNullable<InferSchema<typeof responseSchema>['usageMetadata']>;
235
235
 
236
+ declare const googleVideoMetadataSchema: z.ZodObject<{
237
+ startOffset: z.ZodOptional<z.ZodString>;
238
+ endOffset: z.ZodOptional<z.ZodString>;
239
+ fps: z.ZodOptional<z.ZodNumber>;
240
+ }, z.core.$strip>;
241
+ /** Metadata for preprocessing video file parts. */
242
+ type GoogleVideoMetadata = z.infer<typeof googleVideoMetadataSchema>;
236
243
  type GoogleGenerativeAIGroundingMetadata = GroundingMetadataSchema;
237
244
  type GoogleGenerativeAIUrlContextMetadata = UrlContextMetadataSchema;
238
245
  type GoogleGenerativeAISafetyRating = SafetyRatingSchema;
@@ -683,4 +690,4 @@ declare const google: GoogleGenerativeAIProvider;
683
690
 
684
691
  declare const VERSION: string;
685
692
 
686
- export { type GoogleEmbeddingModelOptions, type GoogleErrorData, type GoogleEmbeddingModelOptions as GoogleGenerativeAIEmbeddingProviderOptions, type GoogleImageModelOptions as GoogleGenerativeAIImageProviderOptions, type GoogleGenerativeAIProvider, type GoogleGenerativeAIProviderMetadata, type GoogleLanguageModelOptions as GoogleGenerativeAIProviderOptions, type GoogleGenerativeAIProviderSettings, type GoogleGenerativeAIVideoModelId, type GoogleVideoModelOptions as GoogleGenerativeAIVideoProviderOptions, type GoogleImageModelOptions, type GoogleInteractionsAgentName, type GoogleInteractionsModelId, type GoogleInteractionsProviderMetadata, type GoogleLanguageModelInteractionsOptions, type GoogleLanguageModelOptions, GoogleTranscriptionModel, type GoogleTranscriptionModelId, type GoogleTranscriptionModelOptions, type GoogleVideoModelOptions, VERSION, createGoogleGenerativeAI, google };
693
+ export { type GoogleEmbeddingModelOptions, type GoogleErrorData, type GoogleEmbeddingModelOptions as GoogleGenerativeAIEmbeddingProviderOptions, type GoogleImageModelOptions as GoogleGenerativeAIImageProviderOptions, type GoogleGenerativeAIProvider, type GoogleGenerativeAIProviderMetadata, type GoogleLanguageModelOptions as GoogleGenerativeAIProviderOptions, type GoogleGenerativeAIProviderSettings, type GoogleGenerativeAIVideoModelId, type GoogleVideoModelOptions as GoogleGenerativeAIVideoProviderOptions, type GoogleImageModelOptions, type GoogleInteractionsAgentName, type GoogleInteractionsModelId, type GoogleInteractionsProviderMetadata, type GoogleLanguageModelInteractionsOptions, type GoogleLanguageModelOptions, GoogleTranscriptionModel, type GoogleTranscriptionModelId, type GoogleTranscriptionModelOptions, type GoogleVideoMetadata, type GoogleVideoModelOptions, VERSION, createGoogleGenerativeAI, google };