@ai-sdk/google-vertex 4.0.189 → 4.0.191

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/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { z } from 'zod/v4';
2
- import { GoogleAuthOptions } from 'google-auth-library';
3
- import { GoogleInteractionsModelId, GoogleInteractionsAgentName } from '@ai-sdk/google/internal';
4
- import { EmbeddingModelV3, ProviderV3, LanguageModelV3, ImageModelV3, Experimental_VideoModelV3, TranscriptionModelV3 } from '@ai-sdk/provider';
2
+ import { TranscriptionModelV3, EmbeddingModelV3, ProviderV3, LanguageModelV3, ImageModelV3, Experimental_VideoModelV3 } from '@ai-sdk/provider';
5
3
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
6
4
  import { Resolvable, FetchFunction } from '@ai-sdk/provider-utils';
5
+ import { GoogleAuthOptions } from 'google-auth-library';
6
+ import { GoogleInteractionsModelId, GoogleInteractionsAgentName } from '@ai-sdk/google/internal';
7
7
 
8
8
  type GoogleVertexEmbeddingModelId = 'textembedding-gecko' | 'textembedding-gecko@001' | 'textembedding-gecko@003' | 'textembedding-gecko-multilingual' | 'textembedding-gecko-multilingual@001' | 'text-multilingual-embedding-002' | 'text-embedding-004' | 'text-embedding-005' | 'gemini-embedding-001' | 'gemini-embedding-2-preview' | (string & {});
9
9
  declare const googleVertexEmbeddingModelOptions: z.ZodObject<{
@@ -91,6 +91,49 @@ type GoogleVertexVideoModelOptions = {
91
91
  [key: string]: unknown;
92
92
  };
93
93
 
94
+ type GoogleVertexGeminiTranscriptionModelId = 'gemini-3.5-transcribe' | 'gemini-3.5-transcribe-live' | (string & {});
95
+ /**
96
+ * Speech recognition options for Gemini transcription models
97
+ * (`gemini-3.5-transcribe`). Maps onto Google's `AudioTranscriptionConfig`.
98
+ * The live variant (`gemini-3.5-transcribe-live`) requires streaming
99
+ * transcription, which is only available in AI SDK v7.
100
+ */
101
+ declare const googleVertexGeminiTranscriptionModelOptions: z.ZodObject<{
102
+ languageCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
103
+ customVocabulary: z.ZodOptional<z.ZodArray<z.ZodString>>;
104
+ wordTimestamp: z.ZodOptional<z.ZodBoolean>;
105
+ diarization: z.ZodOptional<z.ZodBoolean>;
106
+ mode: z.ZodOptional<z.ZodEnum<{
107
+ SMART: "SMART";
108
+ VERBATIM: "VERBATIM";
109
+ }>>;
110
+ }, z.core.$strip>;
111
+ type GoogleVertexTranscriptionModelGeminiOptions = z.infer<typeof googleVertexGeminiTranscriptionModelOptions>;
112
+
113
+ interface GoogleVertexGeminiTranscriptionModelConfig {
114
+ provider: string;
115
+ /** Regional base URL ending in `/publishers/google`. */
116
+ baseURL: string;
117
+ headers?: Resolvable<Record<string, string | undefined>>;
118
+ fetch?: FetchFunction;
119
+ _internal?: {
120
+ currentDate?: () => Date;
121
+ };
122
+ }
123
+ /**
124
+ * Gemini transcription on Vertex AI (e.g. `gemini-3.5-transcribe`) via
125
+ * `generateContent` with `generationConfig.audioTranscriptionConfig`.
126
+ */
127
+ declare class GoogleVertexGeminiTranscriptionModel implements TranscriptionModelV3 {
128
+ readonly modelId: GoogleVertexGeminiTranscriptionModelId;
129
+ private readonly config;
130
+ readonly specificationVersion = "v3";
131
+ get provider(): string;
132
+ constructor(modelId: GoogleVertexGeminiTranscriptionModelId, config: GoogleVertexGeminiTranscriptionModelConfig);
133
+ private parseOptions;
134
+ doGenerate(options: Parameters<TranscriptionModelV3['doGenerate']>[0]): Promise<Awaited<ReturnType<TranscriptionModelV3['doGenerate']>>>;
135
+ }
136
+
94
137
  interface GoogleVertexConfig {
95
138
  provider: string;
96
139
  baseURL: string;
@@ -245,4 +288,4 @@ declare const vertex: GoogleVertexProvider;
245
288
 
246
289
  declare const VERSION: string;
247
290
 
248
- export { type GoogleVertexEmbeddingModelOptions, type GoogleVertexImageModelOptions, type GoogleVertexImageModelOptions as GoogleVertexImageProviderOptions, type GoogleVertexProvider, type GoogleVertexProviderSettings, type GoogleVertexTranscriptionModelId, type GoogleVertexTranscriptionModelOptions, type GoogleVertexVideoModelId, type GoogleVertexVideoModelOptions, type GoogleVertexVideoModelOptions as GoogleVertexVideoProviderOptions, VERSION, createVertex, vertex };
291
+ export { type GoogleVertexEmbeddingModelOptions, GoogleVertexGeminiTranscriptionModel, type GoogleVertexGeminiTranscriptionModelId, type GoogleVertexImageModelOptions, type GoogleVertexImageModelOptions as GoogleVertexImageProviderOptions, type GoogleVertexProvider, type GoogleVertexProviderSettings, type GoogleVertexTranscriptionModelGeminiOptions, type GoogleVertexTranscriptionModelId, type GoogleVertexTranscriptionModelOptions, type GoogleVertexVideoModelId, type GoogleVertexVideoModelOptions, type GoogleVertexVideoModelOptions as GoogleVertexVideoProviderOptions, VERSION, createVertex, vertex };