@ai-sdk/google 2.0.0-canary.1 → 2.0.0-canary.11

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,113 @@
1
1
  # @ai-sdk/google
2
2
 
3
+ ## 2.0.0-canary.11
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [e86be6f]
8
+ - @ai-sdk/provider@2.0.0-canary.9
9
+ - @ai-sdk/provider-utils@3.0.0-canary.10
10
+
11
+ ## 2.0.0-canary.10
12
+
13
+ ### Patch Changes
14
+
15
+ - 3259565: feat (providers/google): add thinking config to provider options
16
+ - fd98925: chore(providers/google): update embedding model to use providerOptions
17
+ - Updated dependencies [95857aa]
18
+ - Updated dependencies [7ea4132]
19
+ - @ai-sdk/provider@2.0.0-canary.8
20
+ - @ai-sdk/provider-utils@3.0.0-canary.9
21
+
22
+ ## 2.0.0-canary.9
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies [5d142ab]
27
+ - Updated dependencies [b6b43c7]
28
+ - Updated dependencies [8aa9e20]
29
+ - Updated dependencies [3795467]
30
+ - @ai-sdk/provider-utils@3.0.0-canary.8
31
+ - @ai-sdk/provider@2.0.0-canary.7
32
+
33
+ ## 2.0.0-canary.8
34
+
35
+ ### Patch Changes
36
+
37
+ - 26735b5: chore(embedding-model): add v2 interface
38
+ - 443d8ec: feat(embedding-model-v2): add response body field
39
+ - fd65bc6: chore(embedding-model-v2): rename rawResponse to response
40
+ - Updated dependencies [26735b5]
41
+ - Updated dependencies [443d8ec]
42
+ - Updated dependencies [14c9410]
43
+ - Updated dependencies [d9c98f4]
44
+ - Updated dependencies [c4a2fec]
45
+ - Updated dependencies [0054544]
46
+ - Updated dependencies [9e9c809]
47
+ - Updated dependencies [32831c6]
48
+ - Updated dependencies [d0f9495]
49
+ - Updated dependencies [fd65bc6]
50
+ - Updated dependencies [393138b]
51
+ - Updated dependencies [7182d14]
52
+ - @ai-sdk/provider@2.0.0-canary.6
53
+ - @ai-sdk/provider-utils@3.0.0-canary.7
54
+
55
+ ## 2.0.0-canary.7
56
+
57
+ ### Patch Changes
58
+
59
+ - f10304b: feat(tool-calling): don't require the user to have to pass parameters
60
+ - Updated dependencies [411e483]
61
+ - Updated dependencies [79457bd]
62
+ - Updated dependencies [ad80501]
63
+ - Updated dependencies [1766ede]
64
+ - Updated dependencies [f10304b]
65
+ - @ai-sdk/provider@2.0.0-canary.5
66
+ - @ai-sdk/provider-utils@3.0.0-canary.6
67
+
68
+ ## 2.0.0-canary.6
69
+
70
+ ### Patch Changes
71
+
72
+ - Updated dependencies [6f6bb89]
73
+ - @ai-sdk/provider@2.0.0-canary.4
74
+ - @ai-sdk/provider-utils@3.0.0-canary.5
75
+
76
+ ## 2.0.0-canary.5
77
+
78
+ ### Patch Changes
79
+
80
+ - Updated dependencies [d1a1aa1]
81
+ - @ai-sdk/provider@2.0.0-canary.3
82
+ - @ai-sdk/provider-utils@3.0.0-canary.4
83
+
84
+ ## 2.0.0-canary.4
85
+
86
+ ### Patch Changes
87
+
88
+ - Updated dependencies [a166433]
89
+ - Updated dependencies [abf9a79]
90
+ - Updated dependencies [9f95b35]
91
+ - Updated dependencies [0a87932]
92
+ - Updated dependencies [6dc848c]
93
+ - @ai-sdk/provider-utils@3.0.0-canary.3
94
+ - @ai-sdk/provider@2.0.0-canary.2
95
+
96
+ ## 2.0.0-canary.3
97
+
98
+ ### Patch Changes
99
+
100
+ - Updated dependencies [c57e248]
101
+ - Updated dependencies [33f4a6a]
102
+ - @ai-sdk/provider@2.0.0-canary.1
103
+ - @ai-sdk/provider-utils@3.0.0-canary.2
104
+
105
+ ## 2.0.0-canary.2
106
+
107
+ ### Patch Changes
108
+
109
+ - 5cf30ea: fix (provider/google): allow "OFF" for Google HarmBlockThreshold
110
+
3
111
  ## 2.0.0-canary.1
4
112
 
5
113
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { ProviderV2, LanguageModelV2, EmbeddingModelV1 } from '@ai-sdk/provider';
2
+ import { ProviderV2, LanguageModelV2, EmbeddingModelV2 } from '@ai-sdk/provider';
3
3
  import { FetchFunction } from '@ai-sdk/provider-utils';
4
4
 
5
5
  declare const googleErrorDataSchema: z.ZodObject<{
@@ -64,7 +64,7 @@ interface GoogleGenerativeAISettings {
64
64
  */
65
65
  safetySettings?: Array<{
66
66
  category: 'HARM_CATEGORY_UNSPECIFIED' | 'HARM_CATEGORY_HATE_SPEECH' | 'HARM_CATEGORY_DANGEROUS_CONTENT' | 'HARM_CATEGORY_HARASSMENT' | 'HARM_CATEGORY_SEXUALLY_EXPLICIT' | 'HARM_CATEGORY_CIVIC_INTEGRITY';
67
- threshold: 'HARM_BLOCK_THRESHOLD_UNSPECIFIED' | 'BLOCK_LOW_AND_ABOVE' | 'BLOCK_MEDIUM_AND_ABOVE' | 'BLOCK_ONLY_HIGH' | 'BLOCK_NONE';
67
+ threshold: 'HARM_BLOCK_THRESHOLD_UNSPECIFIED' | 'BLOCK_LOW_AND_ABOVE' | 'BLOCK_MEDIUM_AND_ABOVE' | 'BLOCK_ONLY_HIGH' | 'BLOCK_NONE' | 'OFF';
68
68
  }>;
69
69
  /**
70
70
  * Optional. Enables timestamp understanding for audio-only files.
@@ -274,10 +274,23 @@ declare const safetyRatingSchema: z.ZodObject<{
274
274
  }>;
275
275
  declare const googleGenerativeAIProviderOptionsSchema: z.ZodObject<{
276
276
  responseModalities: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["TEXT", "IMAGE"]>, "many">>>;
277
+ thinkingConfig: z.ZodOptional<z.ZodNullable<z.ZodObject<{
278
+ thinkingBudget: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
279
+ }, "strip", z.ZodTypeAny, {
280
+ thinkingBudget?: number | null | undefined;
281
+ }, {
282
+ thinkingBudget?: number | null | undefined;
283
+ }>>>;
277
284
  }, "strip", z.ZodTypeAny, {
278
285
  responseModalities?: ("TEXT" | "IMAGE")[] | null | undefined;
286
+ thinkingConfig?: {
287
+ thinkingBudget?: number | null | undefined;
288
+ } | null | undefined;
279
289
  }, {
280
290
  responseModalities?: ("TEXT" | "IMAGE")[] | null | undefined;
291
+ thinkingConfig?: {
292
+ thinkingBudget?: number | null | undefined;
293
+ } | null | undefined;
281
294
  }>;
282
295
  type GoogleGenerativeAIProviderOptions = z.infer<typeof googleGenerativeAIProviderOptionsSchema>;
283
296
 
@@ -289,13 +302,6 @@ interface GoogleGenerativeAIProviderMetadata {
289
302
  }
290
303
 
291
304
  type GoogleGenerativeAIEmbeddingModelId = 'text-embedding-004' | (string & {});
292
- interface GoogleGenerativeAIEmbeddingSettings {
293
- /**
294
- * Optional. Optional reduced dimension for the output embedding.
295
- * If set, excessive values in the output embedding are truncated from the end.
296
- */
297
- outputDimensionality?: number;
298
- }
299
305
 
300
306
  interface GoogleGenerativeAIProvider extends ProviderV2 {
301
307
  (modelId: GoogleGenerativeAIModelId, settings?: GoogleGenerativeAISettings): LanguageModelV2;
@@ -308,12 +314,12 @@ interface GoogleGenerativeAIProvider extends ProviderV2 {
308
314
  /**
309
315
  @deprecated Use `textEmbeddingModel()` instead.
310
316
  */
311
- embedding(modelId: GoogleGenerativeAIEmbeddingModelId, settings?: GoogleGenerativeAIEmbeddingSettings): EmbeddingModelV1<string>;
317
+ embedding(modelId: GoogleGenerativeAIEmbeddingModelId): EmbeddingModelV2<string>;
312
318
  /**
313
319
  @deprecated Use `textEmbeddingModel()` instead.
314
320
  */
315
- textEmbedding(modelId: GoogleGenerativeAIEmbeddingModelId, settings?: GoogleGenerativeAIEmbeddingSettings): EmbeddingModelV1<string>;
316
- textEmbeddingModel(modelId: GoogleGenerativeAIEmbeddingModelId, settings?: GoogleGenerativeAIEmbeddingSettings): EmbeddingModelV1<string>;
321
+ textEmbedding(modelId: GoogleGenerativeAIEmbeddingModelId): EmbeddingModelV2<string>;
322
+ textEmbeddingModel(modelId: GoogleGenerativeAIEmbeddingModelId): EmbeddingModelV2<string>;
317
323
  }
318
324
  interface GoogleGenerativeAIProviderSettings {
319
325
  /**
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { ProviderV2, LanguageModelV2, EmbeddingModelV1 } from '@ai-sdk/provider';
2
+ import { ProviderV2, LanguageModelV2, EmbeddingModelV2 } from '@ai-sdk/provider';
3
3
  import { FetchFunction } from '@ai-sdk/provider-utils';
4
4
 
5
5
  declare const googleErrorDataSchema: z.ZodObject<{
@@ -64,7 +64,7 @@ interface GoogleGenerativeAISettings {
64
64
  */
65
65
  safetySettings?: Array<{
66
66
  category: 'HARM_CATEGORY_UNSPECIFIED' | 'HARM_CATEGORY_HATE_SPEECH' | 'HARM_CATEGORY_DANGEROUS_CONTENT' | 'HARM_CATEGORY_HARASSMENT' | 'HARM_CATEGORY_SEXUALLY_EXPLICIT' | 'HARM_CATEGORY_CIVIC_INTEGRITY';
67
- threshold: 'HARM_BLOCK_THRESHOLD_UNSPECIFIED' | 'BLOCK_LOW_AND_ABOVE' | 'BLOCK_MEDIUM_AND_ABOVE' | 'BLOCK_ONLY_HIGH' | 'BLOCK_NONE';
67
+ threshold: 'HARM_BLOCK_THRESHOLD_UNSPECIFIED' | 'BLOCK_LOW_AND_ABOVE' | 'BLOCK_MEDIUM_AND_ABOVE' | 'BLOCK_ONLY_HIGH' | 'BLOCK_NONE' | 'OFF';
68
68
  }>;
69
69
  /**
70
70
  * Optional. Enables timestamp understanding for audio-only files.
@@ -274,10 +274,23 @@ declare const safetyRatingSchema: z.ZodObject<{
274
274
  }>;
275
275
  declare const googleGenerativeAIProviderOptionsSchema: z.ZodObject<{
276
276
  responseModalities: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["TEXT", "IMAGE"]>, "many">>>;
277
+ thinkingConfig: z.ZodOptional<z.ZodNullable<z.ZodObject<{
278
+ thinkingBudget: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
279
+ }, "strip", z.ZodTypeAny, {
280
+ thinkingBudget?: number | null | undefined;
281
+ }, {
282
+ thinkingBudget?: number | null | undefined;
283
+ }>>>;
277
284
  }, "strip", z.ZodTypeAny, {
278
285
  responseModalities?: ("TEXT" | "IMAGE")[] | null | undefined;
286
+ thinkingConfig?: {
287
+ thinkingBudget?: number | null | undefined;
288
+ } | null | undefined;
279
289
  }, {
280
290
  responseModalities?: ("TEXT" | "IMAGE")[] | null | undefined;
291
+ thinkingConfig?: {
292
+ thinkingBudget?: number | null | undefined;
293
+ } | null | undefined;
281
294
  }>;
282
295
  type GoogleGenerativeAIProviderOptions = z.infer<typeof googleGenerativeAIProviderOptionsSchema>;
283
296
 
@@ -289,13 +302,6 @@ interface GoogleGenerativeAIProviderMetadata {
289
302
  }
290
303
 
291
304
  type GoogleGenerativeAIEmbeddingModelId = 'text-embedding-004' | (string & {});
292
- interface GoogleGenerativeAIEmbeddingSettings {
293
- /**
294
- * Optional. Optional reduced dimension for the output embedding.
295
- * If set, excessive values in the output embedding are truncated from the end.
296
- */
297
- outputDimensionality?: number;
298
- }
299
305
 
300
306
  interface GoogleGenerativeAIProvider extends ProviderV2 {
301
307
  (modelId: GoogleGenerativeAIModelId, settings?: GoogleGenerativeAISettings): LanguageModelV2;
@@ -308,12 +314,12 @@ interface GoogleGenerativeAIProvider extends ProviderV2 {
308
314
  /**
309
315
  @deprecated Use `textEmbeddingModel()` instead.
310
316
  */
311
- embedding(modelId: GoogleGenerativeAIEmbeddingModelId, settings?: GoogleGenerativeAIEmbeddingSettings): EmbeddingModelV1<string>;
317
+ embedding(modelId: GoogleGenerativeAIEmbeddingModelId): EmbeddingModelV2<string>;
312
318
  /**
313
319
  @deprecated Use `textEmbeddingModel()` instead.
314
320
  */
315
- textEmbedding(modelId: GoogleGenerativeAIEmbeddingModelId, settings?: GoogleGenerativeAIEmbeddingSettings): EmbeddingModelV1<string>;
316
- textEmbeddingModel(modelId: GoogleGenerativeAIEmbeddingModelId, settings?: GoogleGenerativeAIEmbeddingSettings): EmbeddingModelV1<string>;
321
+ textEmbedding(modelId: GoogleGenerativeAIEmbeddingModelId): EmbeddingModelV2<string>;
322
+ textEmbeddingModel(modelId: GoogleGenerativeAIEmbeddingModelId): EmbeddingModelV2<string>;
317
323
  }
318
324
  interface GoogleGenerativeAIProviderSettings {
319
325
  /**