@tanstack/ai-gemini 0.20.1 → 0.22.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.
- package/README.md +15 -1
- package/dist/esm/adapters/audio.js +113 -61
- package/dist/esm/adapters/audio.js.map +1 -1
- package/dist/esm/adapters/embedding.d.ts +77 -0
- package/dist/esm/adapters/embedding.js +119 -0
- package/dist/esm/adapters/embedding.js.map +1 -0
- package/dist/esm/adapters/image.js +224 -225
- package/dist/esm/adapters/image.js.map +1 -1
- package/dist/esm/adapters/summarize.js +33 -12
- package/dist/esm/adapters/summarize.js.map +1 -1
- package/dist/esm/adapters/text.js +574 -650
- package/dist/esm/adapters/text.js.map +1 -1
- package/dist/esm/adapters/tts.js +197 -178
- package/dist/esm/adapters/tts.js.map +1 -1
- package/dist/esm/adapters/video.js +456 -409
- package/dist/esm/adapters/video.js.map +1 -1
- package/dist/esm/embedding/embedding-provider-options.d.ts +20 -0
- package/dist/esm/experimental/index.js +1 -6
- package/dist/esm/experimental/text-interactions/adapter.js +877 -1014
- package/dist/esm/experimental/text-interactions/adapter.js.map +1 -1
- package/dist/esm/image/image-provider-options.js +74 -54
- package/dist/esm/image/image-provider-options.js.map +1 -1
- package/dist/esm/index.d.ts +4 -1
- package/dist/esm/index.js +5 -36
- package/dist/esm/model-meta.d.ts +72 -5
- package/dist/esm/model-meta.js +737 -129
- package/dist/esm/model-meta.js.map +1 -1
- package/dist/esm/realtime/adapter.js +242 -228
- package/dist/esm/realtime/adapter.js.map +1 -1
- package/dist/esm/realtime/client.js +314 -381
- package/dist/esm/realtime/client.js.map +1 -1
- package/dist/esm/realtime/index.js +3 -0
- package/dist/esm/realtime/token.js +50 -36
- package/dist/esm/realtime/token.js.map +1 -1
- package/dist/esm/realtime/utils.js +202 -245
- package/dist/esm/realtime/utils.js.map +1 -1
- package/dist/esm/tools/code-execution-tool.js +11 -13
- package/dist/esm/tools/code-execution-tool.js.map +1 -1
- package/dist/esm/tools/computer-use-tool.js +18 -28
- package/dist/esm/tools/computer-use-tool.js.map +1 -1
- package/dist/esm/tools/file-search-tool.js +11 -14
- package/dist/esm/tools/file-search-tool.js.map +1 -1
- package/dist/esm/tools/function-declaration-tool.js +11 -25
- package/dist/esm/tools/function-declaration-tool.js.map +1 -1
- package/dist/esm/tools/google-maps-tool.js +11 -14
- package/dist/esm/tools/google-maps-tool.js.map +1 -1
- package/dist/esm/tools/google-search-retriveal-tool.js +11 -14
- package/dist/esm/tools/google-search-retriveal-tool.js.map +1 -1
- package/dist/esm/tools/google-search-tool.js +11 -14
- package/dist/esm/tools/google-search-tool.js.map +1 -1
- package/dist/esm/tools/index.js +2 -13
- package/dist/esm/tools/tool-converter.js +64 -57
- package/dist/esm/tools/tool-converter.js.map +1 -1
- package/dist/esm/tools/url-context-tool.js +11 -13
- package/dist/esm/tools/url-context-tool.js.map +1 -1
- package/dist/esm/usage.js +81 -87
- package/dist/esm/usage.js.map +1 -1
- package/dist/esm/utils/client.js +31 -24
- package/dist/esm/utils/client.js.map +1 -1
- package/dist/esm/utils/index.js +2 -0
- package/dist/esm/video/video-provider-options.js +73 -20
- package/dist/esm/video/video-provider-options.js.map +1 -1
- package/package.json +7 -7
- package/src/adapters/embedding.ts +173 -0
- package/src/embedding/embedding-provider-options.ts +29 -0
- package/src/index.ts +13 -0
- package/src/model-meta.ts +143 -10
- package/dist/esm/experimental/index.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/tools/index.js.map +0 -1
package/dist/esm/model-meta.js
CHANGED
|
@@ -1,159 +1,767 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/model-meta.ts
|
|
2
|
+
var GEMINI_3_1_PRO = {
|
|
3
|
+
name: "gemini-3.1-pro-preview",
|
|
4
|
+
max_input_tokens: 1048576,
|
|
5
|
+
max_output_tokens: 65536,
|
|
6
|
+
knowledge_cutoff: "2025-01-01",
|
|
7
|
+
supports: {
|
|
8
|
+
input: [
|
|
9
|
+
"text",
|
|
10
|
+
"image",
|
|
11
|
+
"audio",
|
|
12
|
+
"video",
|
|
13
|
+
"document"
|
|
14
|
+
],
|
|
15
|
+
output: ["text"],
|
|
16
|
+
capabilities: [
|
|
17
|
+
"batch_api",
|
|
18
|
+
"caching",
|
|
19
|
+
"function_calling",
|
|
20
|
+
"structured_output",
|
|
21
|
+
"thinking"
|
|
22
|
+
],
|
|
23
|
+
tools: [
|
|
24
|
+
"code_execution",
|
|
25
|
+
"file_search",
|
|
26
|
+
"google_search",
|
|
27
|
+
"url_context"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
pricing: {
|
|
31
|
+
input: { normal: 2.5 },
|
|
32
|
+
output: { normal: 15 }
|
|
33
|
+
}
|
|
3
34
|
};
|
|
4
|
-
|
|
5
|
-
|
|
35
|
+
var GEMINI_3_FLASH = {
|
|
36
|
+
name: "gemini-3-flash-preview",
|
|
37
|
+
max_input_tokens: 1048576,
|
|
38
|
+
max_output_tokens: 65536,
|
|
39
|
+
knowledge_cutoff: "2025-01-01",
|
|
40
|
+
supports: {
|
|
41
|
+
input: [
|
|
42
|
+
"text",
|
|
43
|
+
"image",
|
|
44
|
+
"audio",
|
|
45
|
+
"video",
|
|
46
|
+
"document"
|
|
47
|
+
],
|
|
48
|
+
output: ["text"],
|
|
49
|
+
capabilities: [
|
|
50
|
+
"batch_api",
|
|
51
|
+
"caching",
|
|
52
|
+
"function_calling",
|
|
53
|
+
"structured_output",
|
|
54
|
+
"thinking"
|
|
55
|
+
],
|
|
56
|
+
tools: [
|
|
57
|
+
"code_execution",
|
|
58
|
+
"file_search",
|
|
59
|
+
"google_search",
|
|
60
|
+
"url_context"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
pricing: {
|
|
64
|
+
input: { normal: .5 },
|
|
65
|
+
output: { normal: 3 }
|
|
66
|
+
}
|
|
6
67
|
};
|
|
7
|
-
|
|
8
|
-
|
|
68
|
+
var GEMINI_3_PRO_IMAGE = {
|
|
69
|
+
name: "gemini-3-pro-image-preview",
|
|
70
|
+
max_input_tokens: 65536,
|
|
71
|
+
max_output_tokens: 32768,
|
|
72
|
+
knowledge_cutoff: "2025-01-01",
|
|
73
|
+
supports: {
|
|
74
|
+
input: ["text", "image"],
|
|
75
|
+
output: ["text", "image"],
|
|
76
|
+
capabilities: [
|
|
77
|
+
"batch_api",
|
|
78
|
+
"structured_output",
|
|
79
|
+
"thinking"
|
|
80
|
+
],
|
|
81
|
+
tools: ["google_search"]
|
|
82
|
+
},
|
|
83
|
+
pricing: {
|
|
84
|
+
input: { normal: 2 },
|
|
85
|
+
output: { normal: .134 }
|
|
86
|
+
}
|
|
9
87
|
};
|
|
10
|
-
|
|
11
|
-
|
|
88
|
+
var GEMINI_3_1_FLASH_IMAGE = {
|
|
89
|
+
name: "gemini-3.1-flash-image-preview",
|
|
90
|
+
max_input_tokens: 65536,
|
|
91
|
+
max_output_tokens: 65536,
|
|
92
|
+
knowledge_cutoff: "2025-01-01",
|
|
93
|
+
supports: {
|
|
94
|
+
input: ["text", "image"],
|
|
95
|
+
output: ["text", "image"],
|
|
96
|
+
capabilities: [
|
|
97
|
+
"batch_api",
|
|
98
|
+
"structured_output",
|
|
99
|
+
"thinking"
|
|
100
|
+
],
|
|
101
|
+
tools: ["google_search"]
|
|
102
|
+
},
|
|
103
|
+
pricing: {
|
|
104
|
+
input: { normal: .25 },
|
|
105
|
+
output: { normal: 1.5 }
|
|
106
|
+
}
|
|
12
107
|
};
|
|
13
|
-
|
|
14
|
-
|
|
108
|
+
var GEMINI_3_1_FLASH_LITE_IMAGE = {
|
|
109
|
+
name: "gemini-3.1-flash-lite-image",
|
|
110
|
+
max_input_tokens: 65536,
|
|
111
|
+
max_output_tokens: 65536,
|
|
112
|
+
knowledge_cutoff: "2025-01-01",
|
|
113
|
+
supports: {
|
|
114
|
+
input: ["text", "image"],
|
|
115
|
+
output: ["text", "image"],
|
|
116
|
+
capabilities: [
|
|
117
|
+
"batch_api",
|
|
118
|
+
"structured_output",
|
|
119
|
+
"thinking"
|
|
120
|
+
],
|
|
121
|
+
tools: ["google_search"]
|
|
122
|
+
},
|
|
123
|
+
pricing: {
|
|
124
|
+
input: { normal: .25 },
|
|
125
|
+
output: { normal: 1.5 }
|
|
126
|
+
}
|
|
15
127
|
};
|
|
16
|
-
|
|
17
|
-
|
|
128
|
+
var GEMINI_3_1_FLASH_LITE = {
|
|
129
|
+
name: "gemini-3.1-flash-lite",
|
|
130
|
+
max_input_tokens: 1048576,
|
|
131
|
+
max_output_tokens: 65536,
|
|
132
|
+
knowledge_cutoff: "2025-01-01",
|
|
133
|
+
supports: {
|
|
134
|
+
input: [
|
|
135
|
+
"text",
|
|
136
|
+
"image",
|
|
137
|
+
"audio",
|
|
138
|
+
"video",
|
|
139
|
+
"document"
|
|
140
|
+
],
|
|
141
|
+
output: ["text"],
|
|
142
|
+
capabilities: [
|
|
143
|
+
"batch_api",
|
|
144
|
+
"caching",
|
|
145
|
+
"function_calling",
|
|
146
|
+
"structured_output",
|
|
147
|
+
"thinking"
|
|
148
|
+
],
|
|
149
|
+
tools: [
|
|
150
|
+
"code_execution",
|
|
151
|
+
"file_search",
|
|
152
|
+
"google_search",
|
|
153
|
+
"url_context"
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
pricing: {
|
|
157
|
+
input: { normal: .25 },
|
|
158
|
+
output: { normal: 1.5 }
|
|
159
|
+
}
|
|
18
160
|
};
|
|
19
|
-
|
|
20
|
-
|
|
161
|
+
var GEMINI_3_1_FLASH_LITE_PREVIEW = {
|
|
162
|
+
name: "gemini-3.1-flash-lite-preview",
|
|
163
|
+
max_input_tokens: 1048576,
|
|
164
|
+
max_output_tokens: 65536,
|
|
165
|
+
knowledge_cutoff: "2025-01-01",
|
|
166
|
+
supports: {
|
|
167
|
+
input: [
|
|
168
|
+
"text",
|
|
169
|
+
"image",
|
|
170
|
+
"audio",
|
|
171
|
+
"video",
|
|
172
|
+
"document"
|
|
173
|
+
],
|
|
174
|
+
output: ["text"],
|
|
175
|
+
capabilities: [
|
|
176
|
+
"batch_api",
|
|
177
|
+
"caching",
|
|
178
|
+
"function_calling",
|
|
179
|
+
"structured_output",
|
|
180
|
+
"thinking"
|
|
181
|
+
],
|
|
182
|
+
tools: [
|
|
183
|
+
"code_execution",
|
|
184
|
+
"file_search",
|
|
185
|
+
"google_search",
|
|
186
|
+
"url_context"
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
pricing: {
|
|
190
|
+
input: { normal: .25 },
|
|
191
|
+
output: { normal: 1.5 }
|
|
192
|
+
}
|
|
21
193
|
};
|
|
22
|
-
|
|
23
|
-
|
|
194
|
+
var GEMINI_2_5_PRO = {
|
|
195
|
+
name: "gemini-2.5-pro",
|
|
196
|
+
max_input_tokens: 1048576,
|
|
197
|
+
max_output_tokens: 65536,
|
|
198
|
+
knowledge_cutoff: "2025-01-01",
|
|
199
|
+
supports: {
|
|
200
|
+
input: [
|
|
201
|
+
"text",
|
|
202
|
+
"image",
|
|
203
|
+
"audio",
|
|
204
|
+
"video",
|
|
205
|
+
"document"
|
|
206
|
+
],
|
|
207
|
+
output: ["text"],
|
|
208
|
+
capabilities: [
|
|
209
|
+
"batch_api",
|
|
210
|
+
"caching",
|
|
211
|
+
"function_calling",
|
|
212
|
+
"structured_output",
|
|
213
|
+
"thinking"
|
|
214
|
+
],
|
|
215
|
+
tools: [
|
|
216
|
+
"code_execution",
|
|
217
|
+
"file_search",
|
|
218
|
+
"google_maps",
|
|
219
|
+
"google_search",
|
|
220
|
+
"url_context"
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
pricing: {
|
|
224
|
+
input: { normal: 2.5 },
|
|
225
|
+
output: { normal: 15 }
|
|
226
|
+
}
|
|
24
227
|
};
|
|
25
|
-
|
|
26
|
-
|
|
228
|
+
var GEMINI_2_5_PRO_TTS = {
|
|
229
|
+
name: "gemini-2.5-pro-preview-tts",
|
|
230
|
+
max_input_tokens: 8192,
|
|
231
|
+
max_output_tokens: 16384,
|
|
232
|
+
knowledge_cutoff: "2025-05-01",
|
|
233
|
+
supports: {
|
|
234
|
+
input: ["text"],
|
|
235
|
+
output: ["audio"],
|
|
236
|
+
capabilities: ["audio_generation"]
|
|
237
|
+
},
|
|
238
|
+
pricing: {
|
|
239
|
+
input: { normal: 2.5 },
|
|
240
|
+
output: { normal: 15 }
|
|
241
|
+
}
|
|
27
242
|
};
|
|
28
|
-
|
|
29
|
-
|
|
243
|
+
var GEMINI_2_5_FLASH = {
|
|
244
|
+
name: "gemini-2.5-flash",
|
|
245
|
+
max_input_tokens: 1048576,
|
|
246
|
+
max_output_tokens: 65536,
|
|
247
|
+
knowledge_cutoff: "2025-01-01",
|
|
248
|
+
supports: {
|
|
249
|
+
input: [
|
|
250
|
+
"text",
|
|
251
|
+
"image",
|
|
252
|
+
"audio",
|
|
253
|
+
"video"
|
|
254
|
+
],
|
|
255
|
+
output: ["text"],
|
|
256
|
+
capabilities: [
|
|
257
|
+
"batch_api",
|
|
258
|
+
"caching",
|
|
259
|
+
"function_calling",
|
|
260
|
+
"structured_output",
|
|
261
|
+
"thinking"
|
|
262
|
+
],
|
|
263
|
+
tools: [
|
|
264
|
+
"code_execution",
|
|
265
|
+
"file_search",
|
|
266
|
+
"google_maps",
|
|
267
|
+
"google_search",
|
|
268
|
+
"url_context"
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
pricing: {
|
|
272
|
+
input: { normal: 1 },
|
|
273
|
+
output: { normal: 2.5 }
|
|
274
|
+
}
|
|
30
275
|
};
|
|
31
|
-
|
|
32
|
-
|
|
276
|
+
var GEMINI_2_5_FLASH_IMAGE = {
|
|
277
|
+
name: "gemini-2.5-flash-image",
|
|
278
|
+
max_input_tokens: 1048576,
|
|
279
|
+
max_output_tokens: 65536,
|
|
280
|
+
knowledge_cutoff: "2025-06-01",
|
|
281
|
+
supports: {
|
|
282
|
+
input: ["text", "image"],
|
|
283
|
+
output: ["text", "image"],
|
|
284
|
+
capabilities: [
|
|
285
|
+
"batch_api",
|
|
286
|
+
"caching",
|
|
287
|
+
"structured_output"
|
|
288
|
+
],
|
|
289
|
+
tools: ["file_search"]
|
|
290
|
+
},
|
|
291
|
+
pricing: {
|
|
292
|
+
input: { normal: .3 },
|
|
293
|
+
output: { normal: .4 }
|
|
294
|
+
}
|
|
33
295
|
};
|
|
34
|
-
|
|
35
|
-
|
|
296
|
+
/**
|
|
297
|
+
const GEMINI_2_5_FLASH_LIVE = {
|
|
298
|
+
name: 'gemini-2.5-flash-native-audio-preview-09-2025',
|
|
299
|
+
max_input_tokens: 141_072,
|
|
300
|
+
max_output_tokens: 8_192,
|
|
301
|
+
knowledge_cutoff: '2025-01-01',
|
|
302
|
+
supports: {
|
|
303
|
+
input: ['text', 'audio', 'video'],
|
|
304
|
+
output: ['text', 'audio'],
|
|
305
|
+
capabilities: [
|
|
306
|
+
'audio_generation',
|
|
307
|
+
'file_search',
|
|
308
|
+
'function_calling',
|
|
309
|
+
'live_api',
|
|
310
|
+
'search_grounding',
|
|
311
|
+
'thinking',
|
|
312
|
+
],
|
|
313
|
+
},
|
|
314
|
+
pricing: {
|
|
315
|
+
// todo find this info
|
|
316
|
+
input: {
|
|
317
|
+
normal: 0,
|
|
318
|
+
},
|
|
319
|
+
output: {
|
|
320
|
+
normal: 0,
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
} as const satisfies ModelMeta<
|
|
324
|
+
GeminiToolConfigOptions &
|
|
325
|
+
GeminiSafetyOptions &
|
|
326
|
+
GeminiGenerationConfigOptions &
|
|
327
|
+
GeminiCachedContentOptions &
|
|
328
|
+
GeminiThinkingOptions
|
|
329
|
+
>
|
|
330
|
+
*/
|
|
331
|
+
var GEMINI_2_5_FLASH_TTS = {
|
|
332
|
+
name: "gemini-2.5-flash-preview-tts",
|
|
333
|
+
max_input_tokens: 8192,
|
|
334
|
+
max_output_tokens: 16384,
|
|
335
|
+
knowledge_cutoff: "2025-05-01",
|
|
336
|
+
supports: {
|
|
337
|
+
input: ["text"],
|
|
338
|
+
output: ["audio"],
|
|
339
|
+
capabilities: ["audio_generation", "batch_api"]
|
|
340
|
+
},
|
|
341
|
+
pricing: {
|
|
342
|
+
input: { normal: 1 },
|
|
343
|
+
output: { normal: 2.5 }
|
|
344
|
+
}
|
|
36
345
|
};
|
|
37
|
-
|
|
38
|
-
|
|
346
|
+
/**
|
|
347
|
+
* Gemini 3.1 Flash TTS Preview - latest expressive TTS model with
|
|
348
|
+
* 200+ audio tags, 70+ languages, and multi-speaker dialogue support.
|
|
349
|
+
* @see https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-tts-preview
|
|
350
|
+
*/
|
|
351
|
+
var GEMINI_3_1_FLASH_TTS = {
|
|
352
|
+
name: "gemini-3.1-flash-tts-preview",
|
|
353
|
+
max_input_tokens: 32768,
|
|
354
|
+
max_output_tokens: 16384,
|
|
355
|
+
knowledge_cutoff: "2025-05-01",
|
|
356
|
+
supports: {
|
|
357
|
+
input: ["text"],
|
|
358
|
+
output: ["audio"],
|
|
359
|
+
capabilities: ["audio_generation", "batch_api"]
|
|
360
|
+
},
|
|
361
|
+
pricing: {
|
|
362
|
+
input: { normal: .5 },
|
|
363
|
+
output: { normal: 10 }
|
|
364
|
+
}
|
|
39
365
|
};
|
|
40
|
-
|
|
41
|
-
|
|
366
|
+
/**
|
|
367
|
+
* Lyria 3 Pro Preview — Google's flagship music generation model.
|
|
368
|
+
* Generates full-length songs with multiple verses, choruses, and bridges.
|
|
369
|
+
* Outputs MP3 or WAV at 48 kHz stereo.
|
|
370
|
+
* @see https://ai.google.dev/gemini-api/docs/models/lyria-3-pro-preview
|
|
371
|
+
*/
|
|
372
|
+
var LYRIA_3_PRO = {
|
|
373
|
+
name: "lyria-3-pro-preview",
|
|
374
|
+
max_input_tokens: 131072,
|
|
375
|
+
supports: {
|
|
376
|
+
input: ["text", "image"],
|
|
377
|
+
output: ["audio"],
|
|
378
|
+
capabilities: ["audio_generation"]
|
|
379
|
+
},
|
|
380
|
+
pricing: {
|
|
381
|
+
input: { normal: 0 },
|
|
382
|
+
output: { normal: 0 }
|
|
383
|
+
}
|
|
42
384
|
};
|
|
43
|
-
|
|
44
|
-
|
|
385
|
+
/**
|
|
386
|
+
* Lyria 3 Clip Preview — 30-second music clips in MP3 format.
|
|
387
|
+
* @see https://ai.google.dev/gemini-api/docs/music-generation
|
|
388
|
+
*/
|
|
389
|
+
var LYRIA_3_CLIP = {
|
|
390
|
+
name: "lyria-3-clip-preview",
|
|
391
|
+
max_input_tokens: 131072,
|
|
392
|
+
supports: {
|
|
393
|
+
input: ["text", "image"],
|
|
394
|
+
output: ["audio"],
|
|
395
|
+
capabilities: ["audio_generation"]
|
|
396
|
+
},
|
|
397
|
+
pricing: {
|
|
398
|
+
input: { normal: 0 },
|
|
399
|
+
output: { normal: 0 }
|
|
400
|
+
}
|
|
45
401
|
};
|
|
46
|
-
|
|
47
|
-
|
|
402
|
+
var GEMINI_2_5_FLASH_LITE = {
|
|
403
|
+
name: "gemini-2.5-flash-lite",
|
|
404
|
+
max_input_tokens: 1048576,
|
|
405
|
+
max_output_tokens: 65536,
|
|
406
|
+
knowledge_cutoff: "2025-01-01",
|
|
407
|
+
supports: {
|
|
408
|
+
input: [
|
|
409
|
+
"text",
|
|
410
|
+
"image",
|
|
411
|
+
"audio",
|
|
412
|
+
"video",
|
|
413
|
+
"document"
|
|
414
|
+
],
|
|
415
|
+
output: ["text"],
|
|
416
|
+
capabilities: [
|
|
417
|
+
"batch_api",
|
|
418
|
+
"caching",
|
|
419
|
+
"function_calling",
|
|
420
|
+
"structured_output",
|
|
421
|
+
"thinking"
|
|
422
|
+
],
|
|
423
|
+
tools: [
|
|
424
|
+
"code_execution",
|
|
425
|
+
"google_maps",
|
|
426
|
+
"google_search",
|
|
427
|
+
"url_context"
|
|
428
|
+
]
|
|
429
|
+
},
|
|
430
|
+
pricing: {
|
|
431
|
+
input: { normal: .1 },
|
|
432
|
+
output: { normal: .4 }
|
|
433
|
+
}
|
|
48
434
|
};
|
|
49
|
-
|
|
50
|
-
|
|
435
|
+
var IMAGEN_4_GENERATE = {
|
|
436
|
+
name: "imagen-4.0-generate-001",
|
|
437
|
+
max_input_tokens: 480,
|
|
438
|
+
max_output_tokens: 4,
|
|
439
|
+
supports: {
|
|
440
|
+
input: ["text"],
|
|
441
|
+
output: ["image"]
|
|
442
|
+
},
|
|
443
|
+
pricing: {
|
|
444
|
+
input: { normal: 0 },
|
|
445
|
+
output: { normal: .4 }
|
|
446
|
+
}
|
|
51
447
|
};
|
|
52
|
-
|
|
53
|
-
|
|
448
|
+
var IMAGEN_4_GENERATE_ULTRA = {
|
|
449
|
+
name: "imagen-4.0-ultra-generate-001",
|
|
450
|
+
max_input_tokens: 480,
|
|
451
|
+
max_output_tokens: 4,
|
|
452
|
+
supports: {
|
|
453
|
+
input: ["text"],
|
|
454
|
+
output: ["image"]
|
|
455
|
+
},
|
|
456
|
+
pricing: {
|
|
457
|
+
input: { normal: 0 },
|
|
458
|
+
output: { normal: .6 }
|
|
459
|
+
}
|
|
54
460
|
};
|
|
55
|
-
|
|
56
|
-
|
|
461
|
+
var IMAGEN_4_GENERATE_FAST = {
|
|
462
|
+
name: "imagen-4.0-fast-generate-001",
|
|
463
|
+
max_input_tokens: 480,
|
|
464
|
+
max_output_tokens: 4,
|
|
465
|
+
supports: {
|
|
466
|
+
input: ["text"],
|
|
467
|
+
output: ["image"]
|
|
468
|
+
},
|
|
469
|
+
pricing: {
|
|
470
|
+
input: { normal: 0 },
|
|
471
|
+
output: { normal: .2 }
|
|
472
|
+
}
|
|
57
473
|
};
|
|
58
|
-
|
|
59
|
-
|
|
474
|
+
/**
|
|
475
|
+
* Veo video generation models. Pricing is per second of generated video
|
|
476
|
+
* (audio+video rate where the model supports audio).
|
|
477
|
+
* @experimental Veo video generation is an experimental feature and may change.
|
|
478
|
+
*/
|
|
479
|
+
var VEO_3_1_PREVIEW = {
|
|
480
|
+
name: "veo-3.1-generate-preview",
|
|
481
|
+
max_input_tokens: 1024,
|
|
482
|
+
max_output_tokens: 1,
|
|
483
|
+
supports: {
|
|
484
|
+
input: ["text", "image"],
|
|
485
|
+
output: ["video", "audio"]
|
|
486
|
+
},
|
|
487
|
+
pricing: {
|
|
488
|
+
input: { normal: 0 },
|
|
489
|
+
output: { normal: .4 }
|
|
490
|
+
}
|
|
60
491
|
};
|
|
61
|
-
|
|
62
|
-
|
|
492
|
+
var VEO_3_1_FAST_PREVIEW = {
|
|
493
|
+
name: "veo-3.1-fast-generate-preview",
|
|
494
|
+
max_input_tokens: 1024,
|
|
495
|
+
max_output_tokens: 1,
|
|
496
|
+
supports: {
|
|
497
|
+
input: ["text", "image"],
|
|
498
|
+
output: ["video", "audio"]
|
|
499
|
+
},
|
|
500
|
+
pricing: {
|
|
501
|
+
input: { normal: 0 },
|
|
502
|
+
output: { normal: .15 }
|
|
503
|
+
}
|
|
63
504
|
};
|
|
64
|
-
|
|
65
|
-
|
|
505
|
+
var VEO_3_1_LITE_PREVIEW = {
|
|
506
|
+
name: "veo-3.1-lite-generate-preview",
|
|
507
|
+
max_input_tokens: 1024,
|
|
508
|
+
max_output_tokens: 1,
|
|
509
|
+
supports: {
|
|
510
|
+
input: ["text", "image"],
|
|
511
|
+
output: ["video", "audio"]
|
|
512
|
+
},
|
|
513
|
+
pricing: {
|
|
514
|
+
input: { normal: 0 },
|
|
515
|
+
output: { normal: .05 }
|
|
516
|
+
}
|
|
66
517
|
};
|
|
67
|
-
|
|
68
|
-
|
|
518
|
+
/**
|
|
519
|
+
* Gemini Omni Flash — multimodal video generation with conversational
|
|
520
|
+
* editing. Serves only the Interactions API (`generateContent` rejects it),
|
|
521
|
+
* so it routes through the interactions-based path of the video adapter,
|
|
522
|
+
* not Veo's `:predictLongRunning` flow. Pricing is per second of generated
|
|
523
|
+
* video ($0.10/sec). 720p / 24 FPS, 3–10 second clips (default 10s).
|
|
524
|
+
* @experimental Omni video generation is an experimental feature and may change.
|
|
525
|
+
*/
|
|
526
|
+
var GEMINI_OMNI_FLASH_PREVIEW = {
|
|
527
|
+
name: "gemini-omni-flash-preview",
|
|
528
|
+
max_input_tokens: 1048576,
|
|
529
|
+
max_output_tokens: 1,
|
|
530
|
+
supports: {
|
|
531
|
+
input: [
|
|
532
|
+
"text",
|
|
533
|
+
"image",
|
|
534
|
+
"video"
|
|
535
|
+
],
|
|
536
|
+
output: ["video", "audio"]
|
|
537
|
+
},
|
|
538
|
+
pricing: {
|
|
539
|
+
input: { normal: 0 },
|
|
540
|
+
output: { normal: .1 }
|
|
541
|
+
}
|
|
69
542
|
};
|
|
70
|
-
|
|
71
|
-
|
|
543
|
+
var GEMINI_3_6_FLASH = {
|
|
544
|
+
name: "gemini-3.6-flash",
|
|
545
|
+
max_input_tokens: 1048576,
|
|
546
|
+
max_output_tokens: 65536,
|
|
547
|
+
knowledge_cutoff: "2026-03-01",
|
|
548
|
+
supports: {
|
|
549
|
+
input: [
|
|
550
|
+
"text",
|
|
551
|
+
"image",
|
|
552
|
+
"video",
|
|
553
|
+
"audio",
|
|
554
|
+
"document"
|
|
555
|
+
],
|
|
556
|
+
output: ["text"],
|
|
557
|
+
capabilities: [
|
|
558
|
+
"batch_api",
|
|
559
|
+
"caching",
|
|
560
|
+
"function_calling",
|
|
561
|
+
"structured_output",
|
|
562
|
+
"thinking"
|
|
563
|
+
],
|
|
564
|
+
tools: [
|
|
565
|
+
"code_execution",
|
|
566
|
+
"file_search",
|
|
567
|
+
"google_search",
|
|
568
|
+
"google_maps",
|
|
569
|
+
"url_context",
|
|
570
|
+
"computer_use"
|
|
571
|
+
]
|
|
572
|
+
},
|
|
573
|
+
pricing: {
|
|
574
|
+
input: {
|
|
575
|
+
normal: 1.5,
|
|
576
|
+
cached: .15
|
|
577
|
+
},
|
|
578
|
+
output: { normal: 7.5 }
|
|
579
|
+
}
|
|
72
580
|
};
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
581
|
+
var GEMINI_3_5_FLASH = {
|
|
582
|
+
name: "gemini-3.5-flash",
|
|
583
|
+
max_input_tokens: 1048576,
|
|
584
|
+
max_output_tokens: 65536,
|
|
585
|
+
supports: {
|
|
586
|
+
input: [
|
|
587
|
+
"text",
|
|
588
|
+
"image",
|
|
589
|
+
"video",
|
|
590
|
+
"document",
|
|
591
|
+
"audio"
|
|
592
|
+
],
|
|
593
|
+
output: ["text"],
|
|
594
|
+
capabilities: [
|
|
595
|
+
"batch_api",
|
|
596
|
+
"caching",
|
|
597
|
+
"function_calling",
|
|
598
|
+
"structured_output",
|
|
599
|
+
"thinking"
|
|
600
|
+
],
|
|
601
|
+
tools: [
|
|
602
|
+
"code_execution",
|
|
603
|
+
"file_search",
|
|
604
|
+
"google_search",
|
|
605
|
+
"google_maps",
|
|
606
|
+
"url_context",
|
|
607
|
+
"computer_use"
|
|
608
|
+
]
|
|
609
|
+
},
|
|
610
|
+
pricing: {
|
|
611
|
+
input: {
|
|
612
|
+
normal: 1.5,
|
|
613
|
+
cached: .15
|
|
614
|
+
},
|
|
615
|
+
output: { normal: 9 }
|
|
616
|
+
}
|
|
617
|
+
};
|
|
618
|
+
var GEMINI_3_5_FLASH_LITE = {
|
|
619
|
+
name: "gemini-3.5-flash-lite",
|
|
620
|
+
max_input_tokens: 1048576,
|
|
621
|
+
max_output_tokens: 65536,
|
|
622
|
+
knowledge_cutoff: "2025-01-01",
|
|
623
|
+
supports: {
|
|
624
|
+
input: [
|
|
625
|
+
"text",
|
|
626
|
+
"image",
|
|
627
|
+
"video",
|
|
628
|
+
"audio",
|
|
629
|
+
"document"
|
|
630
|
+
],
|
|
631
|
+
output: ["text"],
|
|
632
|
+
capabilities: [
|
|
633
|
+
"batch_api",
|
|
634
|
+
"caching",
|
|
635
|
+
"function_calling",
|
|
636
|
+
"structured_output",
|
|
637
|
+
"thinking"
|
|
638
|
+
],
|
|
639
|
+
tools: [
|
|
640
|
+
"code_execution",
|
|
641
|
+
"file_search",
|
|
642
|
+
"google_search",
|
|
643
|
+
"google_maps",
|
|
644
|
+
"url_context"
|
|
645
|
+
]
|
|
646
|
+
},
|
|
647
|
+
pricing: {
|
|
648
|
+
input: {
|
|
649
|
+
normal: .3,
|
|
650
|
+
cached: .03
|
|
651
|
+
},
|
|
652
|
+
output: { normal: 2.5 }
|
|
653
|
+
}
|
|
654
|
+
};
|
|
655
|
+
var GEMINI_MODELS = [
|
|
656
|
+
GEMINI_3_6_FLASH.name,
|
|
657
|
+
GEMINI_3_5_FLASH.name,
|
|
658
|
+
GEMINI_3_5_FLASH_LITE.name,
|
|
659
|
+
GEMINI_3_1_PRO.name,
|
|
660
|
+
GEMINI_3_FLASH.name,
|
|
661
|
+
GEMINI_3_1_FLASH_LITE.name,
|
|
662
|
+
GEMINI_3_1_FLASH_LITE_PREVIEW.name,
|
|
663
|
+
GEMINI_2_5_PRO.name,
|
|
664
|
+
GEMINI_2_5_FLASH.name,
|
|
665
|
+
GEMINI_2_5_FLASH_LITE.name
|
|
82
666
|
];
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
667
|
+
/**
|
|
668
|
+
* Gemini models that support combining `tools` + `responseSchema` in a
|
|
669
|
+
* single streaming `generateContent` call (per issue #605). Per the
|
|
670
|
+
* provider matrix, Gemini 3.x natively interleaves the schema-constrained
|
|
671
|
+
* answer with function-calling on one pass; Gemini 2.x is unsupported /
|
|
672
|
+
* brittle and keeps the engine's legacy finalization fallback.
|
|
673
|
+
*/
|
|
674
|
+
var GEMINI_COMBINED_TOOLS_AND_SCHEMA_MODELS = /* @__PURE__ */ new Set([
|
|
675
|
+
GEMINI_3_6_FLASH.name,
|
|
676
|
+
GEMINI_3_5_FLASH.name,
|
|
677
|
+
GEMINI_3_5_FLASH_LITE.name,
|
|
678
|
+
GEMINI_3_1_PRO.name,
|
|
679
|
+
GEMINI_3_FLASH.name,
|
|
680
|
+
GEMINI_3_1_FLASH_LITE.name,
|
|
681
|
+
GEMINI_3_1_FLASH_LITE_PREVIEW.name
|
|
89
682
|
]);
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
];
|
|
99
|
-
const GEMINI_TTS_MODELS = [
|
|
100
|
-
GEMINI_3_1_FLASH_TTS.name,
|
|
101
|
-
GEMINI_2_5_FLASH_TTS.name,
|
|
102
|
-
GEMINI_2_5_PRO_TTS.name
|
|
103
|
-
];
|
|
104
|
-
const GEMINI_AUDIO_MODELS = [
|
|
105
|
-
LYRIA_3_PRO.name,
|
|
106
|
-
LYRIA_3_CLIP.name
|
|
683
|
+
var GEMINI_IMAGE_MODELS = [
|
|
684
|
+
GEMINI_3_1_FLASH_IMAGE.name,
|
|
685
|
+
GEMINI_3_1_FLASH_LITE_IMAGE.name,
|
|
686
|
+
GEMINI_3_PRO_IMAGE.name,
|
|
687
|
+
GEMINI_2_5_FLASH_IMAGE.name,
|
|
688
|
+
IMAGEN_4_GENERATE.name,
|
|
689
|
+
IMAGEN_4_GENERATE_FAST.name,
|
|
690
|
+
IMAGEN_4_GENERATE_ULTRA.name
|
|
107
691
|
];
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
"Aoede",
|
|
117
|
-
"Callirrhoe",
|
|
118
|
-
"Autonoe",
|
|
119
|
-
"Enceladus",
|
|
120
|
-
"Iapetus",
|
|
121
|
-
"Umbriel",
|
|
122
|
-
"Algieba",
|
|
123
|
-
"Despina",
|
|
124
|
-
"Erinome",
|
|
125
|
-
"Algenib",
|
|
126
|
-
"Rasalgethi",
|
|
127
|
-
"Laomedeia",
|
|
128
|
-
"Achernar",
|
|
129
|
-
"Alnilam",
|
|
130
|
-
"Schedar",
|
|
131
|
-
"Gacrux",
|
|
132
|
-
"Pulcherrima",
|
|
133
|
-
"Achird",
|
|
134
|
-
"Zubenelgenubi",
|
|
135
|
-
"Vindemiatrix",
|
|
136
|
-
"Sadachbia",
|
|
137
|
-
"Sadaltager",
|
|
138
|
-
"Sulafat"
|
|
692
|
+
/**
|
|
693
|
+
* Text-to-speech models
|
|
694
|
+
* @experimental Gemini TTS is an experimental feature and may change.
|
|
695
|
+
*/
|
|
696
|
+
var GEMINI_TTS_MODELS = [
|
|
697
|
+
GEMINI_3_1_FLASH_TTS.name,
|
|
698
|
+
GEMINI_2_5_FLASH_TTS.name,
|
|
699
|
+
GEMINI_2_5_PRO_TTS.name
|
|
139
700
|
];
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
701
|
+
/**
|
|
702
|
+
* Audio generation models (Lyria music generation).
|
|
703
|
+
* @experimental Lyria music generation is an experimental feature and may change.
|
|
704
|
+
*/
|
|
705
|
+
var GEMINI_AUDIO_MODELS = [LYRIA_3_PRO.name, LYRIA_3_CLIP.name];
|
|
706
|
+
/**
|
|
707
|
+
* Available voice names for Gemini TTS
|
|
708
|
+
* @see https://ai.google.dev/gemini-api/docs/speech-generation
|
|
709
|
+
*/
|
|
710
|
+
var GEMINI_TTS_VOICES = [
|
|
711
|
+
"Zephyr",
|
|
712
|
+
"Puck",
|
|
713
|
+
"Charon",
|
|
714
|
+
"Kore",
|
|
715
|
+
"Fenrir",
|
|
716
|
+
"Leda",
|
|
717
|
+
"Orus",
|
|
718
|
+
"Aoede",
|
|
719
|
+
"Callirrhoe",
|
|
720
|
+
"Autonoe",
|
|
721
|
+
"Enceladus",
|
|
722
|
+
"Iapetus",
|
|
723
|
+
"Umbriel",
|
|
724
|
+
"Algieba",
|
|
725
|
+
"Despina",
|
|
726
|
+
"Erinome",
|
|
727
|
+
"Algenib",
|
|
728
|
+
"Rasalgethi",
|
|
729
|
+
"Laomedeia",
|
|
730
|
+
"Achernar",
|
|
731
|
+
"Alnilam",
|
|
732
|
+
"Schedar",
|
|
733
|
+
"Gacrux",
|
|
734
|
+
"Pulcherrima",
|
|
735
|
+
"Achird",
|
|
736
|
+
"Zubenelgenubi",
|
|
737
|
+
"Vindemiatrix",
|
|
738
|
+
"Sadachbia",
|
|
739
|
+
"Sadaltager",
|
|
740
|
+
"Sulafat"
|
|
145
741
|
];
|
|
146
|
-
|
|
147
|
-
|
|
742
|
+
/**
|
|
743
|
+
* Video generation models. Veo models run on the long-running
|
|
744
|
+
* `:predictLongRunning` flow; Gemini Omni Flash runs on the Interactions
|
|
745
|
+
* API — the video adapter routes by model.
|
|
746
|
+
* @experimental Video generation is an experimental feature and may change.
|
|
747
|
+
*/
|
|
748
|
+
var GEMINI_VIDEO_MODELS = [
|
|
749
|
+
VEO_3_1_PREVIEW.name,
|
|
750
|
+
VEO_3_1_FAST_PREVIEW.name,
|
|
751
|
+
VEO_3_1_LITE_PREVIEW.name,
|
|
752
|
+
GEMINI_OMNI_FLASH_PREVIEW.name
|
|
148
753
|
];
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
//#
|
|
754
|
+
/**
|
|
755
|
+
* Video models served by the Interactions API rather than Veo's
|
|
756
|
+
* `:predictLongRunning` operations flow.
|
|
757
|
+
* @experimental Omni video generation is an experimental feature and may change.
|
|
758
|
+
*/
|
|
759
|
+
var GEMINI_INTERACTIONS_VIDEO_MODELS = [GEMINI_OMNI_FLASH_PREVIEW.name];
|
|
760
|
+
/**
|
|
761
|
+
* Embedding models
|
|
762
|
+
*/
|
|
763
|
+
var GEMINI_EMBEDDING_MODELS = ["gemini-embedding-001"];
|
|
764
|
+
//#endregion
|
|
765
|
+
export { GEMINI_AUDIO_MODELS, GEMINI_COMBINED_TOOLS_AND_SCHEMA_MODELS, GEMINI_EMBEDDING_MODELS, GEMINI_IMAGE_MODELS, GEMINI_INTERACTIONS_VIDEO_MODELS, GEMINI_MODELS, GEMINI_TTS_MODELS, GEMINI_TTS_VOICES, GEMINI_VIDEO_MODELS };
|
|
766
|
+
|
|
767
|
+
//# sourceMappingURL=model-meta.js.map
|