@ai-sdk/google 4.0.88 → 4.0.90

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,37 @@
1
1
  # @ai-sdk/google
2
2
 
3
+ ## 4.0.90
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [d3bcad9]
8
+ - @ai-sdk/provider@4.0.24
9
+ - @ai-sdk/provider-utils@5.0.56
10
+
11
+ ## 4.0.89
12
+
13
+ ### Patch Changes
14
+
15
+ - fc1e19e: fix: limit jsonl rows to 64mb during batch result downloads
16
+ - 8c0e699: feat(google): preserve file search custom metadata in retrieved context grounding chunks
17
+ - 753f2e1: feat(google): add the 'gemini-nano-banana-2.1' model ID
18
+ - 268225c: feat(provider): add a portable `max` reasoning level with native provider mappings, compatibility coercions, and budget-based fallback support.
19
+
20
+ Compatibility notes:
21
+
22
+ - **TypeScript source compatibility:** Adding `max` widens `LanguageModelV4CallOptions['reasoning']` and the derived `ReasoningLevel` type. Third-party providers and consumers with exhaustive switches or `Record<ReasoningLevel, ...>` mappings must handle `max` before upgrading. Ordinary calls using existing reasoning levels remain accepted.
23
+ - **Amazon Bedrock:** Existing Nova 2 calls using portable `reasoning: 'xhigh'` now send `maxReasoningEffort: 'high'` instead of the unsupported `'max'`, and return a compatibility warning. Anthropic and OpenAI Bedrock effort mappings retain their existing `xhigh` behavior. Partial Bedrock reasoning configurations continue to preserve explicit values and derive missing fields; explicit effort/budget overrides and disabled thinking no longer emit warnings for portable mappings that are not sent.
24
+ - **Fireworks:** Existing portable `minimal` and `xhigh` calls keep their request mappings to `low` and `high`, respectively, and now return compatibility warnings in generation and streaming results. Portable `max` maps to `high` with the same warning behavior.
25
+
26
+ **Release classification:** This remains a patch changeset under the repository's explicit release policy, which uses patch releases for both fixes and features. The TypeScript source-compatibility caveat for exhaustive consumers is disclosed above. Maintainers can override this classification with a `major` label if they decide to align the provider-spec addition with a future AI SDK major release.
27
+
28
+ - Updated dependencies [fc1e19e]
29
+ - Updated dependencies [5094ebd]
30
+ - Updated dependencies [268225c]
31
+ - Updated dependencies [0af2f7c]
32
+ - @ai-sdk/provider-utils@5.0.55
33
+ - @ai-sdk/provider@4.0.23
34
+
3
35
  ## 4.0.88
4
36
 
5
37
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -13,7 +13,7 @@ declare const googleErrorDataSchema: import("@ai-sdk/provider-utils").LazySchema
13
13
  type GoogleErrorData = InferSchema<typeof googleErrorDataSchema>;
14
14
  //#endregion
15
15
  //#region src/google-language-model-options.d.ts
16
- type GoogleModelId = 'gemini-2.0-flash' | 'gemini-2.0-flash-001' | 'gemini-2.0-flash-lite' | 'gemini-2.0-flash-lite-001' | 'gemini-2.5-pro' | 'gemini-2.5-flash' | 'gemini-2.5-flash-image' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro-preview-tts' | 'gemini-2.5-flash-native-audio-latest' | 'gemini-2.5-flash-native-audio-preview-09-2025' | 'gemini-2.5-flash-native-audio-preview-12-2025' | 'gemini-2.5-computer-use-preview-10-2025' | 'gemini-3-pro-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-flash-preview' | 'gemini-3.1-pro-preview' | 'gemini-3.1-pro-preview-customtools' | 'gemini-3.1-flash-image-preview' | 'gemini-3.1-flash-lite-preview' | 'gemini-3.1-flash-tts-preview' | 'gemini-3.5-flash' | 'gemini-3.5-flash-lite' | 'gemini-3.6-flash' | 'gemini-3.7-flash' | 'gemini-3.8-flash' | 'gemini-pro-latest' | 'gemini-flash-latest' | 'gemini-flash-lite-latest' | 'deep-research-pro-preview-12-2025' | 'deep-research-max-preview-04-2026' | 'deep-research-preview-04-2026' | 'nano-banana-pro-preview' | 'aqa' | 'gemini-robotics-er-1.5-preview' | 'gemma-3-1b-it' | 'gemma-3-4b-it' | 'gemma-3n-e4b-it' | 'gemma-3n-e2b-it' | 'gemma-3-12b-it' | 'gemma-3-27b-it' | (string & {});
16
+ type GoogleModelId = 'gemini-2.0-flash' | 'gemini-2.0-flash-001' | 'gemini-2.0-flash-lite' | 'gemini-2.0-flash-lite-001' | 'gemini-2.5-pro' | 'gemini-2.5-flash' | 'gemini-2.5-flash-image' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro-preview-tts' | 'gemini-2.5-flash-native-audio-latest' | 'gemini-2.5-flash-native-audio-preview-09-2025' | 'gemini-2.5-flash-native-audio-preview-12-2025' | 'gemini-2.5-computer-use-preview-10-2025' | 'gemini-3-pro-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-flash-preview' | 'gemini-3.1-pro-preview' | 'gemini-3.1-pro-preview-customtools' | 'gemini-3.1-flash-image-preview' | 'gemini-3.1-flash-lite-preview' | 'gemini-3.1-flash-tts-preview' | 'gemini-3.5-flash' | 'gemini-3.5-flash-lite' | 'gemini-3.6-flash' | 'gemini-3.7-flash' | 'gemini-3.8-flash' | 'gemini-nano-banana-2.1' | 'gemini-pro-latest' | 'gemini-flash-latest' | 'gemini-flash-lite-latest' | 'deep-research-pro-preview-12-2025' | 'deep-research-max-preview-04-2026' | 'deep-research-preview-04-2026' | 'nano-banana-pro-preview' | 'aqa' | 'gemini-robotics-er-1.5-preview' | 'gemma-3-1b-it' | 'gemma-3-4b-it' | 'gemma-3n-e4b-it' | 'gemma-3n-e2b-it' | 'gemma-3-12b-it' | 'gemma-3-27b-it' | (string & {});
17
17
  declare const googleLanguageModelOptions: import("@ai-sdk/provider-utils").LazySchema<{
18
18
  responseModalities?: ("TEXT" | "IMAGE")[] | undefined;
19
19
  thinkingConfig?: {
@@ -143,6 +143,14 @@ declare const responseSchema: import("@ai-sdk/provider-utils").LazySchema<{
143
143
  title?: string | null | undefined;
144
144
  text?: string | null | undefined;
145
145
  fileSearchStore?: string | null | undefined;
146
+ customMetadata?: {
147
+ key: string;
148
+ stringValue?: string | null | undefined;
149
+ numericValue?: number | null | undefined;
150
+ stringListValue?: {
151
+ values?: string[] | null | undefined;
152
+ } | null | undefined;
153
+ }[] | null | undefined;
146
154
  } | null | undefined;
147
155
  maps?: {
148
156
  uri?: string | null | undefined;
@@ -342,7 +350,7 @@ type GoogleFilesUploadOptions = {
342
350
  * the two surfaces (`:generateContent` vs `/interactions`) are independent and
343
351
  * may diverge over time.
344
352
  */
345
- 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' | 'gemini-3.5-flash-lite' | 'gemini-3.6-flash' | 'gemini-3.7-flash' | 'gemini-3.8-flash' | 'lyria-3-clip-preview' | 'lyria-3-pro-preview' | (string & {});
353
+ 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' | 'gemini-3.5-flash-lite' | 'gemini-3.6-flash' | 'gemini-3.7-flash' | 'gemini-3.8-flash' | 'gemini-nano-banana-2.1' | 'lyria-3-clip-preview' | 'lyria-3-pro-preview' | (string & {});
346
354
  /**
347
355
  * Provider options for an individual video file part sent to the Gemini
348
356
  * Interactions API.
@@ -582,7 +590,7 @@ declare const googleTools: {
582
590
  };
583
591
  //#endregion
584
592
  //#region src/google-image-settings.d.ts
585
- type GoogleImageModelId = 'gemini-2.5-flash-image' | 'gemini-3-pro-image-preview' | 'gemini-3.1-flash-image-preview' | (string & {});
593
+ type GoogleImageModelId = 'gemini-2.5-flash-image' | 'gemini-3-pro-image-preview' | 'gemini-3.1-flash-image-preview' | 'gemini-nano-banana-2.1' | (string & {});
586
594
  interface GoogleImageSettings {
587
595
  /**
588
596
  * Override the maximum number of images per call (default 1)
@@ -708,6 +716,11 @@ interface GoogleProvider extends ProviderV4 {
708
716
  tools: typeof googleTools;
709
717
  }
710
718
  interface GoogleProviderSettings {
719
+ /** Settings for downloading JSON Lines batch results. */
720
+ batchResultDownloads?: {
721
+ /** Maximum UTF-8 bytes per row, excluding LF. Defaults to 64 MiB. */
722
+ maxLineBytes?: number;
723
+ };
711
724
  /**
712
725
  * Use a different URL prefix for API calls, e.g. to use proxy servers.
713
726
  * The default prefix is `https://generativelanguage.googleapis.com/v1beta`.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["DecisionModelV4","BatchV4","SpeechTranslationModelV4","RealtimeFactoryV4","RealtimeModelV4ClientSecretOptions","RealtimeModelV4ClientSecretResult","RealtimeModelV4ServerEvent","RealtimeModelV4ClientEvent","RealtimeModelV4","RealtimeModelV4SessionConfig","TranscriptionModelV4StreamOptions","SpeechTranslationModelV4StreamOptions","SpeechTranslationModelV4"],"sources":["../src/google-error.ts","../src/google-language-model-options.ts","../src/google-language-model.ts","../src/google-prompt.ts","../src/tool/google-search.ts","../src/google-image-model-options.ts","../src/google-embedding-model-options.ts","../src/google-video-model-options.ts","../src/google-video-settings.ts","../src/google-speech-model-options.ts","../src/google-files.ts","../src/interactions/google-interactions-language-model-options.ts","../src/interactions/google-interactions-provider-metadata.ts","../src/interactions/google-interactions-agent.ts","../src/google-tools.ts","../src/google-image-settings.ts","../src/transcription/google-transcription-model-options.ts","../src/speech-translation/google-speech-translation-model-options.ts","../src/google-provider.ts","../src/realtime/google-realtime-model.ts","../src/realtime/google-realtime-model-options.ts","../src/transcription/google-transcription-model.ts","../src/speech-translation/google-speech-translation-model.ts","../src/version.ts"],"mappings":";;;;cAQM,wDAAqB;;;;;;;;KAaf,kBAAkB,mBAAmB;;;KCdrC;cAmDC,6DAA0B;;;;;;;;;;;;;;;WAA1B;;;;;;;;;;;;;;;;;;;;;;;KAkOD,6BAA6B,mBAChC;;;cCy/CI,iDAAc;;;cAAd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2BR,kBAAkB,YACrB,mBAAmB;KAGT,0BAA0B,YACpC;KAGU,2BAA2B,YACrC;KAGU,qBAAqB,YAC/B;KAGU,uBAAuB,YACjC,mBAAmB;KAGT,sBAAsB,YAChC,mBAAmB;;;KCnvDT,0BAA0B;KAE1B,2BAA2B;KAE3B,qBAAqB;KAErB,uBAAuB;KAEvB,sBAAsB;UAEjB;EACf,gBAAgB;EAChB,mBAAmB;EACnB,oBAAoB;EACpB,eAAe;EACf,eAAe;EACf;EACA;EACA;;;;cC1FW,gCAA8B,EAAA;;;;;;;;;GAczC,EAAA,KAAA;KAEU,uBAAuB,EAAE,aAC5B;;;KCHG,0BAA0B,KACpC;EAGA,eAAe;;;;KCtBL;cAsBC,8DAA2B;;;;;;;;;;;;;;;;;KAkD5B,8BAA8B,mBACjC;;;KC7EG;EAEV;EACA;EAGA;EACA;EAGA,kBAAkB;IAChB;IACA;;GAGD;;;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WACA,SAAS;mBAED;UAET,oBAAoB,OAAO;;;;UAO3B,sBAAsB;IAC5B,SAAS;IACT,QAAQ;MACT;MAIG;EAKF,YAAA,SAAS,gCACT,QAAQ;EAMJ,SACJ,SAASD,qDACR,QAAQ,QAAQ,WAAWC;;;;qBCpHnB"}
1
+ {"version":3,"file":"index.d.ts","names":["DecisionModelV4","BatchV4","SpeechTranslationModelV4","RealtimeFactoryV4","RealtimeModelV4ClientSecretOptions","RealtimeModelV4ClientSecretResult","RealtimeModelV4ServerEvent","RealtimeModelV4ClientEvent","RealtimeModelV4","RealtimeModelV4SessionConfig","TranscriptionModelV4StreamOptions","SpeechTranslationModelV4StreamOptions","SpeechTranslationModelV4"],"sources":["../src/google-error.ts","../src/google-language-model-options.ts","../src/google-language-model.ts","../src/google-prompt.ts","../src/tool/google-search.ts","../src/google-image-model-options.ts","../src/google-embedding-model-options.ts","../src/google-video-model-options.ts","../src/google-video-settings.ts","../src/google-speech-model-options.ts","../src/google-files.ts","../src/interactions/google-interactions-language-model-options.ts","../src/interactions/google-interactions-provider-metadata.ts","../src/interactions/google-interactions-agent.ts","../src/google-tools.ts","../src/google-image-settings.ts","../src/transcription/google-transcription-model-options.ts","../src/speech-translation/google-speech-translation-model-options.ts","../src/google-provider.ts","../src/realtime/google-realtime-model.ts","../src/realtime/google-realtime-model-options.ts","../src/transcription/google-transcription-model.ts","../src/speech-translation/google-speech-translation-model.ts","../src/version.ts"],"mappings":";;;;cAQM,wDAAqB;;;;;;;;KAaf,kBAAkB,mBAAmB;;;KCdrC;cAoDC,6DAA0B;;;;;;;;;;;;;;;WAA1B;;;;;;;;;;;;;;;;;;;;;;;KAkOD,6BAA6B,mBAChC;;;cCqgDI,iDAAc;;;cAAd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAAA;;;;;;;;;;;;;;;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CC,0CAA6BA;EAIhC,qBACE,OAAOC,0CACN,WAAWC;EAId,mBACE,QAAQC,4CACP;;;;KChJO;KAEA;;;;;;;EAOV;;;;;IAKE;;;;;IAMA;;;;;;;;;;EAWF;;;;;;IAME;;;;;IAMA;;;;IAKA;;;;;;;;;;;EAYF;;;;UC2BQ;EACR;EACA;EACA,UAAU,WAAW;EACrB,QAAQ;EACR,YAAY;EACZ;IACE,oBAAoB;IACpB;;;qBAIS,oCAAoC;WAsBpC,SAAS;mBACD;WAtBV;UAED,oBAAoB,OAAO;;;;UAO3B,sBAAsB;IAC5B,SAAS;IACT,QAAQ;MACT;MAIG;EAKO,YAAA,SAAS,4BACD,QAAQ;UAGb;EAUR,WACJ,SAAS,WAAW,yCACnB,QAAQ,QAAQ,WAAW;EAmGxB,SACJ,SAASC,iDACR,QACD,QAAQ,WAAW,YAAY;;;;KCtKvB;EACV;EACA;EACA,eAAe;EACf,YAAY;EACZ;IACE,oBAAoB;IACpB;;;cAIS,wCAAwCE;WAC1C;WACA,SAAS;mBAED;UAET,oBAAoB,OAAO;;;;UAO3B,sBAAsB;IAC5B,SAAS;IACT,QAAQ;MACT;MAIG;EAKF,YAAA,SAAS,gCACT,QAAQ;EAMJ,SACJ,SAASD,qDACR,QAAQ,QAAQ,WAAWC;;;;qBCpHnB"}
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { Experimental_DecisionLanguageModel } from "@ai-sdk/provider-utils/exper
3
3
  import { AISDKError, InvalidArgumentError, InvalidResponseDataError, TooManyEmbeddingValuesForCallError, UnsupportedFunctionalityError } from "@ai-sdk/provider";
4
4
  import { z } from "zod/v4";
5
5
  //#region src/version.ts
6
- const VERSION = "4.0.88";
6
+ const VERSION = "4.0.90";
7
7
  //#endregion
8
8
  //#region src/google-error.ts
9
9
  const googleErrorDataSchema = lazySchema(() => zodSchema(z.object({ error: z.object({
@@ -2171,7 +2171,8 @@ function resolveGemini3ThinkingConfig({ reasoning, modelId, warnings }) {
2171
2171
  low: "low",
2172
2172
  medium: "medium",
2173
2173
  high: "high",
2174
- xhigh: "high"
2174
+ xhigh: "high",
2175
+ max: "high"
2175
2176
  },
2176
2177
  warnings
2177
2178
  });
@@ -2296,7 +2297,13 @@ const getGroundingMetadataSchema = () => z.object({
2296
2297
  uri: z.string().nullish(),
2297
2298
  title: z.string().nullish(),
2298
2299
  text: z.string().nullish(),
2299
- fileSearchStore: z.string().nullish()
2300
+ fileSearchStore: z.string().nullish(),
2301
+ customMetadata: z.array(z.object({
2302
+ key: z.string(),
2303
+ stringValue: z.string().nullish(),
2304
+ numericValue: z.number().nullish(),
2305
+ stringListValue: z.object({ values: z.array(z.string()).nullish() }).nullish()
2306
+ })).nullish()
2300
2307
  }).nullish(),
2301
2308
  maps: z.object({
2302
2309
  uri: z.string().nullish(),
@@ -2548,6 +2555,7 @@ var GoogleBatch = class {
2548
2555
  this.batchConfig = options.config;
2549
2556
  this.supportedUrls = options.supportedUrls;
2550
2557
  this.batchGenerateId = options.config.generateId ?? generateId;
2558
+ this.maxLineBytes = options.maxLineBytes;
2551
2559
  }
2552
2560
  async doStartBatch(options) {
2553
2561
  assertSupportedBatchRequests(options.requests);
@@ -2744,7 +2752,7 @@ var GoogleBatch = class {
2744
2752
  url: `${this.getBaseOrigin()}/download/v1beta/${encodedResponsesFile}:download?alt=media`,
2745
2753
  headers: await this.getHeaders(options.headers),
2746
2754
  failedResponseHandler: googleFailedResponseHandler,
2747
- successfulResponseHandler: createJsonLinesResponseHandler(googleBatchResultLineSchema),
2755
+ successfulResponseHandler: createJsonLinesResponseHandler(googleBatchResultLineSchema, { maxLineBytes: this.maxLineBytes }),
2748
2756
  abortSignal: options.abortSignal,
2749
2757
  fetch: this.batchConfig.fetch,
2750
2758
  validateUrl: false
@@ -3140,7 +3148,8 @@ const googleTools = {
3140
3148
  const googleImageModelsWithFileInputSupport = /* @__PURE__ */ new Set([
3141
3149
  "gemini-2.5-flash-image",
3142
3150
  "gemini-3-pro-image-preview",
3143
- "gemini-3.1-flash-image-preview"
3151
+ "gemini-3.1-flash-image-preview",
3152
+ "gemini-nano-banana-2.1"
3144
3153
  ]);
3145
3154
  var GoogleImageModel = class GoogleImageModel {
3146
3155
  static [WORKFLOW_SERIALIZE](model) {
@@ -8013,6 +8022,7 @@ function createGoogle(options = {}) {
8013
8022
  });
8014
8023
  const createBatch = () => new GoogleBatch({
8015
8024
  provider: `${providerName.replace(/\.generative-ai$/, "")}.batch`,
8025
+ maxLineBytes: options.batchResultDownloads?.maxLineBytes,
8016
8026
  config: languageModelConfig,
8017
8027
  supportedUrls: getSupportedUrls(void 0, false)
8018
8028
  });