@tanstack/ai-gemini 0.26.5 → 0.28.0

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.
@@ -140,6 +140,27 @@ declare const GEMINI_2_5_FLASH_LITE: {
140
140
  };
141
141
  };
142
142
  };
143
+ declare const GEMINI_3_8_FLASH: {
144
+ readonly name: "gemini-3.8-flash";
145
+ readonly max_input_tokens: 1048576;
146
+ readonly max_output_tokens: 65536;
147
+ readonly knowledge_cutoff: "2026-03-01";
148
+ readonly supports: {
149
+ readonly input: ["text", "image", "video", "audio", "document"];
150
+ readonly output: ["text"];
151
+ readonly capabilities: ["agentic_video", "batch_api", "caching", "function_calling", "structured_output", "thinking"];
152
+ readonly tools: ["code_execution", "file_search", "google_search", "google_maps", "url_context", "computer_use"];
153
+ };
154
+ readonly pricing: {
155
+ readonly input: {
156
+ readonly normal: 0.75;
157
+ readonly cached: 0.075;
158
+ };
159
+ readonly output: {
160
+ readonly normal: 3.75;
161
+ };
162
+ };
163
+ };
143
164
  declare const GEMINI_3_7_FLASH: {
144
165
  readonly name: "gemini-3.7-flash";
145
166
  readonly max_input_tokens: 1048576;
@@ -148,7 +169,7 @@ declare const GEMINI_3_7_FLASH: {
148
169
  readonly supports: {
149
170
  readonly input: ["text", "image", "video", "audio", "document"];
150
171
  readonly output: ["text"];
151
- readonly capabilities: ["batch_api", "caching", "function_calling", "structured_output", "thinking"];
172
+ readonly capabilities: ["agentic_video", "batch_api", "caching", "function_calling", "structured_output", "thinking"];
152
173
  readonly tools: ["code_execution", "file_search", "google_search", "google_maps", "url_context", "computer_use"];
153
174
  };
154
175
  readonly pricing: {
@@ -169,7 +190,7 @@ declare const GEMINI_3_6_FLASH: {
169
190
  readonly supports: {
170
191
  readonly input: ["text", "image", "video", "audio", "document"];
171
192
  readonly output: ["text"];
172
- readonly capabilities: ["batch_api", "caching", "function_calling", "structured_output", "thinking"];
193
+ readonly capabilities: ["agentic_video", "batch_api", "caching", "function_calling", "structured_output", "thinking"];
173
194
  readonly tools: ["code_execution", "file_search", "google_search", "google_maps", "url_context", "computer_use"];
174
195
  };
175
196
  readonly pricing: {
@@ -210,7 +231,7 @@ declare const GEMINI_3_5_FLASH_LITE: {
210
231
  readonly supports: {
211
232
  readonly input: ["text", "image", "video", "audio", "document"];
212
233
  readonly output: ["text"];
213
- readonly capabilities: ["batch_api", "caching", "function_calling", "structured_output", "thinking"];
234
+ readonly capabilities: ["agentic_video", "batch_api", "caching", "function_calling", "structured_output", "thinking"];
214
235
  readonly tools: ["code_execution", "file_search", "google_search", "google_maps", "url_context"];
215
236
  };
216
237
  readonly pricing: {
@@ -223,7 +244,7 @@ declare const GEMINI_3_5_FLASH_LITE: {
223
244
  };
224
245
  };
225
246
  };
226
- export declare const GEMINI_MODELS: readonly ["gemini-3.7-flash", "gemini-3.6-flash", "gemini-3.5-flash", "gemini-3.5-flash-lite", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-3.1-flash-lite", "gemini-3.1-flash-lite-preview", "gemini-2.5-pro", "gemini-2.5-flash", "gemini-2.5-flash-lite"];
247
+ export declare const GEMINI_MODELS: readonly ["gemini-3.8-flash", "gemini-3.7-flash", "gemini-3.6-flash", "gemini-3.5-flash", "gemini-3.5-flash-lite", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-3.1-flash-lite", "gemini-3.1-flash-lite-preview", "gemini-2.5-pro", "gemini-2.5-flash", "gemini-2.5-flash-lite"];
227
248
  /**
228
249
  * Gemini models that support combining `tools` + `responseSchema` in a
229
250
  * single streaming `generateContent` call (per issue #605). Per the
@@ -297,6 +318,7 @@ export type GeminiEmbeddingModelInputModalitiesByName = {
297
318
  'gemini-embedding-001': readonly ['text'];
298
319
  };
299
320
  export type GeminiChatModelProviderOptionsByName = {
321
+ [GEMINI_3_8_FLASH.name]: GeminiToolConfigOptions & GeminiSafetyOptions & GeminiCommonConfigOptions & GeminiCachedContentOptions & GeminiStructuredOutputOptions & GeminiThinkingOptions<'LOW' | 'MEDIUM' | 'HIGH'>;
300
322
  [GEMINI_3_7_FLASH.name]: GeminiToolConfigOptions & GeminiSafetyOptions & GeminiCommonConfigOptions & GeminiCachedContentOptions & GeminiStructuredOutputOptions & GeminiThinkingOptions;
301
323
  [GEMINI_3_6_FLASH.name]: GeminiToolConfigOptions & GeminiSafetyOptions & GeminiCommonConfigOptions & GeminiCachedContentOptions & GeminiStructuredOutputOptions & GeminiThinkingOptions;
302
324
  [GEMINI_3_5_FLASH.name]: GeminiToolConfigOptions & GeminiSafetyOptions & GeminiCommonConfigOptions & GeminiCachedContentOptions & GeminiStructuredOutputOptions & GeminiThinkingOptions;
@@ -314,6 +336,7 @@ export type GeminiChatModelProviderOptionsByName = {
314
336
  * Based on the 'supports.tools' arrays defined for each model.
315
337
  */
316
338
  export type GeminiChatModelToolCapabilitiesByName = {
339
+ [GEMINI_3_8_FLASH.name]: typeof GEMINI_3_8_FLASH.supports.tools;
317
340
  [GEMINI_3_7_FLASH.name]: typeof GEMINI_3_7_FLASH.supports.tools;
318
341
  [GEMINI_3_6_FLASH.name]: typeof GEMINI_3_6_FLASH.supports.tools;
319
342
  [GEMINI_3_5_FLASH.name]: typeof GEMINI_3_5_FLASH.supports.tools;
@@ -340,6 +363,7 @@ export type GeminiChatModelToolCapabilitiesByName = {
340
363
  * @see https://ai.google.dev/gemini-api/docs/document-processing
341
364
  */
342
365
  export type GeminiModelInputModalitiesByName = {
366
+ [GEMINI_3_8_FLASH.name]: typeof GEMINI_3_8_FLASH.supports.input;
343
367
  [GEMINI_3_7_FLASH.name]: typeof GEMINI_3_7_FLASH.supports.input;
344
368
  [GEMINI_3_6_FLASH.name]: typeof GEMINI_3_6_FLASH.supports.input;
345
369
  [GEMINI_3_5_FLASH.name]: typeof GEMINI_3_5_FLASH.supports.input;
@@ -641,6 +641,45 @@ var GEMINI_OMNI_FLASH_PREVIEW = {
641
641
  output: { normal: .1 }
642
642
  }
643
643
  };
644
+ var GEMINI_3_8_FLASH = {
645
+ name: "gemini-3.8-flash",
646
+ max_input_tokens: 1048576,
647
+ max_output_tokens: 65536,
648
+ knowledge_cutoff: "2026-03-01",
649
+ supports: {
650
+ input: [
651
+ "text",
652
+ "image",
653
+ "video",
654
+ "audio",
655
+ "document"
656
+ ],
657
+ output: ["text"],
658
+ capabilities: [
659
+ "agentic_video",
660
+ "batch_api",
661
+ "caching",
662
+ "function_calling",
663
+ "structured_output",
664
+ "thinking"
665
+ ],
666
+ tools: [
667
+ "code_execution",
668
+ "file_search",
669
+ "google_search",
670
+ "google_maps",
671
+ "url_context",
672
+ "computer_use"
673
+ ]
674
+ },
675
+ pricing: {
676
+ input: {
677
+ normal: .75,
678
+ cached: .075
679
+ },
680
+ output: { normal: 3.75 }
681
+ }
682
+ };
644
683
  var GEMINI_3_7_FLASH = {
645
684
  name: "gemini-3.7-flash",
646
685
  max_input_tokens: 1048576,
@@ -656,6 +695,7 @@ var GEMINI_3_7_FLASH = {
656
695
  ],
657
696
  output: ["text"],
658
697
  capabilities: [
698
+ "agentic_video",
659
699
  "batch_api",
660
700
  "caching",
661
701
  "function_calling",
@@ -694,6 +734,7 @@ var GEMINI_3_6_FLASH = {
694
734
  ],
695
735
  output: ["text"],
696
736
  capabilities: [
737
+ "agentic_video",
697
738
  "batch_api",
698
739
  "caching",
699
740
  "function_calling",
@@ -769,6 +810,7 @@ var GEMINI_3_5_FLASH_LITE = {
769
810
  ],
770
811
  output: ["text"],
771
812
  capabilities: [
813
+ "agentic_video",
772
814
  "batch_api",
773
815
  "caching",
774
816
  "function_calling",
@@ -792,6 +834,7 @@ var GEMINI_3_5_FLASH_LITE = {
792
834
  }
793
835
  };
794
836
  var GEMINI_MODELS = [
837
+ GEMINI_3_8_FLASH.name,
795
838
  GEMINI_3_7_FLASH.name,
796
839
  GEMINI_3_6_FLASH.name,
797
840
  GEMINI_3_5_FLASH.name,
@@ -812,6 +855,7 @@ var GEMINI_MODELS = [
812
855
  * brittle and keeps the engine's legacy finalization fallback.
813
856
  */
814
857
  var GEMINI_COMBINED_TOOLS_AND_SCHEMA_MODELS = /* @__PURE__ */ new Set([
858
+ GEMINI_3_8_FLASH.name,
815
859
  GEMINI_3_7_FLASH.name,
816
860
  GEMINI_3_6_FLASH.name,
817
861
  GEMINI_3_5_FLASH.name,
@@ -1 +1 @@
1
- {"version":3,"file":"model-meta.js","names":[],"sources":["../../src/model-meta.ts"],"sourcesContent":["import type {\n GeminiCachedContentOptions,\n GeminiCommonConfigOptions,\n GeminiSafetyOptions,\n GeminiStructuredOutputOptions,\n GeminiThinkingOptions,\n GeminiToolConfigOptions,\n} from './text/text-provider-options'\nimport type { GeminiEmbeddingProviderOptions } from './embedding/embedding-provider-options'\n\ninterface ModelMeta<TProviderOptions = unknown> {\n name: string\n supports: {\n input: Array<'text' | 'image' | 'audio' | 'video' | 'document'>\n output: Array<'text' | 'image' | 'audio' | 'video'>\n capabilities?: Array<\n | 'audio_generation'\n | 'batch_api'\n | 'caching'\n | 'function_calling'\n | 'live_api'\n | 'structured_output'\n | 'thinking'\n >\n tools?: Array<\n | 'code_execution'\n | 'file_search'\n | 'google_search'\n | 'google_search_retrieval'\n | 'google_maps'\n | 'url_context'\n | 'computer_use'\n >\n }\n max_input_tokens?: number\n max_output_tokens?: number\n knowledge_cutoff?: string\n pricing?: {\n input: {\n normal: number\n cached?: number\n }\n output: {\n normal: number\n }\n }\n /**\n * Type-level description of which provider options this model supports.\n */\n providerOptions?: TProviderOptions\n}\n\nconst GEMINI_3_1_PRO = {\n name: 'gemini-3.1-pro-preview',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image', 'audio', 'video', 'document'],\n output: ['text'],\n capabilities: [\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: ['code_execution', 'file_search', 'google_search', 'url_context'],\n },\n pricing: {\n input: {\n normal: 2.5,\n },\n output: {\n normal: 15,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\nconst GEMINI_3_FLASH = {\n name: 'gemini-3-flash-preview',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image', 'audio', 'video', 'document'],\n output: ['text'],\n capabilities: [\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: ['code_execution', 'file_search', 'google_search', 'url_context'],\n },\n pricing: {\n input: {\n normal: 0.5,\n },\n output: {\n normal: 3,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\n/**\n * Gemini 3 Pro Image (\"Nano Banana Pro\") — GA. Accepts the ten standard\n * aspect ratios at 1K / 2K / 4K.\n * @see https://ai.google.dev/gemini-api/docs/models/gemini-3-pro-image\n */\nconst GEMINI_3_PRO_IMAGE = {\n name: 'gemini-3-pro-image',\n max_input_tokens: 65_536,\n max_output_tokens: 32_768,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image'],\n output: ['text', 'image'],\n capabilities: ['batch_api', 'structured_output', 'thinking'],\n tools: ['google_search'],\n },\n pricing: {\n input: {\n normal: 2,\n },\n output: {\n normal: 0.134,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\n/**\n * @deprecated `gemini-3-pro-image-preview` was shut down on 2026-06-25. Use\n * the GA id `gemini-3-pro-image` instead — the preview id now 404s.\n * Kept in the model union so existing code still compiles.\n * @see https://ai.google.dev/gemini-api/docs/deprecations\n */\nconst GEMINI_3_PRO_IMAGE_PREVIEW = {\n name: 'gemini-3-pro-image-preview',\n max_input_tokens: 65_536,\n max_output_tokens: 32_768,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image'],\n output: ['text', 'image'],\n capabilities: ['batch_api', 'structured_output', 'thinking'],\n tools: ['google_search'],\n },\n pricing: {\n input: {\n normal: 2,\n },\n output: {\n normal: 0.134,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\n/**\n * Gemini 3.1 Flash Image (\"Nano Banana 2\") — GA. The only native image model\n * that accepts the four extreme banner ratios (1:4, 4:1, 1:8, 8:1) and the\n * 512 (0.5K) resolution tier.\n * @see https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-image\n */\nconst GEMINI_3_1_FLASH_IMAGE = {\n name: 'gemini-3.1-flash-image',\n max_input_tokens: 131_072,\n max_output_tokens: 32_768,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image'],\n output: ['text', 'image'],\n capabilities: ['batch_api', 'thinking'],\n tools: ['google_search'],\n },\n pricing: {\n input: {\n normal: 0.5,\n },\n output: {\n normal: 3,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiThinkingOptions\n>\n\n/**\n * @deprecated `gemini-3.1-flash-image-preview` was shut down on 2026-06-25.\n * Use the GA id `gemini-3.1-flash-image` instead — the preview id now 404s.\n * Kept in the model union so existing code still compiles.\n * @see https://ai.google.dev/gemini-api/docs/deprecations\n */\nconst GEMINI_3_1_FLASH_IMAGE_PREVIEW = {\n name: 'gemini-3.1-flash-image-preview',\n max_input_tokens: 65_536,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image'],\n output: ['text', 'image'],\n capabilities: ['batch_api', 'structured_output', 'thinking'],\n tools: ['google_search'],\n },\n pricing: {\n input: {\n normal: 0.25,\n },\n output: {\n normal: 1.5,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\n/**\n * Gemini 3.1 Flash Lite Image (\"Nano Banana 2 Lite\") — GA. 1K output only.\n * @see https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-lite-image\n */\nconst GEMINI_3_1_FLASH_LITE_IMAGE = {\n name: 'gemini-3.1-flash-lite-image',\n max_input_tokens: 65_536,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image'],\n output: ['text', 'image'],\n capabilities: ['batch_api', 'structured_output', 'thinking'],\n tools: ['google_search'],\n },\n pricing: {\n input: {\n normal: 0.25,\n },\n output: {\n normal: 1.5,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\nconst GEMINI_3_1_FLASH_LITE = {\n name: 'gemini-3.1-flash-lite',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image', 'audio', 'video', 'document'],\n output: ['text'],\n capabilities: [\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: ['code_execution', 'file_search', 'google_search', 'url_context'],\n },\n pricing: {\n input: {\n normal: 0.25,\n },\n output: {\n normal: 1.5,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\nconst GEMINI_3_1_FLASH_LITE_PREVIEW = {\n name: 'gemini-3.1-flash-lite-preview',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image', 'audio', 'video', 'document'],\n output: ['text'],\n capabilities: [\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: ['code_execution', 'file_search', 'google_search', 'url_context'],\n },\n pricing: {\n input: {\n normal: 0.25,\n },\n output: {\n normal: 1.5,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\nconst GEMINI_2_5_PRO = {\n name: 'gemini-2.5-pro',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image', 'audio', 'video', 'document'],\n output: ['text'],\n capabilities: [\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: [\n 'code_execution',\n 'file_search',\n 'google_maps',\n 'google_search',\n 'url_context',\n ],\n },\n pricing: {\n input: {\n normal: 2.5,\n },\n output: {\n normal: 15,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\nconst GEMINI_2_5_PRO_TTS = {\n name: 'gemini-2.5-pro-preview-tts',\n max_input_tokens: 8_192,\n max_output_tokens: 16_384,\n knowledge_cutoff: '2025-05-01',\n supports: {\n input: ['text'],\n output: ['audio'],\n capabilities: ['audio_generation'],\n },\n pricing: {\n input: {\n normal: 2.5,\n },\n output: {\n normal: 15,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n\nconst GEMINI_2_5_FLASH = {\n name: 'gemini-2.5-flash',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image', 'audio', 'video'],\n output: ['text'],\n capabilities: [\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: [\n 'code_execution',\n 'file_search',\n 'google_maps',\n 'google_search',\n 'url_context',\n ],\n },\n pricing: {\n input: {\n normal: 1,\n },\n output: {\n normal: 2.5,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\n/**\n * Gemini 2.5 Flash Image (\"Nano Banana\") — still GA, but documented as the\n * legacy member of the family. Google publishes no `image_size` value for it,\n * so its size type is a bare aspect ratio and the adapter sends no\n * `imageConfig.imageSize`.\n * @deprecated `gemini-2.5-flash-image` shuts down on 2026-10-02. Migrate to\n * `gemini-3.1-flash-lite-image` (cheapest successor) or\n * `gemini-3.1-flash-image`. Google's deprecations table still names the\n * already-dead `gemini-3.1-flash-image-preview` as the replacement.\n * @see https://ai.google.dev/gemini-api/docs/deprecations\n */\nconst GEMINI_2_5_FLASH_IMAGE = {\n name: 'gemini-2.5-flash-image',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2025-06-01',\n supports: {\n input: ['text', 'image'],\n output: ['text', 'image'],\n capabilities: ['batch_api', 'caching', 'structured_output'],\n tools: ['file_search'],\n },\n pricing: {\n input: {\n normal: 0.3,\n },\n output: {\n normal: 0.4,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n/**\nconst GEMINI_2_5_FLASH_LIVE = {\n name: 'gemini-2.5-flash-native-audio-preview-09-2025',\n max_input_tokens: 141_072,\n max_output_tokens: 8_192,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'audio', 'video'],\n output: ['text', 'audio'],\n capabilities: [\n 'audio_generation',\n 'file_search',\n 'function_calling',\n 'live_api',\n 'search_grounding',\n 'thinking',\n ],\n },\n pricing: {\n // todo find this info\n input: {\n normal: 0,\n },\n output: {\n normal: 0,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiGenerationConfigOptions &\n GeminiCachedContentOptions &\n GeminiThinkingOptions\n>\n*/\nconst GEMINI_2_5_FLASH_TTS = {\n name: 'gemini-2.5-flash-preview-tts',\n max_input_tokens: 8_192,\n max_output_tokens: 16_384,\n knowledge_cutoff: '2025-05-01',\n supports: {\n input: ['text'],\n output: ['audio'],\n capabilities: ['audio_generation', 'batch_api'],\n },\n pricing: {\n input: {\n normal: 1,\n },\n output: {\n normal: 2.5,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n\n/**\n * Gemini 3.1 Flash TTS Preview - latest expressive TTS model with\n * 200+ audio tags, 70+ languages, and multi-speaker dialogue support.\n * @see https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-tts-preview\n */\nconst GEMINI_3_1_FLASH_TTS = {\n name: 'gemini-3.1-flash-tts-preview',\n max_input_tokens: 32_768,\n max_output_tokens: 16_384,\n knowledge_cutoff: '2025-05-01',\n supports: {\n input: ['text'],\n output: ['audio'],\n capabilities: ['audio_generation', 'batch_api'],\n },\n pricing: {\n input: {\n normal: 0.5,\n },\n output: {\n normal: 10,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n\n/**\n * Lyria 3 Pro Preview — Google's flagship music generation model.\n * Generates full-length songs with multiple verses, choruses, and bridges.\n * Outputs MP3 or WAV at 48 kHz stereo.\n * @see https://ai.google.dev/gemini-api/docs/models/lyria-3-pro-preview\n */\nconst LYRIA_3_PRO = {\n name: 'lyria-3-pro-preview',\n max_input_tokens: 131_072,\n supports: {\n input: ['text', 'image'],\n output: ['audio'],\n capabilities: ['audio_generation'],\n },\n pricing: {\n input: {\n normal: 0,\n },\n output: {\n normal: 0,\n },\n },\n} as const satisfies ModelMeta\n\n/**\n * Lyria 3 Clip Preview — 30-second music clips in MP3 format.\n * @see https://ai.google.dev/gemini-api/docs/music-generation\n */\nconst LYRIA_3_CLIP = {\n name: 'lyria-3-clip-preview',\n max_input_tokens: 131_072,\n supports: {\n input: ['text', 'image'],\n output: ['audio'],\n capabilities: ['audio_generation'],\n },\n pricing: {\n input: {\n normal: 0,\n },\n output: {\n normal: 0,\n },\n },\n} as const satisfies ModelMeta\n\nconst GEMINI_2_5_FLASH_LITE = {\n name: 'gemini-2.5-flash-lite',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image', 'audio', 'video', 'document'],\n output: ['text'],\n capabilities: [\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: ['code_execution', 'google_maps', 'google_search', 'url_context'],\n },\n pricing: {\n input: {\n normal: 0.1,\n },\n output: {\n normal: 0.4,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\nconst IMAGEN_4_GENERATE = {\n name: 'imagen-4.0-generate-001',\n max_input_tokens: 480,\n max_output_tokens: 4,\n supports: {\n input: ['text'],\n output: ['image'],\n },\n pricing: {\n input: {\n normal: 0,\n },\n output: {\n normal: 0.4,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n\nconst IMAGEN_4_GENERATE_ULTRA = {\n name: 'imagen-4.0-ultra-generate-001',\n max_input_tokens: 480,\n max_output_tokens: 4,\n supports: {\n input: ['text'],\n output: ['image'],\n },\n pricing: {\n input: {\n normal: 0,\n },\n output: {\n normal: 0.6,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n\nconst IMAGEN_4_GENERATE_FAST = {\n name: 'imagen-4.0-fast-generate-001',\n max_input_tokens: 480,\n max_output_tokens: 4,\n supports: {\n input: ['text'],\n output: ['image'],\n },\n pricing: {\n input: {\n normal: 0,\n },\n output: {\n normal: 0.2,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n\n/**\n * Veo video generation models. Pricing is per second of generated video\n * (audio+video rate where the model supports audio).\n * @experimental Veo video generation is an experimental feature and may change.\n */\nconst VEO_3_1_PREVIEW = {\n name: 'veo-3.1-generate-preview',\n max_input_tokens: 1024,\n max_output_tokens: 1,\n supports: {\n input: ['text', 'image'],\n output: ['video', 'audio'],\n },\n pricing: {\n input: {\n normal: 0,\n },\n output: {\n normal: 0.4,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n\nconst VEO_3_1_FAST_PREVIEW = {\n name: 'veo-3.1-fast-generate-preview',\n max_input_tokens: 1024,\n max_output_tokens: 1,\n supports: {\n input: ['text', 'image'],\n output: ['video', 'audio'],\n },\n pricing: {\n input: {\n normal: 0,\n },\n output: {\n normal: 0.15,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n\nconst VEO_3_1_LITE_PREVIEW = {\n name: 'veo-3.1-lite-generate-preview',\n max_input_tokens: 1024,\n max_output_tokens: 1,\n supports: {\n input: ['text', 'image'],\n output: ['video', 'audio'],\n },\n pricing: {\n input: {\n normal: 0,\n },\n output: {\n normal: 0.05,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n\n/**\n * Gemini Omni 1.1 Flash — GA. Multimodal video generation with\n * conversational editing. Serves only the Interactions API\n * (`generateContent` rejects it), so it routes through the\n * interactions-based path of the video adapter, not Veo's\n * `:predictLongRunning` flow. Pricing is per second of generated video\n * ($0.10/sec). 360p / 720p (default) / 1080p / 4k at 24 FPS, 3–10 second\n * clips (default 10s).\n * @see https://ai.google.dev/gemini-api/docs/models/gemini-omni-flash\n * @experimental Omni video generation is an experimental feature and may change.\n */\nconst GEMINI_OMNI_1_1_FLASH = {\n name: 'gemini-omni-1.1-flash',\n max_input_tokens: 1_048_576,\n max_output_tokens: 1,\n supports: {\n input: ['text', 'image', 'video'],\n output: ['video', 'audio'],\n },\n pricing: {\n input: {\n normal: 0,\n },\n output: {\n normal: 0.1,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n\n/**\n * @deprecated `gemini-omni-flash-preview` shuts down on 2026-09-30. Use the\n * GA id `gemini-omni-1.1-flash` instead. Kept in the model union so existing\n * code still compiles until shutdown.\n * @see https://ai.google.dev/gemini-api/docs/models/gemini-omni-flash\n * @experimental Omni video generation is an experimental feature and may change.\n */\nconst GEMINI_OMNI_FLASH_PREVIEW = {\n name: 'gemini-omni-flash-preview',\n max_input_tokens: 1_048_576,\n max_output_tokens: 1,\n supports: {\n input: ['text', 'image', 'video'],\n output: ['video', 'audio'],\n },\n pricing: {\n input: {\n normal: 0,\n },\n output: {\n normal: 0.1,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n\nconst GEMINI_3_7_FLASH = {\n name: 'gemini-3.7-flash',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2026-03-01',\n supports: {\n input: ['text', 'image', 'video', 'audio', 'document'],\n output: ['text'],\n capabilities: [\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: [\n 'code_execution',\n 'file_search',\n 'google_search',\n 'google_maps',\n 'url_context',\n 'computer_use',\n ],\n },\n // Currently 50% off through the end of 2026.\n // https://ai.google.dev/gemini-api/docs/pricing#gemini-3.7-flash\n pricing: {\n input: {\n normal: 0.75,\n cached: 0.075,\n },\n output: {\n normal: 3.75,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\nconst GEMINI_3_6_FLASH = {\n name: 'gemini-3.6-flash',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2026-03-01',\n supports: {\n input: ['text', 'image', 'video', 'audio', 'document'],\n output: ['text'],\n capabilities: [\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: [\n 'code_execution',\n 'file_search',\n 'google_search',\n 'google_maps',\n 'url_context',\n 'computer_use',\n ],\n },\n pricing: {\n input: {\n normal: 1.5,\n cached: 0.15,\n },\n output: {\n normal: 7.5,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\nconst GEMINI_3_5_FLASH = {\n name: 'gemini-3.5-flash',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n supports: {\n input: ['text', 'image', 'video', 'document', 'audio'],\n output: ['text'],\n capabilities: [\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: [\n 'code_execution',\n 'file_search',\n 'google_search',\n 'google_maps',\n 'url_context',\n 'computer_use',\n ],\n },\n pricing: {\n input: {\n normal: 1.5,\n cached: 0.15,\n },\n output: {\n normal: 9,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\nconst GEMINI_3_5_FLASH_LITE = {\n name: 'gemini-3.5-flash-lite',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image', 'video', 'audio', 'document'],\n output: ['text'],\n capabilities: [\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: [\n 'code_execution',\n 'file_search',\n 'google_search',\n 'google_maps',\n 'url_context',\n ],\n },\n pricing: {\n input: {\n normal: 0.3,\n cached: 0.03,\n },\n output: {\n normal: 2.5,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\nexport const GEMINI_MODELS = [\n GEMINI_3_7_FLASH.name,\n GEMINI_3_6_FLASH.name,\n GEMINI_3_5_FLASH.name,\n GEMINI_3_5_FLASH_LITE.name,\n GEMINI_3_1_PRO.name,\n GEMINI_3_FLASH.name,\n GEMINI_3_1_FLASH_LITE.name,\n GEMINI_3_1_FLASH_LITE_PREVIEW.name,\n GEMINI_2_5_PRO.name,\n GEMINI_2_5_FLASH.name,\n GEMINI_2_5_FLASH_LITE.name,\n] as const\n\n/**\n * Gemini models that support combining `tools` + `responseSchema` in a\n * single streaming `generateContent` call (per issue #605). Per the\n * provider matrix, Gemini 3.x natively interleaves the schema-constrained\n * answer with function-calling on one pass; Gemini 2.x is unsupported /\n * brittle and keeps the engine's legacy finalization fallback.\n */\nexport const GEMINI_COMBINED_TOOLS_AND_SCHEMA_MODELS = new Set<string>([\n GEMINI_3_7_FLASH.name,\n GEMINI_3_6_FLASH.name,\n GEMINI_3_5_FLASH.name,\n GEMINI_3_5_FLASH_LITE.name,\n GEMINI_3_1_PRO.name,\n GEMINI_3_FLASH.name,\n GEMINI_3_1_FLASH_LITE.name,\n GEMINI_3_1_FLASH_LITE_PREVIEW.name,\n])\n\nexport type GeminiModels = (typeof GEMINI_MODELS)[number]\n\n/**\n * @deprecated Shut down 2026-06-25. Use `gemini-3.1-flash-image`.\n */\ntype Gemini31FlashImagePreviewModel = 'gemini-3.1-flash-image-preview'\n\n/**\n * @deprecated Shut down 2026-06-25. Use `gemini-3-pro-image`.\n */\ntype Gemini3ProImagePreviewModel = 'gemini-3-pro-image-preview'\n\nexport type GeminiImageModels =\n | Exclude<\n (typeof GEMINI_IMAGE_MODELS)[number],\n Gemini31FlashImagePreviewModel | Gemini3ProImagePreviewModel\n >\n | Gemini31FlashImagePreviewModel\n | Gemini3ProImagePreviewModel\n\n/**\n * Image generation models. GA ids come first; the trailing `-preview` ids are\n * shut-down aliases kept only so existing code keeps compiling — new code\n * should use the GA id above its alias.\n */\nexport const GEMINI_IMAGE_MODELS = [\n GEMINI_3_1_FLASH_IMAGE.name,\n GEMINI_3_1_FLASH_LITE_IMAGE.name,\n GEMINI_3_PRO_IMAGE.name,\n GEMINI_2_5_FLASH_IMAGE.name,\n IMAGEN_4_GENERATE.name,\n IMAGEN_4_GENERATE_FAST.name,\n IMAGEN_4_GENERATE_ULTRA.name,\n // Deprecated aliases — shut down 2026-06-25.\n GEMINI_3_1_FLASH_IMAGE_PREVIEW.name,\n GEMINI_3_PRO_IMAGE_PREVIEW.name,\n] as const\n\n/**\n * Text-to-speech models\n * @experimental Gemini TTS is an experimental feature and may change.\n */\nexport const GEMINI_TTS_MODELS = [\n GEMINI_3_1_FLASH_TTS.name,\n GEMINI_2_5_FLASH_TTS.name,\n GEMINI_2_5_PRO_TTS.name,\n] as const\n\n/**\n * Audio generation models (Lyria music generation).\n * @experimental Lyria music generation is an experimental feature and may change.\n */\nexport const GEMINI_AUDIO_MODELS = [\n LYRIA_3_PRO.name,\n LYRIA_3_CLIP.name,\n] as const\n\n/**\n * Available voice names for Gemini TTS\n * @see https://ai.google.dev/gemini-api/docs/speech-generation\n */\nexport const GEMINI_TTS_VOICES = [\n 'Zephyr',\n 'Puck',\n 'Charon',\n 'Kore',\n 'Fenrir',\n 'Leda',\n 'Orus',\n 'Aoede',\n 'Callirrhoe',\n 'Autonoe',\n 'Enceladus',\n 'Iapetus',\n 'Umbriel',\n 'Algieba',\n 'Despina',\n 'Erinome',\n 'Algenib',\n 'Rasalgethi',\n 'Laomedeia',\n 'Achernar',\n 'Alnilam',\n 'Schedar',\n 'Gacrux',\n 'Pulcherrima',\n 'Achird',\n 'Zubenelgenubi',\n 'Vindemiatrix',\n 'Sadachbia',\n 'Sadaltager',\n 'Sulafat',\n] as const\n\nexport type GeminiTTSVoice = (typeof GEMINI_TTS_VOICES)[number]\n\n/**\n * Video generation models. Veo models run on the long-running\n * `:predictLongRunning` flow; Gemini Omni Flash runs on the Interactions\n * API — the video adapter routes by model.\n * @experimental Video generation is an experimental feature and may change.\n */\nexport const GEMINI_VIDEO_MODELS = [\n VEO_3_1_PREVIEW.name,\n VEO_3_1_FAST_PREVIEW.name,\n VEO_3_1_LITE_PREVIEW.name,\n GEMINI_OMNI_1_1_FLASH.name,\n // Deprecated alias — shuts down 2026-09-30.\n GEMINI_OMNI_FLASH_PREVIEW.name,\n] as const\n\n/**\n * Video models served by the Interactions API rather than Veo's\n * `:predictLongRunning` operations flow. GA id first; the trailing\n * `-preview` id is a shutdown alias kept so existing code compiles.\n * @experimental Omni video generation is an experimental feature and may change.\n */\nexport const GEMINI_INTERACTIONS_VIDEO_MODELS = [\n GEMINI_OMNI_1_1_FLASH.name,\n GEMINI_OMNI_FLASH_PREVIEW.name,\n] as const\n\n/**\n * Embedding models\n */\nexport const GEMINI_EMBEDDING_MODELS = ['gemini-embedding-001'] as const\n\nexport type GeminiEmbeddingModel = (typeof GEMINI_EMBEDDING_MODELS)[number]\n\n/**\n * Type-only map from embedding model name to its provider options type.\n */\nexport type GeminiEmbeddingModelProviderOptionsByName = {\n 'gemini-embedding-001': GeminiEmbeddingProviderOptions\n}\n\n/**\n * Per-model input modalities for embedding models. Gemini embedding models\n * are text-only, so image inputs fail at compile time.\n */\nexport type GeminiEmbeddingModelInputModalitiesByName = {\n 'gemini-embedding-001': readonly ['text']\n}\n\n// Manual type map for per-model provider options\nexport type GeminiChatModelProviderOptionsByName = {\n // Models with thinking and structured output support\n [GEMINI_3_7_FLASH.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n [GEMINI_3_6_FLASH.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n [GEMINI_3_5_FLASH.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n [GEMINI_3_5_FLASH_LITE.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n [GEMINI_3_1_PRO.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n [GEMINI_3_FLASH.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n [GEMINI_3_1_FLASH_LITE.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n [GEMINI_3_1_FLASH_LITE_PREVIEW.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n [GEMINI_2_5_PRO.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n [GEMINI_2_5_FLASH.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n [GEMINI_2_5_FLASH_LITE.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n}\n\n/**\n * Type-only map from chat model name to its supported tool capabilities.\n * Based on the 'supports.tools' arrays defined for each model.\n */\nexport type GeminiChatModelToolCapabilitiesByName = {\n [GEMINI_3_7_FLASH.name]: typeof GEMINI_3_7_FLASH.supports.tools\n [GEMINI_3_6_FLASH.name]: typeof GEMINI_3_6_FLASH.supports.tools\n [GEMINI_3_5_FLASH.name]: typeof GEMINI_3_5_FLASH.supports.tools\n [GEMINI_3_5_FLASH_LITE.name]: typeof GEMINI_3_5_FLASH_LITE.supports.tools\n [GEMINI_3_1_PRO.name]: typeof GEMINI_3_1_PRO.supports.tools\n [GEMINI_3_FLASH.name]: typeof GEMINI_3_FLASH.supports.tools\n [GEMINI_3_1_FLASH_LITE.name]: typeof GEMINI_3_1_FLASH_LITE.supports.tools\n [GEMINI_3_1_FLASH_LITE_PREVIEW.name]: typeof GEMINI_3_1_FLASH_LITE_PREVIEW.supports.tools\n [GEMINI_2_5_PRO.name]: typeof GEMINI_2_5_PRO.supports.tools\n [GEMINI_2_5_FLASH.name]: typeof GEMINI_2_5_FLASH.supports.tools\n [GEMINI_2_5_FLASH_LITE.name]: typeof GEMINI_2_5_FLASH_LITE.supports.tools\n}\n\n/**\n * Type-only map from chat model name to its supported input modalities.\n * Based on the 'supports.input' arrays defined for each model.\n * Note: 'document' in the model meta is mapped to 'document' modality.\n * Used by the core AI types to constrain ContentPart types based on the selected model.\n * Note: These must be inlined as readonly arrays (not typeof) because the model\n * constants are not exported and typeof references don't work in .d.ts files\n * when consumed by external packages.\n *\n * @see https://ai.google.dev/gemini-api/docs/vision\n * @see https://ai.google.dev/gemini-api/docs/audio\n * @see https://ai.google.dev/gemini-api/docs/document-processing\n */\nexport type GeminiModelInputModalitiesByName = {\n // Models with full multimodal support (text, image, audio, video, document)\n [GEMINI_3_7_FLASH.name]: typeof GEMINI_3_7_FLASH.supports.input\n [GEMINI_3_6_FLASH.name]: typeof GEMINI_3_6_FLASH.supports.input\n [GEMINI_3_5_FLASH.name]: typeof GEMINI_3_5_FLASH.supports.input\n [GEMINI_3_5_FLASH_LITE.name]: typeof GEMINI_3_5_FLASH_LITE.supports.input\n [GEMINI_3_1_PRO.name]: typeof GEMINI_3_1_PRO.supports.input\n [GEMINI_3_FLASH.name]: typeof GEMINI_3_FLASH.supports.input\n [GEMINI_3_1_FLASH_LITE.name]: typeof GEMINI_3_1_FLASH_LITE.supports.input\n [GEMINI_3_1_FLASH_LITE_PREVIEW.name]: typeof GEMINI_3_1_FLASH_LITE_PREVIEW.supports.input\n [GEMINI_2_5_PRO.name]: typeof GEMINI_2_5_PRO.supports.input\n [GEMINI_2_5_FLASH_LITE.name]: typeof GEMINI_2_5_FLASH_LITE.supports.input\n\n // Models with text, image, audio, video (no document)\n [GEMINI_2_5_FLASH.name]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;;;;;;;AASA,IAAa,0DAA0C,IAAI,IAAY;CACrE,iBAAiB;CACjB,iBAAiB;CACjB,iBAAiB;CACjB,sBAAsB;CACtB,eAAe;CACf,eAAe;CACf,sBAAsB;CACtB,8BAA8B;AAChC,CAAC;;;;;;AA2BD,IAAa,sBAAsB;CACjC,uBAAuB;CACvB,4BAA4B;CAC5B,mBAAmB;CACnB,uBAAuB;CACvB,kBAAkB;CAClB,uBAAuB;CACvB,wBAAwB;CAExB,+BAA+B;CAC/B,2BAA2B;AAC7B;;;;;AAMA,IAAa,oBAAoB;CAC/B,qBAAqB;CACrB,qBAAqB;CACrB,mBAAmB;AACrB;;;;;AAMA,IAAa,sBAAsB,CACjC,YAAY,MACZ,aAAa,IACf;;;;;AAMA,IAAa,oBAAoB;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;AAUA,IAAa,sBAAsB;CACjC,gBAAgB;CAChB,qBAAqB;CACrB,qBAAqB;CACrB,sBAAsB;CAEtB,0BAA0B;AAC5B;;;;;;;AAQA,IAAa,mCAAmC,CAC9C,sBAAsB,MACtB,0BAA0B,IAC5B;;;;AAKA,IAAa,0BAA0B,CAAC,sBAAsB"}
1
+ {"version":3,"file":"model-meta.js","names":[],"sources":["../../src/model-meta.ts"],"sourcesContent":["import type {\n GeminiCachedContentOptions,\n GeminiCommonConfigOptions,\n GeminiSafetyOptions,\n GeminiStructuredOutputOptions,\n GeminiThinkingOptions,\n GeminiToolConfigOptions,\n} from './text/text-provider-options'\nimport type { GeminiEmbeddingProviderOptions } from './embedding/embedding-provider-options'\n\ninterface ModelMeta<TProviderOptions = unknown> {\n name: string\n supports: {\n input: Array<'text' | 'image' | 'audio' | 'video' | 'document'>\n output: Array<'text' | 'image' | 'audio' | 'video'>\n capabilities?: Array<\n | 'agentic_video'\n | 'audio_generation'\n | 'batch_api'\n | 'caching'\n | 'function_calling'\n | 'live_api'\n | 'structured_output'\n | 'thinking'\n >\n tools?: Array<\n | 'code_execution'\n | 'file_search'\n | 'google_search'\n | 'google_search_retrieval'\n | 'google_maps'\n | 'url_context'\n | 'computer_use'\n >\n }\n max_input_tokens?: number\n max_output_tokens?: number\n knowledge_cutoff?: string\n pricing?: {\n input: {\n normal: number\n cached?: number\n }\n output: {\n normal: number\n }\n }\n /**\n * Type-level description of which provider options this model supports.\n */\n providerOptions?: TProviderOptions\n}\n\nconst GEMINI_3_1_PRO = {\n name: 'gemini-3.1-pro-preview',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image', 'audio', 'video', 'document'],\n output: ['text'],\n capabilities: [\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: ['code_execution', 'file_search', 'google_search', 'url_context'],\n },\n pricing: {\n input: {\n normal: 2.5,\n },\n output: {\n normal: 15,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\nconst GEMINI_3_FLASH = {\n name: 'gemini-3-flash-preview',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image', 'audio', 'video', 'document'],\n output: ['text'],\n capabilities: [\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: ['code_execution', 'file_search', 'google_search', 'url_context'],\n },\n pricing: {\n input: {\n normal: 0.5,\n },\n output: {\n normal: 3,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\n/**\n * Gemini 3 Pro Image (\"Nano Banana Pro\") — GA. Accepts the ten standard\n * aspect ratios at 1K / 2K / 4K.\n * @see https://ai.google.dev/gemini-api/docs/models/gemini-3-pro-image\n */\nconst GEMINI_3_PRO_IMAGE = {\n name: 'gemini-3-pro-image',\n max_input_tokens: 65_536,\n max_output_tokens: 32_768,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image'],\n output: ['text', 'image'],\n capabilities: ['batch_api', 'structured_output', 'thinking'],\n tools: ['google_search'],\n },\n pricing: {\n input: {\n normal: 2,\n },\n output: {\n normal: 0.134,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\n/**\n * @deprecated `gemini-3-pro-image-preview` was shut down on 2026-06-25. Use\n * the GA id `gemini-3-pro-image` instead — the preview id now 404s.\n * Kept in the model union so existing code still compiles.\n * @see https://ai.google.dev/gemini-api/docs/deprecations\n */\nconst GEMINI_3_PRO_IMAGE_PREVIEW = {\n name: 'gemini-3-pro-image-preview',\n max_input_tokens: 65_536,\n max_output_tokens: 32_768,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image'],\n output: ['text', 'image'],\n capabilities: ['batch_api', 'structured_output', 'thinking'],\n tools: ['google_search'],\n },\n pricing: {\n input: {\n normal: 2,\n },\n output: {\n normal: 0.134,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\n/**\n * Gemini 3.1 Flash Image (\"Nano Banana 2\") — GA. The only native image model\n * that accepts the four extreme banner ratios (1:4, 4:1, 1:8, 8:1) and the\n * 512 (0.5K) resolution tier.\n * @see https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-image\n */\nconst GEMINI_3_1_FLASH_IMAGE = {\n name: 'gemini-3.1-flash-image',\n max_input_tokens: 131_072,\n max_output_tokens: 32_768,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image'],\n output: ['text', 'image'],\n capabilities: ['batch_api', 'thinking'],\n tools: ['google_search'],\n },\n pricing: {\n input: {\n normal: 0.5,\n },\n output: {\n normal: 3,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiThinkingOptions\n>\n\n/**\n * @deprecated `gemini-3.1-flash-image-preview` was shut down on 2026-06-25.\n * Use the GA id `gemini-3.1-flash-image` instead — the preview id now 404s.\n * Kept in the model union so existing code still compiles.\n * @see https://ai.google.dev/gemini-api/docs/deprecations\n */\nconst GEMINI_3_1_FLASH_IMAGE_PREVIEW = {\n name: 'gemini-3.1-flash-image-preview',\n max_input_tokens: 65_536,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image'],\n output: ['text', 'image'],\n capabilities: ['batch_api', 'structured_output', 'thinking'],\n tools: ['google_search'],\n },\n pricing: {\n input: {\n normal: 0.25,\n },\n output: {\n normal: 1.5,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\n/**\n * Gemini 3.1 Flash Lite Image (\"Nano Banana 2 Lite\") — GA. 1K output only.\n * @see https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-lite-image\n */\nconst GEMINI_3_1_FLASH_LITE_IMAGE = {\n name: 'gemini-3.1-flash-lite-image',\n max_input_tokens: 65_536,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image'],\n output: ['text', 'image'],\n capabilities: ['batch_api', 'structured_output', 'thinking'],\n tools: ['google_search'],\n },\n pricing: {\n input: {\n normal: 0.25,\n },\n output: {\n normal: 1.5,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\nconst GEMINI_3_1_FLASH_LITE = {\n name: 'gemini-3.1-flash-lite',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image', 'audio', 'video', 'document'],\n output: ['text'],\n capabilities: [\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: ['code_execution', 'file_search', 'google_search', 'url_context'],\n },\n pricing: {\n input: {\n normal: 0.25,\n },\n output: {\n normal: 1.5,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\nconst GEMINI_3_1_FLASH_LITE_PREVIEW = {\n name: 'gemini-3.1-flash-lite-preview',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image', 'audio', 'video', 'document'],\n output: ['text'],\n capabilities: [\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: ['code_execution', 'file_search', 'google_search', 'url_context'],\n },\n pricing: {\n input: {\n normal: 0.25,\n },\n output: {\n normal: 1.5,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\nconst GEMINI_2_5_PRO = {\n name: 'gemini-2.5-pro',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image', 'audio', 'video', 'document'],\n output: ['text'],\n capabilities: [\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: [\n 'code_execution',\n 'file_search',\n 'google_maps',\n 'google_search',\n 'url_context',\n ],\n },\n pricing: {\n input: {\n normal: 2.5,\n },\n output: {\n normal: 15,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\nconst GEMINI_2_5_PRO_TTS = {\n name: 'gemini-2.5-pro-preview-tts',\n max_input_tokens: 8_192,\n max_output_tokens: 16_384,\n knowledge_cutoff: '2025-05-01',\n supports: {\n input: ['text'],\n output: ['audio'],\n capabilities: ['audio_generation'],\n },\n pricing: {\n input: {\n normal: 2.5,\n },\n output: {\n normal: 15,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n\nconst GEMINI_2_5_FLASH = {\n name: 'gemini-2.5-flash',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image', 'audio', 'video'],\n output: ['text'],\n capabilities: [\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: [\n 'code_execution',\n 'file_search',\n 'google_maps',\n 'google_search',\n 'url_context',\n ],\n },\n pricing: {\n input: {\n normal: 1,\n },\n output: {\n normal: 2.5,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\n/**\n * Gemini 2.5 Flash Image (\"Nano Banana\") — still GA, but documented as the\n * legacy member of the family. Google publishes no `image_size` value for it,\n * so its size type is a bare aspect ratio and the adapter sends no\n * `imageConfig.imageSize`.\n * @deprecated `gemini-2.5-flash-image` shuts down on 2026-10-02. Migrate to\n * `gemini-3.1-flash-lite-image` (cheapest successor) or\n * `gemini-3.1-flash-image`. Google's deprecations table still names the\n * already-dead `gemini-3.1-flash-image-preview` as the replacement.\n * @see https://ai.google.dev/gemini-api/docs/deprecations\n */\nconst GEMINI_2_5_FLASH_IMAGE = {\n name: 'gemini-2.5-flash-image',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2025-06-01',\n supports: {\n input: ['text', 'image'],\n output: ['text', 'image'],\n capabilities: ['batch_api', 'caching', 'structured_output'],\n tools: ['file_search'],\n },\n pricing: {\n input: {\n normal: 0.3,\n },\n output: {\n normal: 0.4,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n/**\nconst GEMINI_2_5_FLASH_LIVE = {\n name: 'gemini-2.5-flash-native-audio-preview-09-2025',\n max_input_tokens: 141_072,\n max_output_tokens: 8_192,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'audio', 'video'],\n output: ['text', 'audio'],\n capabilities: [\n 'audio_generation',\n 'file_search',\n 'function_calling',\n 'live_api',\n 'search_grounding',\n 'thinking',\n ],\n },\n pricing: {\n // todo find this info\n input: {\n normal: 0,\n },\n output: {\n normal: 0,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiGenerationConfigOptions &\n GeminiCachedContentOptions &\n GeminiThinkingOptions\n>\n*/\nconst GEMINI_2_5_FLASH_TTS = {\n name: 'gemini-2.5-flash-preview-tts',\n max_input_tokens: 8_192,\n max_output_tokens: 16_384,\n knowledge_cutoff: '2025-05-01',\n supports: {\n input: ['text'],\n output: ['audio'],\n capabilities: ['audio_generation', 'batch_api'],\n },\n pricing: {\n input: {\n normal: 1,\n },\n output: {\n normal: 2.5,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n\n/**\n * Gemini 3.1 Flash TTS Preview - latest expressive TTS model with\n * 200+ audio tags, 70+ languages, and multi-speaker dialogue support.\n * @see https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-tts-preview\n */\nconst GEMINI_3_1_FLASH_TTS = {\n name: 'gemini-3.1-flash-tts-preview',\n max_input_tokens: 32_768,\n max_output_tokens: 16_384,\n knowledge_cutoff: '2025-05-01',\n supports: {\n input: ['text'],\n output: ['audio'],\n capabilities: ['audio_generation', 'batch_api'],\n },\n pricing: {\n input: {\n normal: 0.5,\n },\n output: {\n normal: 10,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n\n/**\n * Lyria 3 Pro Preview — Google's flagship music generation model.\n * Generates full-length songs with multiple verses, choruses, and bridges.\n * Outputs MP3 or WAV at 48 kHz stereo.\n * @see https://ai.google.dev/gemini-api/docs/models/lyria-3-pro-preview\n */\nconst LYRIA_3_PRO = {\n name: 'lyria-3-pro-preview',\n max_input_tokens: 131_072,\n supports: {\n input: ['text', 'image'],\n output: ['audio'],\n capabilities: ['audio_generation'],\n },\n pricing: {\n input: {\n normal: 0,\n },\n output: {\n normal: 0,\n },\n },\n} as const satisfies ModelMeta\n\n/**\n * Lyria 3 Clip Preview — 30-second music clips in MP3 format.\n * @see https://ai.google.dev/gemini-api/docs/music-generation\n */\nconst LYRIA_3_CLIP = {\n name: 'lyria-3-clip-preview',\n max_input_tokens: 131_072,\n supports: {\n input: ['text', 'image'],\n output: ['audio'],\n capabilities: ['audio_generation'],\n },\n pricing: {\n input: {\n normal: 0,\n },\n output: {\n normal: 0,\n },\n },\n} as const satisfies ModelMeta\n\nconst GEMINI_2_5_FLASH_LITE = {\n name: 'gemini-2.5-flash-lite',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image', 'audio', 'video', 'document'],\n output: ['text'],\n capabilities: [\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: ['code_execution', 'google_maps', 'google_search', 'url_context'],\n },\n pricing: {\n input: {\n normal: 0.1,\n },\n output: {\n normal: 0.4,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\nconst IMAGEN_4_GENERATE = {\n name: 'imagen-4.0-generate-001',\n max_input_tokens: 480,\n max_output_tokens: 4,\n supports: {\n input: ['text'],\n output: ['image'],\n },\n pricing: {\n input: {\n normal: 0,\n },\n output: {\n normal: 0.4,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n\nconst IMAGEN_4_GENERATE_ULTRA = {\n name: 'imagen-4.0-ultra-generate-001',\n max_input_tokens: 480,\n max_output_tokens: 4,\n supports: {\n input: ['text'],\n output: ['image'],\n },\n pricing: {\n input: {\n normal: 0,\n },\n output: {\n normal: 0.6,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n\nconst IMAGEN_4_GENERATE_FAST = {\n name: 'imagen-4.0-fast-generate-001',\n max_input_tokens: 480,\n max_output_tokens: 4,\n supports: {\n input: ['text'],\n output: ['image'],\n },\n pricing: {\n input: {\n normal: 0,\n },\n output: {\n normal: 0.2,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n\n/**\n * Veo video generation models. Pricing is per second of generated video\n * (audio+video rate where the model supports audio).\n * @experimental Veo video generation is an experimental feature and may change.\n */\nconst VEO_3_1_PREVIEW = {\n name: 'veo-3.1-generate-preview',\n max_input_tokens: 1024,\n max_output_tokens: 1,\n supports: {\n input: ['text', 'image'],\n output: ['video', 'audio'],\n },\n pricing: {\n input: {\n normal: 0,\n },\n output: {\n normal: 0.4,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n\nconst VEO_3_1_FAST_PREVIEW = {\n name: 'veo-3.1-fast-generate-preview',\n max_input_tokens: 1024,\n max_output_tokens: 1,\n supports: {\n input: ['text', 'image'],\n output: ['video', 'audio'],\n },\n pricing: {\n input: {\n normal: 0,\n },\n output: {\n normal: 0.15,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n\nconst VEO_3_1_LITE_PREVIEW = {\n name: 'veo-3.1-lite-generate-preview',\n max_input_tokens: 1024,\n max_output_tokens: 1,\n supports: {\n input: ['text', 'image'],\n output: ['video', 'audio'],\n },\n pricing: {\n input: {\n normal: 0,\n },\n output: {\n normal: 0.05,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n\n/**\n * Gemini Omni 1.1 Flash — GA. Multimodal video generation with\n * conversational editing. Serves only the Interactions API\n * (`generateContent` rejects it), so it routes through the\n * interactions-based path of the video adapter, not Veo's\n * `:predictLongRunning` flow. Pricing is per second of generated video\n * ($0.10/sec). 360p / 720p (default) / 1080p / 4k at 24 FPS, 3–10 second\n * clips (default 10s).\n * @see https://ai.google.dev/gemini-api/docs/models/gemini-omni-flash\n * @experimental Omni video generation is an experimental feature and may change.\n */\nconst GEMINI_OMNI_1_1_FLASH = {\n name: 'gemini-omni-1.1-flash',\n max_input_tokens: 1_048_576,\n max_output_tokens: 1,\n supports: {\n input: ['text', 'image', 'video'],\n output: ['video', 'audio'],\n },\n pricing: {\n input: {\n normal: 0,\n },\n output: {\n normal: 0.1,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n\n/**\n * @deprecated `gemini-omni-flash-preview` shuts down on 2026-09-30. Use the\n * GA id `gemini-omni-1.1-flash` instead. Kept in the model union so existing\n * code still compiles until shutdown.\n * @see https://ai.google.dev/gemini-api/docs/models/gemini-omni-flash\n * @experimental Omni video generation is an experimental feature and may change.\n */\nconst GEMINI_OMNI_FLASH_PREVIEW = {\n name: 'gemini-omni-flash-preview',\n max_input_tokens: 1_048_576,\n max_output_tokens: 1,\n supports: {\n input: ['text', 'image', 'video'],\n output: ['video', 'audio'],\n },\n pricing: {\n input: {\n normal: 0,\n },\n output: {\n normal: 0.1,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions\n>\n\nconst GEMINI_3_8_FLASH = {\n name: 'gemini-3.8-flash',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2026-03-01',\n supports: {\n input: ['text', 'image', 'video', 'audio', 'document'],\n output: ['text'],\n capabilities: [\n 'agentic_video',\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: [\n 'code_execution',\n 'file_search',\n 'google_search',\n 'google_maps',\n 'url_context',\n 'computer_use',\n ],\n },\n pricing: {\n input: {\n normal: 0.75,\n cached: 0.075,\n },\n output: {\n normal: 3.75,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions<'LOW' | 'MEDIUM' | 'HIGH'>\n>\n\nconst GEMINI_3_7_FLASH = {\n name: 'gemini-3.7-flash',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2026-03-01',\n supports: {\n input: ['text', 'image', 'video', 'audio', 'document'],\n output: ['text'],\n capabilities: [\n 'agentic_video',\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: [\n 'code_execution',\n 'file_search',\n 'google_search',\n 'google_maps',\n 'url_context',\n 'computer_use',\n ],\n },\n // Currently 50% off through the end of 2026.\n // https://ai.google.dev/gemini-api/docs/pricing#gemini-3.7-flash\n pricing: {\n input: {\n normal: 0.75,\n cached: 0.075,\n },\n output: {\n normal: 3.75,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\nconst GEMINI_3_6_FLASH = {\n name: 'gemini-3.6-flash',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2026-03-01',\n supports: {\n input: ['text', 'image', 'video', 'audio', 'document'],\n output: ['text'],\n capabilities: [\n 'agentic_video',\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: [\n 'code_execution',\n 'file_search',\n 'google_search',\n 'google_maps',\n 'url_context',\n 'computer_use',\n ],\n },\n pricing: {\n input: {\n normal: 1.5,\n cached: 0.15,\n },\n output: {\n normal: 7.5,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\nconst GEMINI_3_5_FLASH = {\n name: 'gemini-3.5-flash',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n supports: {\n input: ['text', 'image', 'video', 'document', 'audio'],\n output: ['text'],\n capabilities: [\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: [\n 'code_execution',\n 'file_search',\n 'google_search',\n 'google_maps',\n 'url_context',\n 'computer_use',\n ],\n },\n pricing: {\n input: {\n normal: 1.5,\n cached: 0.15,\n },\n output: {\n normal: 9,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\nconst GEMINI_3_5_FLASH_LITE = {\n name: 'gemini-3.5-flash-lite',\n max_input_tokens: 1_048_576,\n max_output_tokens: 65_536,\n knowledge_cutoff: '2025-01-01',\n supports: {\n input: ['text', 'image', 'video', 'audio', 'document'],\n output: ['text'],\n capabilities: [\n 'agentic_video',\n 'batch_api',\n 'caching',\n 'function_calling',\n 'structured_output',\n 'thinking',\n ],\n tools: [\n 'code_execution',\n 'file_search',\n 'google_search',\n 'google_maps',\n 'url_context',\n ],\n },\n pricing: {\n input: {\n normal: 0.3,\n cached: 0.03,\n },\n output: {\n normal: 2.5,\n },\n },\n} as const satisfies ModelMeta<\n GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n>\n\nexport const GEMINI_MODELS = [\n GEMINI_3_8_FLASH.name,\n GEMINI_3_7_FLASH.name,\n GEMINI_3_6_FLASH.name,\n GEMINI_3_5_FLASH.name,\n GEMINI_3_5_FLASH_LITE.name,\n GEMINI_3_1_PRO.name,\n GEMINI_3_FLASH.name,\n GEMINI_3_1_FLASH_LITE.name,\n GEMINI_3_1_FLASH_LITE_PREVIEW.name,\n GEMINI_2_5_PRO.name,\n GEMINI_2_5_FLASH.name,\n GEMINI_2_5_FLASH_LITE.name,\n] as const\n\n/**\n * Gemini models that support combining `tools` + `responseSchema` in a\n * single streaming `generateContent` call (per issue #605). Per the\n * provider matrix, Gemini 3.x natively interleaves the schema-constrained\n * answer with function-calling on one pass; Gemini 2.x is unsupported /\n * brittle and keeps the engine's legacy finalization fallback.\n */\nexport const GEMINI_COMBINED_TOOLS_AND_SCHEMA_MODELS = new Set<string>([\n GEMINI_3_8_FLASH.name,\n GEMINI_3_7_FLASH.name,\n GEMINI_3_6_FLASH.name,\n GEMINI_3_5_FLASH.name,\n GEMINI_3_5_FLASH_LITE.name,\n GEMINI_3_1_PRO.name,\n GEMINI_3_FLASH.name,\n GEMINI_3_1_FLASH_LITE.name,\n GEMINI_3_1_FLASH_LITE_PREVIEW.name,\n])\n\nexport type GeminiModels = (typeof GEMINI_MODELS)[number]\n\n/**\n * @deprecated Shut down 2026-06-25. Use `gemini-3.1-flash-image`.\n */\ntype Gemini31FlashImagePreviewModel = 'gemini-3.1-flash-image-preview'\n\n/**\n * @deprecated Shut down 2026-06-25. Use `gemini-3-pro-image`.\n */\ntype Gemini3ProImagePreviewModel = 'gemini-3-pro-image-preview'\n\nexport type GeminiImageModels =\n | Exclude<\n (typeof GEMINI_IMAGE_MODELS)[number],\n Gemini31FlashImagePreviewModel | Gemini3ProImagePreviewModel\n >\n | Gemini31FlashImagePreviewModel\n | Gemini3ProImagePreviewModel\n\n/**\n * Image generation models. GA ids come first; the trailing `-preview` ids are\n * shut-down aliases kept only so existing code keeps compiling — new code\n * should use the GA id above its alias.\n */\nexport const GEMINI_IMAGE_MODELS = [\n GEMINI_3_1_FLASH_IMAGE.name,\n GEMINI_3_1_FLASH_LITE_IMAGE.name,\n GEMINI_3_PRO_IMAGE.name,\n GEMINI_2_5_FLASH_IMAGE.name,\n IMAGEN_4_GENERATE.name,\n IMAGEN_4_GENERATE_FAST.name,\n IMAGEN_4_GENERATE_ULTRA.name,\n // Deprecated aliases — shut down 2026-06-25.\n GEMINI_3_1_FLASH_IMAGE_PREVIEW.name,\n GEMINI_3_PRO_IMAGE_PREVIEW.name,\n] as const\n\n/**\n * Text-to-speech models\n * @experimental Gemini TTS is an experimental feature and may change.\n */\nexport const GEMINI_TTS_MODELS = [\n GEMINI_3_1_FLASH_TTS.name,\n GEMINI_2_5_FLASH_TTS.name,\n GEMINI_2_5_PRO_TTS.name,\n] as const\n\n/**\n * Audio generation models (Lyria music generation).\n * @experimental Lyria music generation is an experimental feature and may change.\n */\nexport const GEMINI_AUDIO_MODELS = [\n LYRIA_3_PRO.name,\n LYRIA_3_CLIP.name,\n] as const\n\n/**\n * Available voice names for Gemini TTS\n * @see https://ai.google.dev/gemini-api/docs/speech-generation\n */\nexport const GEMINI_TTS_VOICES = [\n 'Zephyr',\n 'Puck',\n 'Charon',\n 'Kore',\n 'Fenrir',\n 'Leda',\n 'Orus',\n 'Aoede',\n 'Callirrhoe',\n 'Autonoe',\n 'Enceladus',\n 'Iapetus',\n 'Umbriel',\n 'Algieba',\n 'Despina',\n 'Erinome',\n 'Algenib',\n 'Rasalgethi',\n 'Laomedeia',\n 'Achernar',\n 'Alnilam',\n 'Schedar',\n 'Gacrux',\n 'Pulcherrima',\n 'Achird',\n 'Zubenelgenubi',\n 'Vindemiatrix',\n 'Sadachbia',\n 'Sadaltager',\n 'Sulafat',\n] as const\n\nexport type GeminiTTSVoice = (typeof GEMINI_TTS_VOICES)[number]\n\n/**\n * Video generation models. Veo models run on the long-running\n * `:predictLongRunning` flow; Gemini Omni Flash runs on the Interactions\n * API — the video adapter routes by model.\n * @experimental Video generation is an experimental feature and may change.\n */\nexport const GEMINI_VIDEO_MODELS = [\n VEO_3_1_PREVIEW.name,\n VEO_3_1_FAST_PREVIEW.name,\n VEO_3_1_LITE_PREVIEW.name,\n GEMINI_OMNI_1_1_FLASH.name,\n // Deprecated alias — shuts down 2026-09-30.\n GEMINI_OMNI_FLASH_PREVIEW.name,\n] as const\n\n/**\n * Video models served by the Interactions API rather than Veo's\n * `:predictLongRunning` operations flow. GA id first; the trailing\n * `-preview` id is a shutdown alias kept so existing code compiles.\n * @experimental Omni video generation is an experimental feature and may change.\n */\nexport const GEMINI_INTERACTIONS_VIDEO_MODELS = [\n GEMINI_OMNI_1_1_FLASH.name,\n GEMINI_OMNI_FLASH_PREVIEW.name,\n] as const\n\n/**\n * Embedding models\n */\nexport const GEMINI_EMBEDDING_MODELS = ['gemini-embedding-001'] as const\n\nexport type GeminiEmbeddingModel = (typeof GEMINI_EMBEDDING_MODELS)[number]\n\n/**\n * Type-only map from embedding model name to its provider options type.\n */\nexport type GeminiEmbeddingModelProviderOptionsByName = {\n 'gemini-embedding-001': GeminiEmbeddingProviderOptions\n}\n\n/**\n * Per-model input modalities for embedding models. Gemini embedding models\n * are text-only, so image inputs fail at compile time.\n */\nexport type GeminiEmbeddingModelInputModalitiesByName = {\n 'gemini-embedding-001': readonly ['text']\n}\n\n// Manual type map for per-model provider options\nexport type GeminiChatModelProviderOptionsByName = {\n // Models with thinking and structured output support\n [GEMINI_3_8_FLASH.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions<'LOW' | 'MEDIUM' | 'HIGH'>\n [GEMINI_3_7_FLASH.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n [GEMINI_3_6_FLASH.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n [GEMINI_3_5_FLASH.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n [GEMINI_3_5_FLASH_LITE.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n [GEMINI_3_1_PRO.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n [GEMINI_3_FLASH.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n [GEMINI_3_1_FLASH_LITE.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n [GEMINI_3_1_FLASH_LITE_PREVIEW.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n [GEMINI_2_5_PRO.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n [GEMINI_2_5_FLASH.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n [GEMINI_2_5_FLASH_LITE.name]: GeminiToolConfigOptions &\n GeminiSafetyOptions &\n GeminiCommonConfigOptions &\n GeminiCachedContentOptions &\n GeminiStructuredOutputOptions &\n GeminiThinkingOptions\n}\n\n/**\n * Type-only map from chat model name to its supported tool capabilities.\n * Based on the 'supports.tools' arrays defined for each model.\n */\nexport type GeminiChatModelToolCapabilitiesByName = {\n [GEMINI_3_8_FLASH.name]: typeof GEMINI_3_8_FLASH.supports.tools\n [GEMINI_3_7_FLASH.name]: typeof GEMINI_3_7_FLASH.supports.tools\n [GEMINI_3_6_FLASH.name]: typeof GEMINI_3_6_FLASH.supports.tools\n [GEMINI_3_5_FLASH.name]: typeof GEMINI_3_5_FLASH.supports.tools\n [GEMINI_3_5_FLASH_LITE.name]: typeof GEMINI_3_5_FLASH_LITE.supports.tools\n [GEMINI_3_1_PRO.name]: typeof GEMINI_3_1_PRO.supports.tools\n [GEMINI_3_FLASH.name]: typeof GEMINI_3_FLASH.supports.tools\n [GEMINI_3_1_FLASH_LITE.name]: typeof GEMINI_3_1_FLASH_LITE.supports.tools\n [GEMINI_3_1_FLASH_LITE_PREVIEW.name]: typeof GEMINI_3_1_FLASH_LITE_PREVIEW.supports.tools\n [GEMINI_2_5_PRO.name]: typeof GEMINI_2_5_PRO.supports.tools\n [GEMINI_2_5_FLASH.name]: typeof GEMINI_2_5_FLASH.supports.tools\n [GEMINI_2_5_FLASH_LITE.name]: typeof GEMINI_2_5_FLASH_LITE.supports.tools\n}\n\n/**\n * Type-only map from chat model name to its supported input modalities.\n * Based on the 'supports.input' arrays defined for each model.\n * Note: 'document' in the model meta is mapped to 'document' modality.\n * Used by the core AI types to constrain ContentPart types based on the selected model.\n * Note: These must be inlined as readonly arrays (not typeof) because the model\n * constants are not exported and typeof references don't work in .d.ts files\n * when consumed by external packages.\n *\n * @see https://ai.google.dev/gemini-api/docs/vision\n * @see https://ai.google.dev/gemini-api/docs/audio\n * @see https://ai.google.dev/gemini-api/docs/document-processing\n */\nexport type GeminiModelInputModalitiesByName = {\n // Models with full multimodal support (text, image, audio, video, document)\n [GEMINI_3_8_FLASH.name]: typeof GEMINI_3_8_FLASH.supports.input\n [GEMINI_3_7_FLASH.name]: typeof GEMINI_3_7_FLASH.supports.input\n [GEMINI_3_6_FLASH.name]: typeof GEMINI_3_6_FLASH.supports.input\n [GEMINI_3_5_FLASH.name]: typeof GEMINI_3_5_FLASH.supports.input\n [GEMINI_3_5_FLASH_LITE.name]: typeof GEMINI_3_5_FLASH_LITE.supports.input\n [GEMINI_3_1_PRO.name]: typeof GEMINI_3_1_PRO.supports.input\n [GEMINI_3_FLASH.name]: typeof GEMINI_3_FLASH.supports.input\n [GEMINI_3_1_FLASH_LITE.name]: typeof GEMINI_3_1_FLASH_LITE.supports.input\n [GEMINI_3_1_FLASH_LITE_PREVIEW.name]: typeof GEMINI_3_1_FLASH_LITE_PREVIEW.supports.input\n [GEMINI_2_5_PRO.name]: typeof GEMINI_2_5_PRO.supports.input\n [GEMINI_2_5_FLASH_LITE.name]: typeof GEMINI_2_5_FLASH_LITE.supports.input\n\n // Models with text, image, audio, video (no document)\n [GEMINI_2_5_FLASH.name]: typeof GEMINI_2_5_FLASH.supports.input\n}\n"],"mappings":";AAqDA,IAAM,iBAAiB;CACrB,MAAM;CACN,kBAAkB;CAClB,mBAAmB;CACnB,kBAAkB;CAClB,UAAU;EACR,OAAO;GAAC;GAAQ;GAAS;GAAS;GAAS;EAAU;EACrD,QAAQ,CAAC,MAAM;EACf,cAAc;GACZ;GACA;GACA;GACA;GACA;EACF;EACA,OAAO;GAAC;GAAkB;GAAe;GAAiB;EAAa;CACzE;CACA,SAAS;EACP,OAAO,EACL,QAAQ,IACV;EACA,QAAQ,EACN,QAAQ,GACV;CACF;AACF;AASA,IAAM,iBAAiB;CACrB,MAAM;CACN,kBAAkB;CAClB,mBAAmB;CACnB,kBAAkB;CAClB,UAAU;EACR,OAAO;GAAC;GAAQ;GAAS;GAAS;GAAS;EAAU;EACrD,QAAQ,CAAC,MAAM;EACf,cAAc;GACZ;GACA;GACA;GACA;GACA;EACF;EACA,OAAO;GAAC;GAAkB;GAAe;GAAiB;EAAa;CACzE;CACA,SAAS;EACP,OAAO,EACL,QAAQ,GACV;EACA,QAAQ,EACN,QAAQ,EACV;CACF;AACF;;;;;;AAcA,IAAM,qBAAqB;CACzB,MAAM;CACN,kBAAkB;CAClB,mBAAmB;CACnB,kBAAkB;CAClB,UAAU;EACR,OAAO,CAAC,QAAQ,OAAO;EACvB,QAAQ,CAAC,QAAQ,OAAO;EACxB,cAAc;GAAC;GAAa;GAAqB;EAAU;EAC3D,OAAO,CAAC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;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;AAUA,IAAa,sBAAsB;CACjC,gBAAgB;CAChB,qBAAqB;CACrB,qBAAqB;CACrB,sBAAsB;CAEtB,0BAA0B;AAC5B;;;;;;;AAQA,IAAa,mCAAmC,CAC9C,sBAAsB,MACtB,0BAA0B,IAC5B;;;;AAKA,IAAa,0BAA0B,CAAC,sBAAsB"}
@@ -166,7 +166,7 @@ export interface GeminiStructuredOutputOptions {
166
166
  */
167
167
  responseJsonSchema?: Schema;
168
168
  }
169
- export interface GeminiThinkingOptions {
169
+ export interface GeminiThinkingOptions<TThinkingLevel extends keyof typeof ThinkingLevel = keyof typeof ThinkingLevel> {
170
170
  /**
171
171
  * Config for thinking features. An error will be returned if this field is
172
172
  * set for models that don't support thinking.
@@ -190,7 +190,7 @@ export interface GeminiThinkingOptions {
190
190
  * The level of thoughts tokens that the model should generate
191
191
  * (Gemini 3.x and later).
192
192
  */
193
- thinkingLevel?: keyof typeof ThinkingLevel;
193
+ thinkingLevel?: TThinkingLevel;
194
194
  };
195
195
  }
196
196
  export type ExternalTextProviderOptions = GeminiToolConfigOptions & GeminiSafetyOptions & GeminiCommonConfigOptions & GeminiCachedContentOptions & GeminiThinkingOptions & GeminiStructuredOutputOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/ai-gemini",
3
- "version": "0.26.5",
3
+ "version": "0.28.0",
4
4
  "description": "Google Gemini adapter for TanStack AI chat, images, speech, audio generation, and structured outputs.",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -63,13 +63,13 @@
63
63
  "@tanstack/ai-utils": "^0.4.0"
64
64
  },
65
65
  "peerDependencies": {
66
- "@tanstack/ai": "^0.52.1"
66
+ "@tanstack/ai": "^0.52.2"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@vitest/coverage-v8": "4.1.10",
70
70
  "vite": "^8.2.1",
71
71
  "zod": "^4.2.0",
72
- "@tanstack/ai": "0.52.1"
72
+ "@tanstack/ai": "0.52.2"
73
73
  },
74
74
  "scripts": {
75
75
  "build": "vite build",