@ai-sdk/google-vertex 4.0.189 → 4.0.193
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 +33 -0
- package/dist/anthropic/edge/index.js +1 -1
- package/dist/anthropic/edge/index.mjs +1 -1
- package/dist/edge/index.js +280 -68
- package/dist/edge/index.js.map +1 -1
- package/dist/edge/index.mjs +266 -45
- package/dist/edge/index.mjs.map +1 -1
- package/dist/index.d.mts +47 -4
- package/dist/index.d.ts +47 -4
- package/dist/index.js +380 -166
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +377 -155
- package/dist/index.mjs.map +1 -1
- package/dist/maas/edge/index.js +1 -1
- package/dist/maas/edge/index.mjs +1 -1
- package/dist/xai/edge/index.js +1 -1
- package/dist/xai/edge/index.mjs +1 -1
- package/package.json +5 -5
- package/src/gemini-transcription/google-vertex-gemini-transcription-model-options.ts +51 -0
- package/src/gemini-transcription/google-vertex-gemini-transcription-model.ts +253 -0
- package/src/google-vertex-provider.ts +14 -0
- package/src/index.ts +5 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod/v4';
|
|
2
|
-
import {
|
|
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 };
|