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

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,105 @@
1
1
  # @ai-sdk/google
2
2
 
3
+ ## 2.0.0-canary.10
4
+
5
+ ### Patch Changes
6
+
7
+ - 3259565: feat (providers/google): add thinking config to provider options
8
+ - fd98925: chore(providers/google): update embedding model to use providerOptions
9
+ - Updated dependencies [95857aa]
10
+ - Updated dependencies [7ea4132]
11
+ - @ai-sdk/provider@2.0.0-canary.8
12
+ - @ai-sdk/provider-utils@3.0.0-canary.9
13
+
14
+ ## 2.0.0-canary.9
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [5d142ab]
19
+ - Updated dependencies [b6b43c7]
20
+ - Updated dependencies [8aa9e20]
21
+ - Updated dependencies [3795467]
22
+ - @ai-sdk/provider-utils@3.0.0-canary.8
23
+ - @ai-sdk/provider@2.0.0-canary.7
24
+
25
+ ## 2.0.0-canary.8
26
+
27
+ ### Patch Changes
28
+
29
+ - 26735b5: chore(embedding-model): add v2 interface
30
+ - 443d8ec: feat(embedding-model-v2): add response body field
31
+ - fd65bc6: chore(embedding-model-v2): rename rawResponse to response
32
+ - Updated dependencies [26735b5]
33
+ - Updated dependencies [443d8ec]
34
+ - Updated dependencies [14c9410]
35
+ - Updated dependencies [d9c98f4]
36
+ - Updated dependencies [c4a2fec]
37
+ - Updated dependencies [0054544]
38
+ - Updated dependencies [9e9c809]
39
+ - Updated dependencies [32831c6]
40
+ - Updated dependencies [d0f9495]
41
+ - Updated dependencies [fd65bc6]
42
+ - Updated dependencies [393138b]
43
+ - Updated dependencies [7182d14]
44
+ - @ai-sdk/provider@2.0.0-canary.6
45
+ - @ai-sdk/provider-utils@3.0.0-canary.7
46
+
47
+ ## 2.0.0-canary.7
48
+
49
+ ### Patch Changes
50
+
51
+ - f10304b: feat(tool-calling): don't require the user to have to pass parameters
52
+ - Updated dependencies [411e483]
53
+ - Updated dependencies [79457bd]
54
+ - Updated dependencies [ad80501]
55
+ - Updated dependencies [1766ede]
56
+ - Updated dependencies [f10304b]
57
+ - @ai-sdk/provider@2.0.0-canary.5
58
+ - @ai-sdk/provider-utils@3.0.0-canary.6
59
+
60
+ ## 2.0.0-canary.6
61
+
62
+ ### Patch Changes
63
+
64
+ - Updated dependencies [6f6bb89]
65
+ - @ai-sdk/provider@2.0.0-canary.4
66
+ - @ai-sdk/provider-utils@3.0.0-canary.5
67
+
68
+ ## 2.0.0-canary.5
69
+
70
+ ### Patch Changes
71
+
72
+ - Updated dependencies [d1a1aa1]
73
+ - @ai-sdk/provider@2.0.0-canary.3
74
+ - @ai-sdk/provider-utils@3.0.0-canary.4
75
+
76
+ ## 2.0.0-canary.4
77
+
78
+ ### Patch Changes
79
+
80
+ - Updated dependencies [a166433]
81
+ - Updated dependencies [abf9a79]
82
+ - Updated dependencies [9f95b35]
83
+ - Updated dependencies [0a87932]
84
+ - Updated dependencies [6dc848c]
85
+ - @ai-sdk/provider-utils@3.0.0-canary.3
86
+ - @ai-sdk/provider@2.0.0-canary.2
87
+
88
+ ## 2.0.0-canary.3
89
+
90
+ ### Patch Changes
91
+
92
+ - Updated dependencies [c57e248]
93
+ - Updated dependencies [33f4a6a]
94
+ - @ai-sdk/provider@2.0.0-canary.1
95
+ - @ai-sdk/provider-utils@3.0.0-canary.2
96
+
97
+ ## 2.0.0-canary.2
98
+
99
+ ### Patch Changes
100
+
101
+ - 5cf30ea: fix (provider/google): allow "OFF" for Google HarmBlockThreshold
102
+
3
103
  ## 2.0.0-canary.1
4
104
 
5
105
  ### 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
  /**