@depup/ai-sdk__google 4.0.51-depup.0 → 4.0.56-depup.0

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,45 @@
1
1
  # @ai-sdk/google
2
2
 
3
+ ## 4.0.56
4
+
5
+ ### Patch Changes
6
+
7
+ - 3ad9da9: Preserve complete Google Generative Language usage metadata in raw usage results.
8
+ - e9bc618: Omit unsupported frequency and presence penalties from Gemini 2.5 requests and return warnings instead.
9
+
10
+ ## 4.0.55
11
+
12
+ ### Patch Changes
13
+
14
+ - 56d492f: Surface prompt-level Google safety blocks without candidates as content-filter results with prompt feedback metadata.
15
+
16
+ ## 4.0.54
17
+
18
+ ### Patch Changes
19
+
20
+ - 1f7835c: feat (provider/google, provider/google-vertex): Gemini 3.5 Transcribe support — unary transcription (`gemini-3.5-transcribe`) via generateContent with language detection, speaker diarization, word timestamps, and custom vocabulary, plus streaming transcription (`gemini-3.5-transcribe-live`) over the Live API WebSocket with `mode: 'VERBATIM' | 'SMART'` transcription formatting
21
+
22
+ ## 4.0.53
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies [3e125ba]
27
+ - @ai-sdk/provider-utils@5.0.32
28
+
29
+ ## 4.0.52
30
+
31
+ ### Patch Changes
32
+
33
+ - 7de3612: Encode provider-returned identifiers before using them in credentialed follow-up request paths.
34
+ - a9782e1: fix: align batch result parsing, request counts, and lifecycle behavior across providers
35
+ - 92e08e6: Preserve recursive tool input schemas without aborting Google model calls.
36
+ - 35841f5: feat: normalize mid-stream provider error events across supported providers into public StreamProviderError instances and preserve provider-owned type, code, status, retry, and raw payload metadata
37
+ - 0246209: Fix Google file uploads failing to type-check with TypeScript 5.9 DOM types.
38
+ - Updated dependencies [a9782e1]
39
+ - Updated dependencies [35841f5]
40
+ - Updated dependencies [d2f3353]
41
+ - @ai-sdk/provider-utils@5.0.31
42
+
3
43
  ## 4.0.51
4
44
 
5
45
  ### Patch Changes
package/README.md CHANGED
@@ -13,8 +13,8 @@ npm install @depup/ai-sdk__google
13
13
 
14
14
  | Field | Value |
15
15
  |-------|-------|
16
- | Original | [@ai-sdk/google](https://www.npmjs.com/package/@ai-sdk/google) @ 4.0.51 |
17
- | Processed | 2026-08-25 |
16
+ | Original | [@ai-sdk/google](https://www.npmjs.com/package/@ai-sdk/google) @ 4.0.56 |
17
+ | Processed | 2026-08-27 |
18
18
  | Smoke test | failed |
19
19
  | Deps updated | 0 |
20
20
 
package/changes.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "bumped": {},
3
- "timestamp": "2026-08-25T08:15:21.780Z",
3
+ "timestamp": "2026-08-27T19:32:52.487Z",
4
4
  "totalUpdated": 0
5
5
  }
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
2
- import { InferSchema, FetchFunction, WebSocketConstructor, WORKFLOW_SERIALIZE, WORKFLOW_DESERIALIZE } from '@ai-sdk/provider-utils';
2
+ import { InferSchema, FetchFunction, WebSocketConstructor, WORKFLOW_SERIALIZE, WORKFLOW_DESERIALIZE, Resolvable } from '@ai-sdk/provider-utils';
3
3
  import { z } from 'zod/v4';
4
4
  import * as _ai_sdk_provider from '@ai-sdk/provider';
5
- import { ProviderV4, Experimental_BatchLanguageModelV4, ImageModelV4, EmbeddingModelV4, Experimental_VideoModelV4, Experimental_SpeechTranslationModelV4, SpeechModelV4, FilesV4, LanguageModelV4, Experimental_RealtimeFactoryV4, Experimental_RealtimeModelV4, Experimental_RealtimeModelV4ClientSecretOptions, Experimental_RealtimeModelV4ClientSecretResult, Experimental_RealtimeModelV4ServerEvent, Experimental_RealtimeModelV4ClientEvent, Experimental_RealtimeModelV4SessionConfig, Experimental_SpeechTranslationModelV4StreamOptions } from '@ai-sdk/provider';
5
+ import { ProviderV4, Experimental_BatchLanguageModelV4, ImageModelV4, EmbeddingModelV4, Experimental_VideoModelV4, Experimental_SpeechTranslationModelV4, SpeechModelV4, TranscriptionModelV4, FilesV4, LanguageModelV4, Experimental_RealtimeFactoryV4, Experimental_RealtimeModelV4, Experimental_RealtimeModelV4ClientSecretOptions, Experimental_RealtimeModelV4ClientSecretResult, Experimental_RealtimeModelV4ServerEvent, Experimental_RealtimeModelV4ClientEvent, Experimental_RealtimeModelV4SessionConfig, JSONObject, Experimental_TranscriptionModelV4StreamOptions, Experimental_SpeechTranslationModelV4StreamOptions } from '@ai-sdk/provider';
6
6
 
7
7
  declare const googleErrorDataSchema: _ai_sdk_provider_utils.LazySchema<{
8
8
  error: {
@@ -56,7 +56,8 @@ declare const googleLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<{
56
56
  type GoogleLanguageModelOptions = InferSchema<typeof googleLanguageModelOptions>;
57
57
 
58
58
  declare const responseSchema: _ai_sdk_provider_utils.LazySchema<{
59
- candidates: {
59
+ responseId?: string | null | undefined;
60
+ candidates?: {
60
61
  content?: Record<string, never> | {
61
62
  parts?: ({
62
63
  functionCall: {
@@ -172,21 +173,34 @@ declare const responseSchema: _ai_sdk_provider_utils.LazySchema<{
172
173
  urlRetrievalStatus: string;
173
174
  }[] | null | undefined;
174
175
  } | null | undefined;
175
- }[];
176
- responseId?: string | null | undefined;
176
+ }[] | null | undefined;
177
177
  usageMetadata?: {
178
+ [x: string]: unknown;
178
179
  cachedContentTokenCount?: number | null | undefined;
179
180
  thoughtsTokenCount?: number | null | undefined;
180
181
  promptTokenCount?: number | null | undefined;
181
182
  candidatesTokenCount?: number | null | undefined;
183
+ toolUsePromptTokenCount?: number | null | undefined;
182
184
  totalTokenCount?: number | null | undefined;
183
185
  trafficType?: string | null | undefined;
184
186
  serviceTier?: string | null | undefined;
185
187
  promptTokensDetails?: {
188
+ [x: string]: unknown;
189
+ modality: string;
190
+ tokenCount: number;
191
+ }[] | null | undefined;
192
+ cacheTokensDetails?: {
193
+ [x: string]: unknown;
186
194
  modality: string;
187
195
  tokenCount: number;
188
196
  }[] | null | undefined;
189
197
  candidatesTokensDetails?: {
198
+ [x: string]: unknown;
199
+ modality: string;
200
+ tokenCount: number;
201
+ }[] | null | undefined;
202
+ toolUsePromptTokensDetails?: {
203
+ [x: string]: unknown;
190
204
  modality: string;
191
205
  tokenCount: number;
192
206
  }[] | null | undefined;
@@ -203,9 +217,10 @@ declare const responseSchema: _ai_sdk_provider_utils.LazySchema<{
203
217
  }[] | null | undefined;
204
218
  } | null | undefined;
205
219
  }>;
206
- type GroundingMetadataSchema = NonNullable<InferSchema<typeof responseSchema>['candidates'][number]['groundingMetadata']>;
207
- type UrlContextMetadataSchema = NonNullable<InferSchema<typeof responseSchema>['candidates'][number]['urlContextMetadata']>;
208
- type SafetyRatingSchema = NonNullable<InferSchema<typeof responseSchema>['candidates'][number]['safetyRatings']>[number];
220
+ type CandidateSchema = NonNullable<InferSchema<typeof responseSchema>['candidates']>[number];
221
+ type GroundingMetadataSchema = NonNullable<CandidateSchema['groundingMetadata']>;
222
+ type UrlContextMetadataSchema = NonNullable<CandidateSchema['urlContextMetadata']>;
223
+ type SafetyRatingSchema = NonNullable<CandidateSchema['safetyRatings']>[number];
209
224
  type PromptFeedbackSchema = NonNullable<InferSchema<typeof responseSchema>['promptFeedback']>;
210
225
  type UsageMetadataSchema = NonNullable<InferSchema<typeof responseSchema>['usageMetadata']>;
211
226
 
@@ -512,6 +527,24 @@ interface GoogleImageSettings {
512
527
  maxImagesPerCall?: number;
513
528
  }
514
529
 
530
+ type GoogleTranscriptionModelId = 'gemini-3.5-transcribe' | 'gemini-3.5-transcribe-live' | (string & {});
531
+ /**
532
+ * Speech recognition options shared by unary (`gemini-3.5-transcribe`) and
533
+ * live (`gemini-3.5-transcribe-live`) transcription. Maps onto Google's
534
+ * `AudioTranscriptionConfig`.
535
+ */
536
+ declare const googleTranscriptionModelOptions: z.ZodObject<{
537
+ languageCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
538
+ customVocabulary: z.ZodOptional<z.ZodArray<z.ZodString>>;
539
+ wordTimestamp: z.ZodOptional<z.ZodBoolean>;
540
+ diarization: z.ZodOptional<z.ZodBoolean>;
541
+ mode: z.ZodOptional<z.ZodEnum<{
542
+ SMART: "SMART";
543
+ VERBATIM: "VERBATIM";
544
+ }>>;
545
+ }, z.core.$strip>;
546
+ type GoogleTranscriptionModelOptions = z.infer<typeof googleTranscriptionModelOptions>;
547
+
515
548
  type GoogleSpeechTranslationModelId = 'gemini-3.5-live-translate-preview' | (string & {});
516
549
  declare const googleSpeechTranslationModelOptions: _ai_sdk_provider_utils.LazySchema<{
517
550
  echoTargetLanguage?: boolean | undefined;
@@ -570,6 +603,17 @@ interface GoogleProvider extends ProviderV4 {
570
603
  * Creates a model for speech generation (text-to-speech).
571
604
  */
572
605
  speechModel(modelId: GoogleSpeechModelId): SpeechModelV4;
606
+ /**
607
+ * Creates a model for transcription (speech-to-text). Unary models
608
+ * (e.g. `gemini-3.5-transcribe`) transcribe audio files; live models
609
+ * (e.g. `gemini-3.5-transcribe-live`) stream transcription over the
610
+ * Gemini Live API WebSocket via `experimental_streamTranscribe`.
611
+ */
612
+ transcription(modelId: GoogleTranscriptionModelId): TranscriptionModelV4;
613
+ /**
614
+ * Creates a model for transcription (speech-to-text).
615
+ */
616
+ transcriptionModel(modelId: GoogleTranscriptionModelId): TranscriptionModelV4;
573
617
  files(): FilesV4;
574
618
  /**
575
619
  * Creates a language model targeting the Gemini Interactions API
@@ -679,6 +723,36 @@ type GoogleRealtimeModelOptions = {
679
723
  };
680
724
  };
681
725
 
726
+ interface GoogleTranscriptionModelConfig {
727
+ provider: string;
728
+ baseURL: string;
729
+ headers?: Resolvable<Record<string, string | undefined>>;
730
+ fetch?: FetchFunction;
731
+ webSocket?: WebSocketConstructor;
732
+ _internal?: {
733
+ currentDate?: () => Date;
734
+ finishGraceMs?: number;
735
+ };
736
+ }
737
+ declare class GoogleTranscriptionModel implements TranscriptionModelV4 {
738
+ readonly modelId: GoogleTranscriptionModelId;
739
+ private readonly config;
740
+ readonly specificationVersion = "v4";
741
+ static [WORKFLOW_SERIALIZE](model: GoogleTranscriptionModel): {
742
+ modelId: string;
743
+ config: JSONObject;
744
+ };
745
+ static [WORKFLOW_DESERIALIZE](options: {
746
+ modelId: GoogleTranscriptionModelId;
747
+ config: GoogleTranscriptionModelConfig;
748
+ }): GoogleTranscriptionModel;
749
+ get provider(): string;
750
+ constructor(modelId: GoogleTranscriptionModelId, config: GoogleTranscriptionModelConfig);
751
+ private parseOptions;
752
+ doGenerate(options: Parameters<TranscriptionModelV4['doGenerate']>[0]): Promise<Awaited<ReturnType<TranscriptionModelV4['doGenerate']>>>;
753
+ doStream(options: Experimental_TranscriptionModelV4StreamOptions): Promise<Awaited<ReturnType<NonNullable<TranscriptionModelV4['doStream']>>>>;
754
+ }
755
+
682
756
  type GoogleSpeechTranslationModelConfig = {
683
757
  provider: string;
684
758
  baseURL: string;
@@ -708,4 +782,4 @@ declare class GoogleSpeechTranslationModel implements Experimental_SpeechTransla
708
782
 
709
783
  declare const VERSION: string;
710
784
 
711
- export { GoogleRealtimeModel as Experimental_GoogleRealtimeModel, type GoogleRealtimeModelConfig as Experimental_GoogleRealtimeModelConfig, type GoogleRealtimeModelId as Experimental_GoogleRealtimeModelId, type GoogleRealtimeModelOptions as Experimental_GoogleRealtimeModelOptions, GoogleSpeechTranslationModel as Experimental_GoogleSpeechTranslationModel, type GoogleSpeechTranslationModelConfig as Experimental_GoogleSpeechTranslationModelConfig, type GoogleSpeechTranslationModelId as Experimental_GoogleSpeechTranslationModelId, type GoogleSpeechTranslationModelOptions as Experimental_GoogleSpeechTranslationModelOptions, GoogleSpeechTranslationModel as Experimental_GoogleTranslationModel, type GoogleSpeechTranslationModelConfig as Experimental_GoogleTranslationModelConfig, type GoogleSpeechTranslationModelId as Experimental_GoogleTranslationModelId, type GoogleSpeechTranslationModelOptions as Experimental_GoogleTranslationModelOptions, type GoogleEmbeddingModelOptions, type GoogleErrorData, type GoogleFilesUploadOptions, type GoogleEmbeddingModelOptions as GoogleGenerativeAIEmbeddingProviderOptions, type GoogleImageModelOptions as GoogleGenerativeAIImageProviderOptions, type GoogleProvider as GoogleGenerativeAIProvider, type GoogleProviderMetadata as GoogleGenerativeAIProviderMetadata, type GoogleLanguageModelOptions as GoogleGenerativeAIProviderOptions, type GoogleProviderSettings as GoogleGenerativeAIProviderSettings, type GoogleVideoModelId as GoogleGenerativeAIVideoModelId, type GoogleVideoModelOptions as GoogleGenerativeAIVideoProviderOptions, type GoogleImageModelOptions, type GoogleInteractionsAgentName, type GoogleInteractionsModelId, type GoogleInteractionsProviderMetadata, type GoogleLanguageModelInteractionsOptions, type GoogleLanguageModelOptions, type GoogleProvider, type GoogleProviderMetadata, type GoogleProviderSettings, type GoogleSpeechModelId, type GoogleSpeechModelOptions, type GoogleVideoModelId, type GoogleVideoModelOptions, VERSION, createGoogle, createGoogle as createGoogleGenerativeAI, google };
785
+ export { GoogleRealtimeModel as Experimental_GoogleRealtimeModel, type GoogleRealtimeModelConfig as Experimental_GoogleRealtimeModelConfig, type GoogleRealtimeModelId as Experimental_GoogleRealtimeModelId, type GoogleRealtimeModelOptions as Experimental_GoogleRealtimeModelOptions, GoogleSpeechTranslationModel as Experimental_GoogleSpeechTranslationModel, type GoogleSpeechTranslationModelConfig as Experimental_GoogleSpeechTranslationModelConfig, type GoogleSpeechTranslationModelId as Experimental_GoogleSpeechTranslationModelId, type GoogleSpeechTranslationModelOptions as Experimental_GoogleSpeechTranslationModelOptions, GoogleSpeechTranslationModel as Experimental_GoogleTranslationModel, type GoogleSpeechTranslationModelConfig as Experimental_GoogleTranslationModelConfig, type GoogleSpeechTranslationModelId as Experimental_GoogleTranslationModelId, type GoogleSpeechTranslationModelOptions as Experimental_GoogleTranslationModelOptions, type GoogleEmbeddingModelOptions, type GoogleErrorData, type GoogleFilesUploadOptions, type GoogleEmbeddingModelOptions as GoogleGenerativeAIEmbeddingProviderOptions, type GoogleImageModelOptions as GoogleGenerativeAIImageProviderOptions, type GoogleProvider as GoogleGenerativeAIProvider, type GoogleProviderMetadata as GoogleGenerativeAIProviderMetadata, type GoogleLanguageModelOptions as GoogleGenerativeAIProviderOptions, type GoogleProviderSettings as GoogleGenerativeAIProviderSettings, type GoogleVideoModelId as GoogleGenerativeAIVideoModelId, type GoogleVideoModelOptions as GoogleGenerativeAIVideoProviderOptions, type GoogleImageModelOptions, type GoogleInteractionsAgentName, type GoogleInteractionsModelId, type GoogleInteractionsProviderMetadata, type GoogleLanguageModelInteractionsOptions, type GoogleLanguageModelOptions, type GoogleProvider, type GoogleProviderMetadata, type GoogleProviderSettings, type GoogleSpeechModelId, type GoogleSpeechModelOptions, GoogleTranscriptionModel, type GoogleTranscriptionModelId, type GoogleTranscriptionModelOptions, type GoogleVideoModelId, type GoogleVideoModelOptions, VERSION, createGoogle, createGoogle as createGoogleGenerativeAI, google };