@ai-sdk/google 3.0.89 → 3.0.91

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.
@@ -317,4 +317,57 @@ declare const googleTools: {
317
317
  }>;
318
318
  };
319
319
 
320
- export { GoogleGenerativeAILanguageModel, type GoogleGenerativeAIModelId, type GroundingMetadataSchema, type PromptFeedbackSchema, type SafetyRatingSchema, type UrlContextMetadataSchema, type UsageMetadataSchema, getGroundingMetadataSchema, getUrlContextMetadataSchema, googleTools };
320
+ /**
321
+ * Type-only union of Gemini model IDs that the Interactions API accepts via
322
+ * `model:`. Mirrors `Model` from `googleapis/js-genai`
323
+ * `src/interactions/resources/interactions.ts`.
324
+ *
325
+ * Kept as a separate type from `GoogleModelId` even though most IDs overlap;
326
+ * the two surfaces (`:generateContent` vs `/interactions`) are independent and
327
+ * may diverge over time.
328
+ */
329
+ 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 & {});
330
+
331
+ type GoogleInteractionsConfig = {
332
+ provider: string;
333
+ baseURL: string;
334
+ headers?: Resolvable<Record<string, string | undefined>>;
335
+ fetch?: FetchFunction;
336
+ generateId: () => string;
337
+ supportedUrls?: () => LanguageModelV3['supportedUrls'];
338
+ };
339
+ type GoogleInteractionsModelInput = GoogleInteractionsModelId | {
340
+ agent: string;
341
+ } | {
342
+ managedAgent: string;
343
+ };
344
+ declare class GoogleInteractionsLanguageModel implements LanguageModelV3 {
345
+ readonly specificationVersion = "v3";
346
+ readonly modelId: string;
347
+ /**
348
+ * Optional agent name. When provided, the request body sends `agent:` instead
349
+ * of `model:` and rejects `tools` / `generation_config` (warned, not thrown).
350
+ */
351
+ readonly agent: string | undefined;
352
+ private readonly config;
353
+ constructor(modelOrAgent: GoogleInteractionsModelInput, config: GoogleInteractionsConfig);
354
+ get provider(): string;
355
+ get supportedUrls(): Record<string, RegExp[]> | PromiseLike<Record<string, RegExp[]>>;
356
+ private getArgs;
357
+ doGenerate(options: LanguageModelV3CallOptions): Promise<LanguageModelV3GenerateResult>;
358
+ doStream(options: LanguageModelV3CallOptions): Promise<LanguageModelV3StreamResult>;
359
+ private doStreamBackground;
360
+ }
361
+
362
+ /**
363
+ * Type-only module: declares the union of supported Gemini Interactions agent
364
+ * names. Used by the `google.interactions({ agent })` factory branch.
365
+ *
366
+ * Strict string-literal union: unknown agent names are a compile-time error.
367
+ * User-defined agents (created via the `/agents` endpoint) are addressed by
368
+ * a separate `{ managedAgent: string }` factory shape — see
369
+ * `GoogleInteractionsModelInput`.
370
+ */
371
+ type GoogleInteractionsAgentName = 'deep-research-pro-preview-12-2025' | 'deep-research-preview-04-2026' | 'deep-research-max-preview-04-2026' | 'antigravity-preview-05-2026';
372
+
373
+ export { GoogleGenerativeAILanguageModel, type GoogleGenerativeAIModelId, type GoogleInteractionsAgentName, GoogleInteractionsLanguageModel, type GoogleInteractionsModelId, type GoogleInteractionsModelInput, type GroundingMetadataSchema, type PromptFeedbackSchema, type SafetyRatingSchema, type UrlContextMetadataSchema, type UsageMetadataSchema, getGroundingMetadataSchema, getUrlContextMetadataSchema, googleTools };
@@ -317,4 +317,57 @@ declare const googleTools: {
317
317
  }>;
318
318
  };
319
319
 
320
- export { GoogleGenerativeAILanguageModel, type GoogleGenerativeAIModelId, type GroundingMetadataSchema, type PromptFeedbackSchema, type SafetyRatingSchema, type UrlContextMetadataSchema, type UsageMetadataSchema, getGroundingMetadataSchema, getUrlContextMetadataSchema, googleTools };
320
+ /**
321
+ * Type-only union of Gemini model IDs that the Interactions API accepts via
322
+ * `model:`. Mirrors `Model` from `googleapis/js-genai`
323
+ * `src/interactions/resources/interactions.ts`.
324
+ *
325
+ * Kept as a separate type from `GoogleModelId` even though most IDs overlap;
326
+ * the two surfaces (`:generateContent` vs `/interactions`) are independent and
327
+ * may diverge over time.
328
+ */
329
+ 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 & {});
330
+
331
+ type GoogleInteractionsConfig = {
332
+ provider: string;
333
+ baseURL: string;
334
+ headers?: Resolvable<Record<string, string | undefined>>;
335
+ fetch?: FetchFunction;
336
+ generateId: () => string;
337
+ supportedUrls?: () => LanguageModelV3['supportedUrls'];
338
+ };
339
+ type GoogleInteractionsModelInput = GoogleInteractionsModelId | {
340
+ agent: string;
341
+ } | {
342
+ managedAgent: string;
343
+ };
344
+ declare class GoogleInteractionsLanguageModel implements LanguageModelV3 {
345
+ readonly specificationVersion = "v3";
346
+ readonly modelId: string;
347
+ /**
348
+ * Optional agent name. When provided, the request body sends `agent:` instead
349
+ * of `model:` and rejects `tools` / `generation_config` (warned, not thrown).
350
+ */
351
+ readonly agent: string | undefined;
352
+ private readonly config;
353
+ constructor(modelOrAgent: GoogleInteractionsModelInput, config: GoogleInteractionsConfig);
354
+ get provider(): string;
355
+ get supportedUrls(): Record<string, RegExp[]> | PromiseLike<Record<string, RegExp[]>>;
356
+ private getArgs;
357
+ doGenerate(options: LanguageModelV3CallOptions): Promise<LanguageModelV3GenerateResult>;
358
+ doStream(options: LanguageModelV3CallOptions): Promise<LanguageModelV3StreamResult>;
359
+ private doStreamBackground;
360
+ }
361
+
362
+ /**
363
+ * Type-only module: declares the union of supported Gemini Interactions agent
364
+ * names. Used by the `google.interactions({ agent })` factory branch.
365
+ *
366
+ * Strict string-literal union: unknown agent names are a compile-time error.
367
+ * User-defined agents (created via the `/agents` endpoint) are addressed by
368
+ * a separate `{ managedAgent: string }` factory shape — see
369
+ * `GoogleInteractionsModelInput`.
370
+ */
371
+ type GoogleInteractionsAgentName = 'deep-research-pro-preview-12-2025' | 'deep-research-preview-04-2026' | 'deep-research-max-preview-04-2026' | 'antigravity-preview-05-2026';
372
+
373
+ export { GoogleGenerativeAILanguageModel, type GoogleGenerativeAIModelId, type GoogleInteractionsAgentName, GoogleInteractionsLanguageModel, type GoogleInteractionsModelId, type GoogleInteractionsModelInput, type GroundingMetadataSchema, type PromptFeedbackSchema, type SafetyRatingSchema, type UrlContextMetadataSchema, type UsageMetadataSchema, getGroundingMetadataSchema, getUrlContextMetadataSchema, googleTools };