@ai-sdk/google 4.0.5 → 4.0.6
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 +6 -0
- package/dist/index.js +1 -1
- package/dist/internal/index.d.ts +64 -1
- package/dist/internal/index.js +2912 -0
- package/dist/internal/index.js.map +1 -1
- package/package.json +3 -3
- package/src/internal/index.ts +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @ai-sdk/google
|
|
2
2
|
|
|
3
|
+
## 4.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d20f0dc: Add `vertex.interactions()` for the Gemini Interactions API on Vertex AI. Targets the location-scoped `.../locations/{region}/interactions` resource using the existing Vertex OAuth credentials, enabling multimodal-output models such as `gemini-omni-flash-preview` (video output) through Vertex. The `GoogleInteractionsLanguageModel` is now exported from `@ai-sdk/google/internal` for provider reuse.
|
|
8
|
+
|
|
3
9
|
## 4.0.5
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.js
CHANGED
package/dist/internal/index.d.ts
CHANGED
|
@@ -355,4 +355,67 @@ declare const googleTools: {
|
|
|
355
355
|
}, {}>;
|
|
356
356
|
};
|
|
357
357
|
|
|
358
|
-
|
|
358
|
+
/**
|
|
359
|
+
* Type-only union of Gemini model IDs that the Interactions API accepts via
|
|
360
|
+
* `model:`. Mirrors `Model` from `googleapis/js-genai`
|
|
361
|
+
* `src/interactions/resources/interactions.ts`.
|
|
362
|
+
*
|
|
363
|
+
* Kept as a separate type from `GoogleModelId` even though most IDs overlap;
|
|
364
|
+
* the two surfaces (`:generateContent` vs `/interactions`) are independent and
|
|
365
|
+
* may diverge over time.
|
|
366
|
+
*/
|
|
367
|
+
type GoogleInteractionsModelId = 'gemini-2.5-computer-use-preview-10-2025' | 'gemini-2.5-flash' | 'gemini-2.5-flash-image' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-lite-preview-09-2025' | 'gemini-2.5-flash-native-audio-preview-12-2025' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro' | 'gemini-2.5-pro-preview-tts' | 'gemini-3-flash-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-pro-preview' | 'gemini-3.1-pro-preview' | 'gemini-3.1-flash-image-preview' | 'gemini-3.1-flash-lite-preview' | 'gemini-3.1-flash-tts-preview' | 'gemini-3.5-flash' | 'lyria-3-clip-preview' | 'lyria-3-pro-preview' | (string & {});
|
|
368
|
+
|
|
369
|
+
type GoogleInteractionsConfig = {
|
|
370
|
+
provider: string;
|
|
371
|
+
baseURL: string;
|
|
372
|
+
headers?: Resolvable<Record<string, string | undefined>>;
|
|
373
|
+
fetch?: FetchFunction;
|
|
374
|
+
generateId: () => string;
|
|
375
|
+
supportedUrls?: () => LanguageModelV4['supportedUrls'];
|
|
376
|
+
};
|
|
377
|
+
type GoogleInteractionsModelInput = GoogleInteractionsModelId | {
|
|
378
|
+
agent: string;
|
|
379
|
+
} | {
|
|
380
|
+
managedAgent: string;
|
|
381
|
+
};
|
|
382
|
+
declare class GoogleInteractionsLanguageModel implements LanguageModelV4 {
|
|
383
|
+
readonly specificationVersion = "v4";
|
|
384
|
+
readonly modelId: string;
|
|
385
|
+
/**
|
|
386
|
+
* Optional agent name. When provided, the request body sends `agent:` instead
|
|
387
|
+
* of `model:` and rejects `tools` / `generation_config` (warned, not thrown).
|
|
388
|
+
*/
|
|
389
|
+
readonly agent: string | undefined;
|
|
390
|
+
private readonly config;
|
|
391
|
+
static [WORKFLOW_SERIALIZE](model: GoogleInteractionsLanguageModel): {
|
|
392
|
+
agent: string | undefined;
|
|
393
|
+
modelId: string;
|
|
394
|
+
config: _ai_sdk_provider.JSONObject;
|
|
395
|
+
};
|
|
396
|
+
static [WORKFLOW_DESERIALIZE](options: {
|
|
397
|
+
modelId: string;
|
|
398
|
+
agent?: string;
|
|
399
|
+
config: GoogleInteractionsConfig;
|
|
400
|
+
}): GoogleInteractionsLanguageModel;
|
|
401
|
+
constructor(modelOrAgent: GoogleInteractionsModelInput, config: GoogleInteractionsConfig);
|
|
402
|
+
get provider(): string;
|
|
403
|
+
get supportedUrls(): Record<string, RegExp[]> | PromiseLike<Record<string, RegExp[]>>;
|
|
404
|
+
private getArgs;
|
|
405
|
+
doGenerate(options: LanguageModelV4CallOptions): Promise<LanguageModelV4GenerateResult>;
|
|
406
|
+
doStream(options: LanguageModelV4CallOptions): Promise<LanguageModelV4StreamResult>;
|
|
407
|
+
private doStreamBackground;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Type-only module: declares the union of supported Gemini Interactions agent
|
|
412
|
+
* names. Used by the `google.interactions({ agent })` factory branch.
|
|
413
|
+
*
|
|
414
|
+
* Strict string-literal union: unknown agent names are a compile-time error.
|
|
415
|
+
* User-defined agents (created via the `/agents` endpoint) are addressed by
|
|
416
|
+
* a separate `{ managedAgent: string }` factory shape — see
|
|
417
|
+
* `GoogleInteractionsModelInput`.
|
|
418
|
+
*/
|
|
419
|
+
type GoogleInteractionsAgentName = 'deep-research-pro-preview-12-2025' | 'deep-research-preview-04-2026' | 'deep-research-max-preview-04-2026' | 'antigravity-preview-05-2026';
|
|
420
|
+
|
|
421
|
+
export { type GoogleInteractionsAgentName, GoogleInteractionsLanguageModel, type GoogleInteractionsModelId, type GoogleInteractionsModelInput, GoogleLanguageModel, type GoogleModelId, GoogleSpeechModel, type GroundingMetadataSchema, type PromptFeedbackSchema, type SafetyRatingSchema, type UrlContextMetadataSchema, type UsageMetadataSchema, getGroundingMetadataSchema, getUrlContextMetadataSchema, googleTools };
|