Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

model-meta.ts

1,457 lines37.6 KB

1import type { Modality, ModelReasoning } from '@tanstack/ai'
2import type { ModelReasoningCapability } from '@tanstack/ai/adapter-internals'
3import type {
4 GeminiCachedContentOptions,
5 GeminiCommonConfigOptions,
6 GeminiSafetyOptions,
7 GeminiStructuredOutputOptions,
8 GeminiToolConfigOptions,
9} from './text/text-provider-options'
10import type { GeminiEmbeddingProviderOptions } from './embedding/embedding-provider-options'
11​
12// Reasoning shapes: the levels a model has for `chat({ reasoning })`, and
13// the provider value to send for each. Each model points at one of them.
14const BUDGET_MINIMAL_TO_HIGH = {
15 levels: { minimal: 'minimal', low: 'low', medium: 'medium', high: 'high' },
16 budget: true,
17} as const
18const BUDGET_OFF_HIGH = {
19 levels: { off: 'off', high: 'high' },
20 budget: true,
21} as const
22const EFFORT_LOW_TO_HIGH = {
23 levels: { low: 'low', medium: 'medium', high: 'high' },
24 budget: false,
25} as const
26const EFFORT_MINIMAL_TO_HIGH = {
27 levels: { minimal: 'minimal', low: 'low', medium: 'medium', high: 'high' },
28 budget: false,
29} as const
30​
31interface ModelMeta<TProviderOptions = unknown> {
32 name: string
33 supports: {
34 input: Array<'text' | 'image' | 'audio' | 'video' | 'document'>
35 output: Array<'text' | 'image' | 'audio' | 'video'>
36 capabilities?: Array<
37 | 'agentic_video'
38 | 'audio_generation'
39 | 'batch_api'
40 | 'caching'
41 | 'function_calling'
42 | 'live_api'
43 | 'structured_output'
44 | 'thinking'
45 >
46 tools?: Array<
47 | 'code_execution'
48 | 'file_search'
49 | 'google_search'
50 | 'google_search_retrieval'
51 | 'google_maps'
52 | 'url_context'
53 | 'computer_use'
54 >
55 }
56 max_input_tokens?: number
57 max_output_tokens?: number
58 knowledge_cutoff?: string
59 pricing?: {
60 input: {
61 normal: number
62 cached?: number
63 }
64 output: {
65 normal: number
66 }
67 }
68 /**
69 * Type-level description of which provider options this model supports.
70 */
71 providerOptions?: TProviderOptions
72 /** The model's data for `chat({ reasoning })`. None: it does not reason. */
73 reasoning?: ModelReasoning
75​
76const GEMINI_3_1_PRO = {
77 name: 'gemini-3.1-pro-preview',
78 max_input_tokens: 1_048_576,
79 max_output_tokens: 65_536,
80 knowledge_cutoff: '2025-01-01',
81 supports: {
82 input: ['text', 'image', 'audio', 'video', 'document'],
83 output: ['text'],
84 capabilities: [
85 'batch_api',
86 'caching',
87 'function_calling',
88 'structured_output',
89 'thinking',
90 ],
91 tools: ['code_execution', 'file_search', 'google_search', 'url_context'],
92 },
93 pricing: {
94 input: {
95 normal: 2.5,
96 },
97 output: {
98 normal: 15,
99 },
100 },
101 reasoning: EFFORT_LOW_TO_HIGH,
102} as const satisfies ModelMeta<
103 GeminiToolConfigOptions &
104 GeminiSafetyOptions &
105 GeminiCommonConfigOptions &
106 GeminiCachedContentOptions &
107 GeminiStructuredOutputOptions
109​
110const GEMINI_3_FLASH = {
111 name: 'gemini-3-flash-preview',
112 max_input_tokens: 1_048_576,
113 max_output_tokens: 65_536,
114 knowledge_cutoff: '2025-01-01',
115 supports: {
116 input: ['text', 'image', 'audio', 'video', 'document'],
117 output: ['text'],
118 capabilities: [
119 'batch_api',
120 'caching',
121 'function_calling',
122 'structured_output',
123 'thinking',
124 ],
125 tools: ['code_execution', 'file_search', 'google_search', 'url_context'],
126 },
127 pricing: {
128 input: {
129 normal: 0.5,
130 },
131 output: {
132 normal: 3,
133 },
134 },
135 reasoning: EFFORT_MINIMAL_TO_HIGH,
136} as const satisfies ModelMeta<
137 GeminiToolConfigOptions &
138 GeminiSafetyOptions &
139 GeminiCommonConfigOptions &
140 GeminiCachedContentOptions &
141 GeminiStructuredOutputOptions
143​
144/**
145 * Gemini 3 Pro Image ("Nano Banana Pro") — GA. Accepts the ten standard
146 * aspect ratios at 1K / 2K / 4K.
147 * @see https://ai.google.dev/gemini-api/docs/models/gemini-3-pro-image
148 */
149const GEMINI_3_PRO_IMAGE = {
150 name: 'gemini-3-pro-image',
151 max_input_tokens: 65_536,
152 max_output_tokens: 32_768,
153 knowledge_cutoff: '2025-01-01',
154 supports: {
155 input: ['text', 'image'],
156 output: ['text', 'image'],
157 capabilities: ['batch_api', 'structured_output', 'thinking'],
158 tools: ['google_search'],
159 },
160 pricing: {
161 input: {
162 normal: 2,
163 },
164 output: {
165 normal: 0.134,
166 },
167 },
168} as const satisfies ModelMeta<
169 GeminiToolConfigOptions &
170 GeminiSafetyOptions &
171 GeminiCommonConfigOptions &
172 GeminiCachedContentOptions &
173 GeminiStructuredOutputOptions
175​
176/**
177 * @deprecated `gemini-3-pro-image-preview` was shut down on 2026-06-25. Use
178 * the GA id `gemini-3-pro-image` instead — the preview id now 404s.
179 * Kept in the model union so existing code still compiles.
180 * @see https://ai.google.dev/gemini-api/docs/deprecations
181 */
182const GEMINI_3_PRO_IMAGE_PREVIEW = {
183 name: 'gemini-3-pro-image-preview',
184 max_input_tokens: 65_536,
185 max_output_tokens: 32_768,
186 knowledge_cutoff: '2025-01-01',
187 supports: {
188 input: ['text', 'image'],
189 output: ['text', 'image'],
190 capabilities: ['batch_api', 'structured_output', 'thinking'],
191 tools: ['google_search'],
192 },
193 pricing: {
194 input: {
195 normal: 2,
196 },
197 output: {
198 normal: 0.134,
199 },
200 },
201} as const satisfies ModelMeta<
202 GeminiToolConfigOptions &
203 GeminiSafetyOptions &
204 GeminiCommonConfigOptions &
205 GeminiCachedContentOptions &
206 GeminiStructuredOutputOptions
208​
209/**
210 * Gemini 3.1 Flash Image ("Nano Banana 2") — GA. The only native image model
211 * that accepts the four extreme banner ratios (1:4, 4:1, 1:8, 8:1) and the
212 * 512 (0.5K) resolution tier.
213 * @see https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-image
214 */
215const GEMINI_3_1_FLASH_IMAGE = {
216 name: 'gemini-3.1-flash-image',
217 max_input_tokens: 131_072,
218 max_output_tokens: 32_768,
219 knowledge_cutoff: '2025-01-01',
220 supports: {
221 input: ['text', 'image'],
222 output: ['text', 'image'],
223 capabilities: ['batch_api', 'thinking'],
224 tools: ['google_search'],
225 },
226 pricing: {
227 input: {
228 normal: 0.5,
229 },
230 output: {
231 normal: 3,
232 },
233 },
234} as const satisfies ModelMeta<
235 GeminiToolConfigOptions &
236 GeminiSafetyOptions &
237 GeminiCommonConfigOptions &
238 GeminiCachedContentOptions
240​
241/**
242 * @deprecated `gemini-3.1-flash-image-preview` was shut down on 2026-06-25.
243 * Use the GA id `gemini-3.1-flash-image` instead — the preview id now 404s.
244 * Kept in the model union so existing code still compiles.
245 * @see https://ai.google.dev/gemini-api/docs/deprecations
246 */
247const GEMINI_3_1_FLASH_IMAGE_PREVIEW = {
248 name: 'gemini-3.1-flash-image-preview',
249 max_input_tokens: 65_536,
250 max_output_tokens: 65_536,
251 knowledge_cutoff: '2025-01-01',
252 supports: {
253 input: ['text', 'image'],
254 output: ['text', 'image'],
255 capabilities: ['batch_api', 'structured_output', 'thinking'],
256 tools: ['google_search'],
257 },
258 pricing: {
259 input: {
260 normal: 0.25,
261 },
262 output: {
263 normal: 1.5,
264 },
265 },
266} as const satisfies ModelMeta<
267 GeminiToolConfigOptions &
268 GeminiSafetyOptions &
269 GeminiCommonConfigOptions &
270 GeminiCachedContentOptions &
271 GeminiStructuredOutputOptions
273​
274/**
275 * Gemini 3.1 Flash Lite Image ("Nano Banana 2 Lite") — GA. 1K output only.
276 * @see https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-lite-image
277 */
278const GEMINI_3_1_FLASH_LITE_IMAGE = {
279 name: 'gemini-3.1-flash-lite-image',
280 max_input_tokens: 65_536,
281 max_output_tokens: 65_536,
282 knowledge_cutoff: '2025-01-01',
283 supports: {
284 input: ['text', 'image'],
285 output: ['text', 'image'],
286 capabilities: ['batch_api', 'structured_output', 'thinking'],
287 tools: ['google_search'],
288 },
289 pricing: {
290 input: {
291 normal: 0.25,
292 },
293 output: {
294 normal: 1.5,
295 },
296 },
297} as const satisfies ModelMeta<
298 GeminiToolConfigOptions &
299 GeminiSafetyOptions &
300 GeminiCommonConfigOptions &
301 GeminiCachedContentOptions &
302 GeminiStructuredOutputOptions
304​
305/**
306 * Nano Banana 2.1 — GA. 1K / 2K / 4K output, no 512 tier. The id does not
307 * follow the `gemini-<version>-flash-image` pattern of the earlier models.
308 * Token limits are the values `GET /v1beta/models` returns.
309 * @see https://ai.google.dev/gemini-api/docs/models/gemini-nano-banana-2.1
310 */
311const GEMINI_NANO_BANANA_2_1 = {
312 name: 'gemini-nano-banana-2.1',
313 max_input_tokens: 65_536,
314 max_output_tokens: 65_536,
315 supports: {
316 input: ['text', 'image'],
317 output: ['text', 'image'],
318 capabilities: ['batch_api', 'thinking'],
319 tools: ['google_search'],
320 },
321 pricing: {
322 input: {
323 normal: 1.5,
324 },
325 output: {
326 normal: 7.5,
327 },
328 },
329} as const satisfies ModelMeta<
330 GeminiToolConfigOptions &
331 GeminiSafetyOptions &
332 GeminiCommonConfigOptions &
333 GeminiCachedContentOptions
335​
336const GEMINI_3_1_FLASH_LITE = {
337 name: 'gemini-3.1-flash-lite',
338 max_input_tokens: 1_048_576,
339 max_output_tokens: 65_536,
340 knowledge_cutoff: '2025-01-01',
341 supports: {
342 input: ['text', 'image', 'audio', 'video', 'document'],
343 output: ['text'],
344 capabilities: [
345 'batch_api',
346 'caching',
347 'function_calling',
348 'structured_output',
349 'thinking',
350 ],
351 tools: ['code_execution', 'file_search', 'google_search', 'url_context'],
352 },
353 pricing: {
354 input: {
355 normal: 0.25,
356 },
357 output: {
358 normal: 1.5,
359 },
360 },
361 reasoning: EFFORT_MINIMAL_TO_HIGH,
362} as const satisfies ModelMeta<
363 GeminiToolConfigOptions &
364 GeminiSafetyOptions &
365 GeminiCommonConfigOptions &
366 GeminiCachedContentOptions &
367 GeminiStructuredOutputOptions
369​
370const GEMINI_3_1_FLASH_LITE_PREVIEW = {
371 name: 'gemini-3.1-flash-lite-preview',
372 max_input_tokens: 1_048_576,
373 max_output_tokens: 65_536,
374 knowledge_cutoff: '2025-01-01',
375 supports: {
376 input: ['text', 'image', 'audio', 'video', 'document'],
377 output: ['text'],
378 capabilities: [
379 'batch_api',
380 'caching',
381 'function_calling',
382 'structured_output',
383 'thinking',
384 ],
385 tools: ['code_execution', 'file_search', 'google_search', 'url_context'],
386 },
387 pricing: {
388 input: {
389 normal: 0.25,
390 },
391 output: {
392 normal: 1.5,
393 },
394 },
395 reasoning: EFFORT_MINIMAL_TO_HIGH,
396} as const satisfies ModelMeta<
397 GeminiToolConfigOptions &
398 GeminiSafetyOptions &
399 GeminiCommonConfigOptions &
400 GeminiCachedContentOptions &
401 GeminiStructuredOutputOptions
403​
404const GEMINI_2_5_PRO = {
405 name: 'gemini-2.5-pro',
406 max_input_tokens: 1_048_576,
407 max_output_tokens: 65_536,
408 knowledge_cutoff: '2025-01-01',
409 supports: {
410 input: ['text', 'image', 'audio', 'video', 'document'],
411 output: ['text'],
412 capabilities: [
413 'batch_api',
414 'caching',
415 'function_calling',
416 'structured_output',
417 'thinking',
418 ],
419 tools: [
420 'code_execution',
421 'file_search',
422 'google_maps',
423 'google_search',
424 'url_context',
425 ],
426 },
427 pricing: {
428 input: {
429 normal: 2.5,
430 },
431 output: {
432 normal: 15,
433 },
434 },
435 reasoning: BUDGET_MINIMAL_TO_HIGH,
436} as const satisfies ModelMeta<
437 GeminiToolConfigOptions &
438 GeminiSafetyOptions &
439 GeminiCommonConfigOptions &
440 GeminiCachedContentOptions &
441 GeminiStructuredOutputOptions
443​
444const GEMINI_2_5_PRO_TTS = {
445 name: 'gemini-2.5-pro-preview-tts',
446 max_input_tokens: 8_192,
447 max_output_tokens: 16_384,
448 knowledge_cutoff: '2025-05-01',
449 supports: {
450 input: ['text'],
451 output: ['audio'],
452 capabilities: ['audio_generation'],
453 },
454 pricing: {
455 input: {
456 normal: 2.5,
457 },
458 output: {
459 normal: 15,
460 },
461 },
462} as const satisfies ModelMeta<
463 GeminiToolConfigOptions &
464 GeminiSafetyOptions &
465 GeminiCommonConfigOptions &
466 GeminiCachedContentOptions
468​
469const GEMINI_2_5_FLASH = {
470 name: 'gemini-2.5-flash',
471 max_input_tokens: 1_048_576,
472 max_output_tokens: 65_536,
473 knowledge_cutoff: '2025-01-01',
474 supports: {
475 input: ['text', 'image', 'audio', 'video'],
476 output: ['text'],
477 capabilities: [
478 'batch_api',
479 'caching',
480 'function_calling',
481 'structured_output',
482 'thinking',
483 ],
484 tools: [
485 'code_execution',
486 'file_search',
487 'google_maps',
488 'google_search',
489 'url_context',
490 ],
491 },
492 pricing: {
493 input: {
494 normal: 1,
495 },
496 output: {
497 normal: 2.5,
498 },
499 },
500 reasoning: BUDGET_OFF_HIGH,
501} as const satisfies ModelMeta<
502 GeminiToolConfigOptions &
503 GeminiSafetyOptions &
504 GeminiCommonConfigOptions &
505 GeminiCachedContentOptions &
506 GeminiStructuredOutputOptions
508​
509/**
510 * Gemini 2.5 Flash Image ("Nano Banana") — still GA, but documented as the
511 * legacy member of the family. Google publishes no `image_size` value for it,
512 * so its size type is a bare aspect ratio and the adapter sends no
513 * `imageConfig.imageSize`.
514 * @deprecated `gemini-2.5-flash-image` shuts down on 2026-10-02. Migrate to
515 * `gemini-3.1-flash-lite-image` (cheapest successor) or
516 * `gemini-3.1-flash-image`. Google's deprecations table still names the
517 * already-dead `gemini-3.1-flash-image-preview` as the replacement.
518 * @see https://ai.google.dev/gemini-api/docs/deprecations
519 */
520const GEMINI_2_5_FLASH_IMAGE = {
521 name: 'gemini-2.5-flash-image',
522 max_input_tokens: 1_048_576,
523 max_output_tokens: 65_536,
524 knowledge_cutoff: '2025-06-01',
525 supports: {
526 input: ['text', 'image'],
527 output: ['text', 'image'],
528 capabilities: ['batch_api', 'caching', 'structured_output'],
529 tools: ['file_search'],
530 },
531 pricing: {
532 input: {
533 normal: 0.3,
534 },
535 output: {
536 normal: 0.4,
537 },
538 },
539} as const satisfies ModelMeta<
540 GeminiToolConfigOptions &
541 GeminiSafetyOptions &
542 GeminiCommonConfigOptions &
543 GeminiCachedContentOptions
545/**
546const GEMINI_2_5_FLASH_LIVE = {
547 name: 'gemini-2.5-flash-native-audio-preview-09-2025',
548 max_input_tokens: 141_072,
549 max_output_tokens: 8_192,
550 knowledge_cutoff: '2025-01-01',
551 supports: {
552 input: ['text', 'audio', 'video'],
553 output: ['text', 'audio'],
554 capabilities: [
555 'audio_generation',
556 'file_search',
557 'function_calling',
558 'live_api',
559 'search_grounding',
560 'thinking',
561 ],
562 },
563 pricing: {
564 // todo find this info
565 input: {
566 normal: 0,
567 },
568 output: {
569 normal: 0,
570 },
571 },
572} as const satisfies ModelMeta<
573 GeminiToolConfigOptions &
574 GeminiSafetyOptions &
575 GeminiGenerationConfigOptions &
576 GeminiCachedContentOptions
578*/
579const GEMINI_2_5_FLASH_TTS = {
580 name: 'gemini-2.5-flash-preview-tts',
581 max_input_tokens: 8_192,
582 max_output_tokens: 16_384,
583 knowledge_cutoff: '2025-05-01',
584 supports: {
585 input: ['text'],
586 output: ['audio'],
587 capabilities: ['audio_generation', 'batch_api'],
588 },
589 pricing: {
590 input: {
591 normal: 1,
592 },
593 output: {
594 normal: 2.5,
595 },
596 },
597} as const satisfies ModelMeta<
598 GeminiToolConfigOptions &
599 GeminiSafetyOptions &
600 GeminiCommonConfigOptions &
601 GeminiCachedContentOptions
603​
604/**
605 * Gemini 3.1 Flash TTS Preview - latest expressive TTS model with
606 * 200+ audio tags, 70+ languages, and multi-speaker dialogue support.
607 * @see https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-tts-preview
608 */
609const GEMINI_3_1_FLASH_TTS = {
610 name: 'gemini-3.1-flash-tts-preview',
611 max_input_tokens: 32_768,
612 max_output_tokens: 16_384,
613 knowledge_cutoff: '2025-05-01',
614 supports: {
615 input: ['text'],
616 output: ['audio'],
617 capabilities: ['audio_generation', 'batch_api'],
618 },
619 pricing: {
620 input: {
621 normal: 0.5,
622 },
623 output: {
624 normal: 10,
625 },
626 },
627} as const satisfies ModelMeta<
628 GeminiToolConfigOptions &
629 GeminiSafetyOptions &
630 GeminiCommonConfigOptions &
631 GeminiCachedContentOptions
633​
634/**
635 * Lyria 3 Pro Preview — Google's flagship music generation model.
636 * Generates full-length songs with multiple verses, choruses, and bridges.
637 * Outputs MP3 or WAV at 48 kHz stereo.
638 * @see https://ai.google.dev/gemini-api/docs/models/lyria-3-pro-preview
639 */
640const LYRIA_3_PRO = {
641 name: 'lyria-3-pro-preview',
642 max_input_tokens: 131_072,
643 supports: {
644 input: ['text', 'image'],
645 output: ['audio'],
646 capabilities: ['audio_generation'],
647 },
648 pricing: {
649 input: {
650 normal: 0,
651 },
652 output: {
653 normal: 0,
654 },
655 },
656} as const satisfies ModelMeta
657​
658/**
659 * Lyria 3 Clip Preview — 30-second music clips in MP3 format.
660 * @see https://ai.google.dev/gemini-api/docs/music-generation
661 */
662const LYRIA_3_CLIP = {
663 name: 'lyria-3-clip-preview',
664 max_input_tokens: 131_072,
665 supports: {
666 input: ['text', 'image'],
667 output: ['audio'],
668 capabilities: ['audio_generation'],
669 },
670 pricing: {
671 input: {
672 normal: 0,
673 },
674 output: {
675 normal: 0,
676 },
677 },
678} as const satisfies ModelMeta
679​
680const GEMINI_2_5_FLASH_LITE = {
681 name: 'gemini-2.5-flash-lite',
682 max_input_tokens: 1_048_576,
683 max_output_tokens: 65_536,
684 knowledge_cutoff: '2025-01-01',
685 supports: {
686 input: ['text', 'image', 'audio', 'video', 'document'],
687 output: ['text'],
688 capabilities: [
689 'batch_api',
690 'caching',
691 'function_calling',
692 'structured_output',
693 'thinking',
694 ],
695 tools: ['code_execution', 'google_maps', 'google_search', 'url_context'],
696 },
697 pricing: {
698 input: {
699 normal: 0.1,
700 },
701 output: {
702 normal: 0.4,
703 },
704 },
705 reasoning: BUDGET_OFF_HIGH,
706} as const satisfies ModelMeta<
707 GeminiToolConfigOptions &
708 GeminiSafetyOptions &
709 GeminiCommonConfigOptions &
710 GeminiCachedContentOptions &
711 GeminiStructuredOutputOptions
713​
714const IMAGEN_4_GENERATE = {
715 name: 'imagen-4.0-generate-001',
716 max_input_tokens: 480,
717 max_output_tokens: 4,
718 supports: {
719 input: ['text'],
720 output: ['image'],
721 },
722 pricing: {
723 input: {
724 normal: 0,
725 },
726 output: {
727 normal: 0.4,
728 },
729 },
730} as const satisfies ModelMeta<
731 GeminiToolConfigOptions &
732 GeminiSafetyOptions &
733 GeminiCommonConfigOptions &
734 GeminiCachedContentOptions
736​
737const IMAGEN_4_GENERATE_ULTRA = {
738 name: 'imagen-4.0-ultra-generate-001',
739 max_input_tokens: 480,
740 max_output_tokens: 4,
741 supports: {
742 input: ['text'],
743 output: ['image'],
744 },
745 pricing: {
746 input: {
747 normal: 0,
748 },
749 output: {
750 normal: 0.6,
751 },
752 },
753} as const satisfies ModelMeta<
754 GeminiToolConfigOptions &
755 GeminiSafetyOptions &
756 GeminiCommonConfigOptions &
757 GeminiCachedContentOptions
759​
760const IMAGEN_4_GENERATE_FAST = {
761 name: 'imagen-4.0-fast-generate-001',
762 max_input_tokens: 480,
763 max_output_tokens: 4,
764 supports: {
765 input: ['text'],
766 output: ['image'],
767 },
768 pricing: {
769 input: {
770 normal: 0,
771 },
772 output: {
773 normal: 0.2,
774 },
775 },
776} as const satisfies ModelMeta<
777 GeminiToolConfigOptions &
778 GeminiSafetyOptions &
779 GeminiCommonConfigOptions &
780 GeminiCachedContentOptions
782​
783/**
784 * Veo video generation models. Pricing is per second of generated video
785 * (audio+video rate where the model supports audio).
786 * @experimental Veo video generation is an experimental feature and may change.
787 */
788const VEO_3_1_PREVIEW = {
789 name: 'veo-3.1-generate-preview',
790 max_input_tokens: 1024,
791 max_output_tokens: 1,
792 supports: {
793 input: ['text', 'image'],
794 output: ['video', 'audio'],
795 },
796 pricing: {
797 input: {
798 normal: 0,
799 },
800 output: {
801 normal: 0.4,
802 },
803 },
804} as const satisfies ModelMeta<
805 GeminiToolConfigOptions &
806 GeminiSafetyOptions &
807 GeminiCommonConfigOptions &
808 GeminiCachedContentOptions
810​
811const VEO_3_1_FAST_PREVIEW = {
812 name: 'veo-3.1-fast-generate-preview',
813 max_input_tokens: 1024,
814 max_output_tokens: 1,
815 supports: {
816 input: ['text', 'image'],
817 output: ['video', 'audio'],
818 },
819 pricing: {
820 input: {
821 normal: 0,
822 },
823 output: {
824 normal: 0.15,
825 },
826 },
827} as const satisfies ModelMeta<
828 GeminiToolConfigOptions &
829 GeminiSafetyOptions &
830 GeminiCommonConfigOptions &
831 GeminiCachedContentOptions
833​
834const VEO_3_1_LITE_PREVIEW = {
835 name: 'veo-3.1-lite-generate-preview',
836 max_input_tokens: 1024,
837 max_output_tokens: 1,
838 supports: {
839 input: ['text', 'image'],
840 output: ['video', 'audio'],
841 },
842 pricing: {
843 input: {
844 normal: 0,
845 },
846 output: {
847 normal: 0.05,
848 },
849 },
850} as const satisfies ModelMeta<
851 GeminiToolConfigOptions &
852 GeminiSafetyOptions &
853 GeminiCommonConfigOptions &
854 GeminiCachedContentOptions
856​
857/**
858 * Gemini Omni 1.1 Flash — GA. Multimodal video generation with
859 * conversational editing. Serves only the Interactions API
860 * (`generateContent` rejects it), so it routes through the
861 * interactions-based path of the video adapter, not Veo's
862 * `:predictLongRunning` flow. Pricing is per second of generated video
863 * ($0.10/sec). 360p / 720p (default) / 1080p / 4k at 24 FPS, 3–10 second
864 * clips (default 10s).
865 * @see https://ai.google.dev/gemini-api/docs/models/gemini-omni-flash
866 * @experimental Omni video generation is an experimental feature and may change.
867 */
868const GEMINI_OMNI_1_1_FLASH = {
869 name: 'gemini-omni-1.1-flash',
870 max_input_tokens: 1_048_576,
871 max_output_tokens: 1,
872 supports: {
873 input: ['text', 'image', 'video'],
874 output: ['video', 'audio'],
875 },
876 pricing: {
877 input: {
878 normal: 0,
879 },
880 output: {
881 normal: 0.1,
882 },
883 },
884} as const satisfies ModelMeta<
885 GeminiToolConfigOptions &
886 GeminiSafetyOptions &
887 GeminiCommonConfigOptions &
888 GeminiCachedContentOptions
890​
891const GEMINI_3_8_FLASH = {
892 name: 'gemini-3.8-flash',
893 max_input_tokens: 1_048_576,
894 max_output_tokens: 65_536,
895 knowledge_cutoff: '2026-03-01',
896 supports: {
897 input: ['text', 'image', 'video', 'audio', 'document'],
898 output: ['text'],
899 capabilities: [
900 'agentic_video',
901 'batch_api',
902 'caching',
903 'function_calling',
904 'structured_output',
905 'thinking',
906 ],
907 tools: [
908 'code_execution',
909 'file_search',
910 'google_search',
911 'google_maps',
912 'url_context',
913 'computer_use',
914 ],
915 },
916 pricing: {
917 input: {
918 normal: 0.75,
919 cached: 0.075,
920 },
921 output: {
922 normal: 3.75,
923 },
924 },
925 reasoning: EFFORT_LOW_TO_HIGH,
926} as const satisfies ModelMeta<
927 GeminiToolConfigOptions &
928 GeminiSafetyOptions &
929 GeminiCommonConfigOptions &
930 GeminiCachedContentOptions &
931 GeminiStructuredOutputOptions
933​
934const GEMINI_3_7_FLASH = {
935 name: 'gemini-3.7-flash',
936 max_input_tokens: 1_048_576,
937 max_output_tokens: 65_536,
938 knowledge_cutoff: '2026-03-01',
939 supports: {
940 input: ['text', 'image', 'video', 'audio', 'document'],
941 output: ['text'],
942 capabilities: [
943 'agentic_video',
944 'batch_api',
945 'caching',
946 'function_calling',
947 'structured_output',
948 'thinking',
949 ],
950 tools: [
951 'code_execution',
952 'file_search',
953 'google_search',
954 'google_maps',
955 'url_context',
956 'computer_use',
957 ],
958 },
959 // Currently 50% off through the end of 2026.
960 // https://ai.google.dev/gemini-api/docs/pricing#gemini-3.7-flash
961 pricing: {
962 input: {
963 normal: 0.75,
964 cached: 0.075,
965 },
966 output: {
967 normal: 3.75,
968 },
969 },
970 reasoning: EFFORT_LOW_TO_HIGH,
971} as const satisfies ModelMeta<
972 GeminiToolConfigOptions &
973 GeminiSafetyOptions &
974 GeminiCommonConfigOptions &
975 GeminiCachedContentOptions &
976 GeminiStructuredOutputOptions
978​
979const GEMINI_3_6_FLASH = {
980 name: 'gemini-3.6-flash',
981 max_input_tokens: 1_048_576,
982 max_output_tokens: 65_536,
983 knowledge_cutoff: '2026-03-01',
984 supports: {
985 input: ['text', 'image', 'video', 'audio', 'document'],
986 output: ['text'],
987 capabilities: [
988 'agentic_video',
989 'batch_api',
990 'caching',
991 'function_calling',
992 'structured_output',
993 'thinking',
994 ],
995 tools: [
996 'code_execution',
997 'file_search',
998 'google_search',
999 'google_maps',
1000 'url_context',
1001 'computer_use',
1002 ],
1003 },
1004 pricing: {
1005 input: {
1006 normal: 1.5,
1007 cached: 0.15,
1008 },
1009 output: {
1010 normal: 7.5,
1011 },
1012 },
1013 reasoning: EFFORT_MINIMAL_TO_HIGH,
1014} as const satisfies ModelMeta<
1015 GeminiToolConfigOptions &
1016 GeminiSafetyOptions &
1017 GeminiCommonConfigOptions &
1018 GeminiCachedContentOptions &
1019 GeminiStructuredOutputOptions
1021​
1022const GEMINI_3_5_FLASH = {
1023 name: 'gemini-3.5-flash',
1024 max_input_tokens: 1_048_576,
1025 max_output_tokens: 65_536,
1026 supports: {
1027 input: ['text', 'image', 'video', 'document', 'audio'],
1028 output: ['text'],
1029 capabilities: [
1030 'batch_api',
1031 'caching',
1032 'function_calling',
1033 'structured_output',
1034 'thinking',
1035 ],
1036 tools: [
1037 'code_execution',
1038 'file_search',
1039 'google_search',
1040 'google_maps',
1041 'url_context',
1042 'computer_use',
1043 ],
1044 },
1045 pricing: {
1046 input: {
1047 normal: 1.5,
1048 cached: 0.15,
1049 },
1050 output: {
1051 normal: 9,
1052 },
1053 },
1054 reasoning: EFFORT_MINIMAL_TO_HIGH,
1055} as const satisfies ModelMeta<
1056 GeminiToolConfigOptions &
1057 GeminiSafetyOptions &
1058 GeminiCommonConfigOptions &
1059 GeminiCachedContentOptions &
1060 GeminiStructuredOutputOptions
1062​
1063const GEMINI_3_5_FLASH_LITE = {
1064 name: 'gemini-3.5-flash-lite',
1065 max_input_tokens: 1_048_576,
1066 max_output_tokens: 65_536,
1067 knowledge_cutoff: '2025-01-01',
1068 supports: {
1069 input: ['text', 'image', 'video', 'audio', 'document'],
1070 output: ['text'],
1071 capabilities: [
1072 'agentic_video',
1073 'batch_api',
1074 'caching',
1075 'function_calling',
1076 'structured_output',
1077 'thinking',
1078 ],
1079 tools: [
1080 'code_execution',
1081 'file_search',
1082 'google_search',
1083 'google_maps',
1084 'url_context',
1085 ],
1086 },
1087 pricing: {
1088 input: {
1089 normal: 0.3,
1090 cached: 0.03,
1091 },
1092 output: {
1093 normal: 2.5,
1094 },
1095 },
1096 reasoning: EFFORT_MINIMAL_TO_HIGH,
1097} as const satisfies ModelMeta<
1098 GeminiToolConfigOptions &
1099 GeminiSafetyOptions &
1100 GeminiCommonConfigOptions &
1101 GeminiCachedContentOptions &
1102 GeminiStructuredOutputOptions
1104​
1105export const GEMINI_MODELS = [
1106 GEMINI_3_8_FLASH.name,
1107 GEMINI_3_7_FLASH.name,
1108 GEMINI_3_6_FLASH.name,
1109 GEMINI_3_5_FLASH.name,
1110 GEMINI_3_5_FLASH_LITE.name,
1111 GEMINI_3_1_PRO.name,
1112 GEMINI_3_FLASH.name,
1113 GEMINI_3_1_FLASH_LITE.name,
1114 GEMINI_3_1_FLASH_LITE_PREVIEW.name,
1115 GEMINI_2_5_PRO.name,
1116 GEMINI_2_5_FLASH.name,
1117 GEMINI_2_5_FLASH_LITE.name,
1118] as const
1119​
1120/**
1121 * Gemini models that support combining `tools` + `responseSchema` in a
1122 * single streaming `generateContent` call (per issue #605). Per the
1123 * provider matrix, Gemini 3.x natively interleaves the schema-constrained
1124 * answer with function-calling on one pass; Gemini 2.x is unsupported /
1125 * brittle and keeps the engine's legacy finalization fallback.
1126 */
1127export const GEMINI_COMBINED_TOOLS_AND_SCHEMA_MODELS = new Set<string>([
1128 GEMINI_3_8_FLASH.name,
1129 GEMINI_3_7_FLASH.name,
1130 GEMINI_3_6_FLASH.name,
1131 GEMINI_3_5_FLASH.name,
1132 GEMINI_3_5_FLASH_LITE.name,
1133 GEMINI_3_1_PRO.name,
1134 GEMINI_3_FLASH.name,
1135 GEMINI_3_1_FLASH_LITE.name,
1136 GEMINI_3_1_FLASH_LITE_PREVIEW.name,
1138​
1139export type GeminiModels = (typeof GEMINI_MODELS)[number]
1140​
1141/**
1142 * @deprecated Shut down 2026-06-25. Use `gemini-3.1-flash-image`.
1143 */
1144type Gemini31FlashImagePreviewModel = 'gemini-3.1-flash-image-preview'
1145​
1146/**
1147 * @deprecated Shut down 2026-06-25. Use `gemini-3-pro-image`.
1148 */
1149type Gemini3ProImagePreviewModel = 'gemini-3-pro-image-preview'
1150​
1151export type GeminiImageModels =
1152 | Exclude<
1153 (typeof GEMINI_IMAGE_MODELS)[number],
1154 Gemini31FlashImagePreviewModel | Gemini3ProImagePreviewModel
1156 | Gemini31FlashImagePreviewModel
1157 | Gemini3ProImagePreviewModel
1158​
1159/**
1160 * Image generation models. GA ids come first; the trailing `-preview` ids are
1161 * shut-down aliases kept only so existing code keeps compiling — new code
1162 * should use the GA id above its alias.
1163 */
1164export const GEMINI_IMAGE_MODELS = [
1165 GEMINI_NANO_BANANA_2_1.name,
1166 GEMINI_3_1_FLASH_IMAGE.name,
1167 GEMINI_3_1_FLASH_LITE_IMAGE.name,
1168 GEMINI_3_PRO_IMAGE.name,
1169 GEMINI_2_5_FLASH_IMAGE.name,
1170 IMAGEN_4_GENERATE.name,
1171 IMAGEN_4_GENERATE_FAST.name,
1172 IMAGEN_4_GENERATE_ULTRA.name,
1173 // Deprecated aliases — shut down 2026-06-25.
1174 GEMINI_3_1_FLASH_IMAGE_PREVIEW.name,
1175 GEMINI_3_PRO_IMAGE_PREVIEW.name,
1176] as const
1177​
1178/**
1179 * Text-to-speech models
1180 * @experimental Gemini TTS is an experimental feature and may change.
1181 */
1182export const GEMINI_TTS_MODELS = [
1183 GEMINI_3_1_FLASH_TTS.name,
1184 GEMINI_2_5_FLASH_TTS.name,
1185 GEMINI_2_5_PRO_TTS.name,
1186] as const
1187​
1188/**
1189 * Audio generation models (Lyria music generation).
1190 * @experimental Lyria music generation is an experimental feature and may change.
1191 */
1192export const GEMINI_AUDIO_MODELS = [
1193 LYRIA_3_PRO.name,
1194 LYRIA_3_CLIP.name,
1195] as const
1196​
1197/**
1198 * Available voice names for Gemini TTS
1199 * @see https://ai.google.dev/gemini-api/docs/speech-generation
1200 */
1201export const GEMINI_TTS_VOICES = [
1202 'Zephyr',
1203 'Puck',
1204 'Charon',
1205 'Kore',
1206 'Fenrir',
1207 'Leda',
1208 'Orus',
1209 'Aoede',
1210 'Callirrhoe',
1211 'Autonoe',
1212 'Enceladus',
1213 'Iapetus',
1214 'Umbriel',
1215 'Algieba',
1216 'Despina',
1217 'Erinome',
1218 'Algenib',
1219 'Rasalgethi',
1220 'Laomedeia',
1221 'Achernar',
1222 'Alnilam',
1223 'Schedar',
1224 'Gacrux',
1225 'Pulcherrima',
1226 'Achird',
1227 'Zubenelgenubi',
1228 'Vindemiatrix',
1229 'Sadachbia',
1230 'Sadaltager',
1231 'Sulafat',
1232] as const
1233​
1234export type GeminiTTSVoice = (typeof GEMINI_TTS_VOICES)[number]
1235​
1236/**
1237 * Video generation models. Veo models run on the long-running
1238 * `:predictLongRunning` flow; Gemini Omni Flash runs on the Interactions
1239 * API — the video adapter routes by model.
1240 * @experimental Video generation is an experimental feature and may change.
1241 */
1242export const GEMINI_VIDEO_MODELS = [
1243 VEO_3_1_PREVIEW.name,
1244 VEO_3_1_FAST_PREVIEW.name,
1245 VEO_3_1_LITE_PREVIEW.name,
1246 GEMINI_OMNI_1_1_FLASH.name,
1247] as const
1248​
1249/**
1250 * Video models served by the Interactions API rather than Veo's
1251 * `:predictLongRunning` operations flow.
1252 * @experimental Omni video generation is an experimental feature and may change.
1253 */
1254export const GEMINI_INTERACTIONS_VIDEO_MODELS = [
1255 GEMINI_OMNI_1_1_FLASH.name,
1256] as const
1257​
1258/**
1259 * Embedding models
1260 */
1261export const GEMINI_EMBEDDING_MODELS = ['gemini-embedding-001'] as const
1262​
1263export type GeminiEmbeddingModel = (typeof GEMINI_EMBEDDING_MODELS)[number]
1264​
1265/**
1266 * Type-only map from embedding model name to its provider options type.
1267 */
1268export type GeminiEmbeddingModelProviderOptionsByName = {
1269 'gemini-embedding-001': GeminiEmbeddingProviderOptions
1271​
1272/**
1273 * Per-model input modalities for embedding models. Gemini embedding models
1274 * are text-only, so image inputs fail at compile time.
1275 */
1276export type GeminiEmbeddingModelInputModalitiesByName = {
1277 'gemini-embedding-001': readonly ['text']
1279​
1280// Manual type map for per-model provider options
1281export type GeminiChatModelProviderOptionsByName = {
1282 // Models with thinking and structured output support
1283 [GEMINI_3_8_FLASH.name]: GeminiToolConfigOptions &
1284 GeminiSafetyOptions &
1285 GeminiCommonConfigOptions &
1286 GeminiCachedContentOptions &
1287 GeminiStructuredOutputOptions
1288 [GEMINI_3_7_FLASH.name]: GeminiToolConfigOptions &
1289 GeminiSafetyOptions &
1290 GeminiCommonConfigOptions &
1291 GeminiCachedContentOptions &
1292 GeminiStructuredOutputOptions
1293 [GEMINI_3_6_FLASH.name]: GeminiToolConfigOptions &
1294 GeminiSafetyOptions &
1295 GeminiCommonConfigOptions &
1296 GeminiCachedContentOptions &
1297 GeminiStructuredOutputOptions
1298 [GEMINI_3_5_FLASH.name]: GeminiToolConfigOptions &
1299 GeminiSafetyOptions &
1300 GeminiCommonConfigOptions &
1301 GeminiCachedContentOptions &
1302 GeminiStructuredOutputOptions
1303 [GEMINI_3_5_FLASH_LITE.name]: GeminiToolConfigOptions &
1304 GeminiSafetyOptions &
1305 GeminiCommonConfigOptions &
1306 GeminiCachedContentOptions &
1307 GeminiStructuredOutputOptions
1308 [GEMINI_3_1_PRO.name]: GeminiToolConfigOptions &
1309 GeminiSafetyOptions &
1310 GeminiCommonConfigOptions &
1311 GeminiCachedContentOptions &
1312 GeminiStructuredOutputOptions
1313 [GEMINI_3_FLASH.name]: GeminiToolConfigOptions &
1314 GeminiSafetyOptions &
1315 GeminiCommonConfigOptions &
1316 GeminiCachedContentOptions &
1317 GeminiStructuredOutputOptions
1318 [GEMINI_3_1_FLASH_LITE.name]: GeminiToolConfigOptions &
1319 GeminiSafetyOptions &
1320 GeminiCommonConfigOptions &
1321 GeminiCachedContentOptions &
1322 GeminiStructuredOutputOptions
1323 [GEMINI_3_1_FLASH_LITE_PREVIEW.name]: GeminiToolConfigOptions &
1324 GeminiSafetyOptions &
1325 GeminiCommonConfigOptions &
1326 GeminiCachedContentOptions &
1327 GeminiStructuredOutputOptions
1328 [GEMINI_2_5_PRO.name]: GeminiToolConfigOptions &
1329 GeminiSafetyOptions &
1330 GeminiCommonConfigOptions &
1331 GeminiCachedContentOptions &
1332 GeminiStructuredOutputOptions
1333 [GEMINI_2_5_FLASH.name]: GeminiToolConfigOptions &
1334 GeminiSafetyOptions &
1335 GeminiCommonConfigOptions &
1336 GeminiCachedContentOptions &
1337 GeminiStructuredOutputOptions
1338 [GEMINI_2_5_FLASH_LITE.name]: GeminiToolConfigOptions &
1339 GeminiSafetyOptions &
1340 GeminiCommonConfigOptions &
1341 GeminiCachedContentOptions &
1342 GeminiStructuredOutputOptions
1344​
1345/**
1346 * Type-only map from chat model name to its supported tool capabilities.
1347 * Based on the 'supports.tools' arrays defined for each model.
1348 */
1349export type GeminiChatModelToolCapabilitiesByName = {
1350 [GEMINI_3_8_FLASH.name]: typeof GEMINI_3_8_FLASH.supports.tools
1351 [GEMINI_3_7_FLASH.name]: typeof GEMINI_3_7_FLASH.supports.tools
1352 [GEMINI_3_6_FLASH.name]: typeof GEMINI_3_6_FLASH.supports.tools
1353 [GEMINI_3_5_FLASH.name]: typeof GEMINI_3_5_FLASH.supports.tools
1354 [GEMINI_3_5_FLASH_LITE.name]: typeof GEMINI_3_5_FLASH_LITE.supports.tools
1355 [GEMINI_3_1_PRO.name]: typeof GEMINI_3_1_PRO.supports.tools
1356 [GEMINI_3_FLASH.name]: typeof GEMINI_3_FLASH.supports.tools
1357 [GEMINI_3_1_FLASH_LITE.name]: typeof GEMINI_3_1_FLASH_LITE.supports.tools
1358 [GEMINI_3_1_FLASH_LITE_PREVIEW.name]: typeof GEMINI_3_1_FLASH_LITE_PREVIEW.supports.tools
1359 [GEMINI_2_5_PRO.name]: typeof GEMINI_2_5_PRO.supports.tools
1360 [GEMINI_2_5_FLASH.name]: typeof GEMINI_2_5_FLASH.supports.tools
1361 [GEMINI_2_5_FLASH_LITE.name]: typeof GEMINI_2_5_FLASH_LITE.supports.tools
1363​
1364/**
1365 * Type-only map from chat model name to its supported input modalities.
1366 * Based on the 'supports.input' arrays defined for each model.
1367 * Note: 'document' in the model meta is mapped to 'document' modality.
1368 * Used by the core AI types to constrain ContentPart types based on the selected model.
1369 * Note: These must be inlined as readonly arrays (not typeof) because the model
1370 * constants are not exported and typeof references don't work in .d.ts files
1371 * when consumed by external packages.
1373 * @see https://ai.google.dev/gemini-api/docs/vision
1374 * @see https://ai.google.dev/gemini-api/docs/audio
1375 * @see https://ai.google.dev/gemini-api/docs/document-processing
1376 */
1377export type GeminiModelInputModalitiesByName = {
1378 // Models with full multimodal support (text, image, audio, video, document)
1379 [GEMINI_3_8_FLASH.name]: typeof GEMINI_3_8_FLASH.supports.input
1380 [GEMINI_3_7_FLASH.name]: typeof GEMINI_3_7_FLASH.supports.input
1381 [GEMINI_3_6_FLASH.name]: typeof GEMINI_3_6_FLASH.supports.input
1382 [GEMINI_3_5_FLASH.name]: typeof GEMINI_3_5_FLASH.supports.input
1383 [GEMINI_3_5_FLASH_LITE.name]: typeof GEMINI_3_5_FLASH_LITE.supports.input
1384 [GEMINI_3_1_PRO.name]: typeof GEMINI_3_1_PRO.supports.input
1385 [GEMINI_3_FLASH.name]: typeof GEMINI_3_FLASH.supports.input
1386 [GEMINI_3_1_FLASH_LITE.name]: typeof GEMINI_3_1_FLASH_LITE.supports.input
1387 [GEMINI_3_1_FLASH_LITE_PREVIEW.name]: typeof GEMINI_3_1_FLASH_LITE_PREVIEW.supports.input
1388 [GEMINI_2_5_PRO.name]: typeof GEMINI_2_5_PRO.supports.input
1389 [GEMINI_2_5_FLASH_LITE.name]: typeof GEMINI_2_5_FLASH_LITE.supports.input
1390​
1391 // Models with text, image, audio, video (no document)
1392 [GEMINI_2_5_FLASH.name]: typeof GEMINI_2_5_FLASH.supports.input
1394​
1395/**
1396 * Runtime map from chat model name to its supported input modalities, for the
1397 * text adapter's `inputModalities`. `satisfies` keeps it equal to
1398 * {@link GeminiModelInputModalitiesByName}. An unknown name gives `undefined`.
1399 */
1400export const GEMINI_MODEL_INPUT_MODALITIES: Readonly<
1401 Record<string, ReadonlyArray<Modality>>
1402> = {
1403 [GEMINI_3_8_FLASH.name]: GEMINI_3_8_FLASH.supports.input,
1404 [GEMINI_3_7_FLASH.name]: GEMINI_3_7_FLASH.supports.input,
1405 [GEMINI_3_6_FLASH.name]: GEMINI_3_6_FLASH.supports.input,
1406 [GEMINI_3_5_FLASH.name]: GEMINI_3_5_FLASH.supports.input,
1407 [GEMINI_3_5_FLASH_LITE.name]: GEMINI_3_5_FLASH_LITE.supports.input,
1408 [GEMINI_3_1_PRO.name]: GEMINI_3_1_PRO.supports.input,
1409 [GEMINI_3_FLASH.name]: GEMINI_3_FLASH.supports.input,
1410 [GEMINI_3_1_FLASH_LITE.name]: GEMINI_3_1_FLASH_LITE.supports.input,
1411 [GEMINI_3_1_FLASH_LITE_PREVIEW.name]:
1412 GEMINI_3_1_FLASH_LITE_PREVIEW.supports.input,
1413 [GEMINI_2_5_PRO.name]: GEMINI_2_5_PRO.supports.input,
1414 [GEMINI_2_5_FLASH_LITE.name]: GEMINI_2_5_FLASH_LITE.supports.input,
1415 [GEMINI_2_5_FLASH.name]: GEMINI_2_5_FLASH.supports.input,
1416} satisfies GeminiModelInputModalitiesByName
1417​
1418// Reasoning
1420// Each model's `reasoning` field holds its data for `chat({ reasoning })`: the
1421// levels it has, with the provider value for each, and whether it takes a
1422// thinking token budget. The data comes from models.dev. The generator that
1423// writes it comes with the model catalog later. Until then, the sync scripts
1424// keep these fields as they are.
1425​
1426const GEMINI_REASONING = {
1427 [GEMINI_3_8_FLASH.name]: GEMINI_3_8_FLASH.reasoning,
1428 [GEMINI_3_7_FLASH.name]: GEMINI_3_7_FLASH.reasoning,
1429 [GEMINI_3_6_FLASH.name]: GEMINI_3_6_FLASH.reasoning,
1430 [GEMINI_3_5_FLASH.name]: GEMINI_3_5_FLASH.reasoning,
1431 [GEMINI_3_5_FLASH_LITE.name]: GEMINI_3_5_FLASH_LITE.reasoning,
1432 [GEMINI_3_1_PRO.name]: GEMINI_3_1_PRO.reasoning,
1433 [GEMINI_3_FLASH.name]: GEMINI_3_FLASH.reasoning,
1434 [GEMINI_3_1_FLASH_LITE.name]: GEMINI_3_1_FLASH_LITE.reasoning,
1435 [GEMINI_3_1_FLASH_LITE_PREVIEW.name]: GEMINI_3_1_FLASH_LITE_PREVIEW.reasoning,
1436 [GEMINI_2_5_PRO.name]: GEMINI_2_5_PRO.reasoning,
1437 [GEMINI_2_5_FLASH_LITE.name]: GEMINI_2_5_FLASH_LITE.reasoning,
1438 [GEMINI_2_5_FLASH.name]: GEMINI_2_5_FLASH.reasoning,
1440​
1441/**
1442 * Each chat model's reasoning levels, and whether it takes a token budget,
1443 * for `chat({ reasoning })`. Derived from the `reasoning` field. A model
1444 * that is not here does not reason.
1445 */
1446export type GeminiModelReasoningByName = {
1447 [K in keyof typeof GEMINI_REASONING]: ModelReasoningCapability<
1448 (typeof GEMINI_REASONING)[K]
1451​
1452/**
1453 * Runtime map from chat model name to its reasoning data, for the text adapter.
1454 * An unknown name gives `undefined`: the adapter sends no reasoning field.
1455 */
1456export const GEMINI_MODEL_REASONING: Readonly<Record<string, ModelReasoning>> =
1457 GEMINI_REASONING