@ai-sdk/google 4.0.0-beta.48 → 4.0.0-beta.49

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.
@@ -9,36 +9,20 @@ import {
9
9
  createJsonResponseHandler,
10
10
  delay,
11
11
  getFromApi,
12
- lazySchema,
13
12
  parseProviderOptions,
14
13
  postJsonToApi,
15
14
  resolve,
16
- zodSchema,
17
15
  type FetchFunction,
18
16
  type Resolvable,
19
17
  } from '@ai-sdk/provider-utils';
20
18
  import { z } from 'zod/v4';
21
19
  import { googleFailedResponseHandler } from './google-error';
20
+ import {
21
+ googleVideoModelOptionsSchema,
22
+ type GoogleVideoModelOptions,
23
+ } from './google-video-model-options';
22
24
  import type { GoogleVideoModelId } from './google-video-settings';
23
25
 
24
- export type GoogleVideoModelOptions = {
25
- // Polling configuration
26
- pollIntervalMs?: number | null;
27
- pollTimeoutMs?: number | null;
28
-
29
- // Video generation options
30
- personGeneration?: 'dont_allow' | 'allow_adult' | 'allow_all' | null;
31
- negativePrompt?: string | null;
32
-
33
- // Reference images (for style/asset reference)
34
- referenceImages?: Array<{
35
- bytesBase64Encoded?: string;
36
- gcsUri?: string;
37
- }> | null;
38
-
39
- [key: string]: unknown; // For passthrough
40
- };
41
-
42
26
  interface GoogleVideoModelConfig {
43
27
  provider: string;
44
28
  baseURL: string;
@@ -349,26 +333,3 @@ const googleOperationSchema = z.object({
349
333
  })
350
334
  .nullish(),
351
335
  });
352
-
353
- const googleVideoModelOptionsSchema = lazySchema(() =>
354
- zodSchema(
355
- z
356
- .object({
357
- pollIntervalMs: z.number().positive().nullish(),
358
- pollTimeoutMs: z.number().positive().nullish(),
359
- personGeneration: z
360
- .enum(['dont_allow', 'allow_adult', 'allow_all'])
361
- .nullish(),
362
- negativePrompt: z.string().nullish(),
363
- referenceImages: z
364
- .array(
365
- z.object({
366
- bytesBase64Encoded: z.string().nullish(),
367
- gcsUri: z.string().nullish(),
368
- }),
369
- )
370
- .nullish(),
371
- })
372
- .passthrough(),
373
- ),
374
- );
package/src/index.ts CHANGED
@@ -3,7 +3,7 @@ export type {
3
3
  GoogleLanguageModelOptions,
4
4
  /** @deprecated Use `GoogleLanguageModelOptions` instead. */
5
5
  GoogleLanguageModelOptions as GoogleGenerativeAIProviderOptions,
6
- } from './google-options';
6
+ } from './google-language-model-options';
7
7
  export type {
8
8
  GoogleProviderMetadata,
9
9
  /** @deprecated Use `GoogleProviderMetadata` instead. */
@@ -13,17 +13,17 @@ export type {
13
13
  GoogleImageModelOptions,
14
14
  /** @deprecated Use `GoogleImageModelOptions` instead. */
15
15
  GoogleImageModelOptions as GoogleGenerativeAIImageProviderOptions,
16
- } from './google-image-model';
16
+ } from './google-image-model-options';
17
17
  export type {
18
18
  GoogleEmbeddingModelOptions,
19
19
  /** @deprecated Use `GoogleEmbeddingModelOptions` instead. */
20
20
  GoogleEmbeddingModelOptions as GoogleGenerativeAIEmbeddingProviderOptions,
21
- } from './google-embedding-options';
21
+ } from './google-embedding-model-options';
22
22
  export type {
23
23
  GoogleVideoModelOptions,
24
24
  /** @deprecated Use `GoogleVideoModelOptions` instead. */
25
25
  GoogleVideoModelOptions as GoogleGenerativeAIVideoProviderOptions,
26
- } from './google-video-model';
26
+ } from './google-video-model-options';
27
27
  export type {
28
28
  GoogleVideoModelId,
29
29
  /** @deprecated Use `GoogleVideoModelId` instead. */
@@ -1,3 +1,3 @@
1
1
  export * from '../google-language-model';
2
2
  export { googleTools } from '../google-tools';
3
- export type { GoogleModelId } from '../google-options';
3
+ export type { GoogleModelId } from '../google-language-model-options';