llm.rb 4.8.0 → 4.9.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.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +337 -590
  3. data/data/anthropic.json +770 -0
  4. data/data/deepseek.json +75 -0
  5. data/data/google.json +1050 -0
  6. data/data/openai.json +1421 -0
  7. data/data/xai.json +792 -0
  8. data/data/zai.json +330 -0
  9. data/lib/llm/agent.rb +42 -41
  10. data/lib/llm/bot.rb +1 -263
  11. data/lib/llm/buffer.rb +7 -0
  12. data/lib/llm/{session → context}/deserializer.rb +4 -3
  13. data/lib/llm/context.rb +292 -0
  14. data/lib/llm/cost.rb +26 -0
  15. data/lib/llm/error.rb +8 -0
  16. data/lib/llm/function/array.rb +61 -0
  17. data/lib/llm/function/fiber_group.rb +91 -0
  18. data/lib/llm/function/task_group.rb +89 -0
  19. data/lib/llm/function/thread_group.rb +94 -0
  20. data/lib/llm/function.rb +75 -10
  21. data/lib/llm/mcp/command.rb +108 -0
  22. data/lib/llm/mcp/error.rb +31 -0
  23. data/lib/llm/mcp/pipe.rb +82 -0
  24. data/lib/llm/mcp/rpc.rb +118 -0
  25. data/lib/llm/mcp/transport/stdio.rb +85 -0
  26. data/lib/llm/mcp.rb +102 -0
  27. data/lib/llm/message.rb +13 -11
  28. data/lib/llm/model.rb +2 -2
  29. data/lib/llm/prompt.rb +17 -7
  30. data/lib/llm/provider.rb +32 -17
  31. data/lib/llm/providers/anthropic/files.rb +3 -3
  32. data/lib/llm/providers/anthropic.rb +19 -4
  33. data/lib/llm/providers/deepseek.rb +10 -3
  34. data/lib/llm/providers/{gemini → google}/audio.rb +6 -6
  35. data/lib/llm/providers/{gemini → google}/error_handler.rb +2 -2
  36. data/lib/llm/providers/{gemini → google}/files.rb +11 -11
  37. data/lib/llm/providers/{gemini → google}/images.rb +7 -7
  38. data/lib/llm/providers/{gemini → google}/models.rb +5 -5
  39. data/lib/llm/providers/{gemini → google}/request_adapter/completion.rb +7 -3
  40. data/lib/llm/providers/{gemini → google}/request_adapter.rb +1 -1
  41. data/lib/llm/providers/{gemini → google}/response_adapter/completion.rb +7 -7
  42. data/lib/llm/providers/{gemini → google}/response_adapter/embedding.rb +1 -1
  43. data/lib/llm/providers/{gemini → google}/response_adapter/file.rb +1 -1
  44. data/lib/llm/providers/{gemini → google}/response_adapter/files.rb +1 -1
  45. data/lib/llm/providers/{gemini → google}/response_adapter/image.rb +1 -1
  46. data/lib/llm/providers/{gemini → google}/response_adapter/models.rb +1 -1
  47. data/lib/llm/providers/{gemini → google}/response_adapter/web_search.rb +2 -2
  48. data/lib/llm/providers/{gemini → google}/response_adapter.rb +8 -8
  49. data/lib/llm/providers/{gemini → google}/stream_parser.rb +3 -3
  50. data/lib/llm/providers/{gemini.rb → google.rb} +41 -26
  51. data/lib/llm/providers/llamacpp.rb +10 -3
  52. data/lib/llm/providers/ollama.rb +19 -4
  53. data/lib/llm/providers/openai/files.rb +3 -3
  54. data/lib/llm/providers/openai/response_adapter/completion.rb +9 -1
  55. data/lib/llm/providers/openai/response_adapter/responds.rb +9 -1
  56. data/lib/llm/providers/openai/responses.rb +9 -1
  57. data/lib/llm/providers/openai/stream_parser.rb +2 -0
  58. data/lib/llm/providers/openai.rb +19 -4
  59. data/lib/llm/providers/xai.rb +10 -3
  60. data/lib/llm/providers/zai.rb +9 -2
  61. data/lib/llm/registry.rb +81 -0
  62. data/lib/llm/schema/parser.rb +109 -0
  63. data/lib/llm/schema.rb +4 -0
  64. data/lib/llm/server_tool.rb +5 -5
  65. data/lib/llm/session.rb +10 -1
  66. data/lib/llm/tool.rb +85 -4
  67. data/lib/llm/tracer/logger.rb +1 -1
  68. data/lib/llm/tracer/telemetry.rb +7 -7
  69. data/lib/llm/tracer.rb +3 -3
  70. data/lib/llm/usage.rb +5 -0
  71. data/lib/llm/version.rb +1 -1
  72. data/lib/llm.rb +39 -6
  73. data/llm.gemspec +45 -8
  74. metadata +81 -28
data/data/google.json ADDED
@@ -0,0 +1,1050 @@
1
+ {
2
+ "id": "google",
3
+ "env": [
4
+ "GOOGLE_GENERATIVE_AI_API_KEY",
5
+ "GEMINI_API_KEY"
6
+ ],
7
+ "npm": "@ai-sdk/google",
8
+ "name": "Google",
9
+ "doc": "https://ai.google.dev/gemini-api/docs/pricing",
10
+ "models": {
11
+ "gemini-embedding-001": {
12
+ "id": "gemini-embedding-001",
13
+ "name": "Gemini Embedding 001",
14
+ "family": "gemini",
15
+ "attachment": false,
16
+ "reasoning": false,
17
+ "tool_call": false,
18
+ "temperature": false,
19
+ "knowledge": "2025-05",
20
+ "release_date": "2025-05-20",
21
+ "last_updated": "2025-05-20",
22
+ "modalities": {
23
+ "input": [
24
+ "text"
25
+ ],
26
+ "output": [
27
+ "text"
28
+ ]
29
+ },
30
+ "open_weights": false,
31
+ "cost": {
32
+ "input": 0.15,
33
+ "output": 0
34
+ },
35
+ "limit": {
36
+ "context": 2048,
37
+ "output": 3072
38
+ }
39
+ },
40
+ "gemini-2.5-flash-lite-preview-09-2025": {
41
+ "id": "gemini-2.5-flash-lite-preview-09-2025",
42
+ "name": "Gemini 2.5 Flash Lite Preview 09-25",
43
+ "family": "gemini-flash-lite",
44
+ "attachment": true,
45
+ "reasoning": true,
46
+ "tool_call": true,
47
+ "structured_output": true,
48
+ "temperature": true,
49
+ "knowledge": "2025-01",
50
+ "release_date": "2025-09-25",
51
+ "last_updated": "2025-09-25",
52
+ "modalities": {
53
+ "input": [
54
+ "text",
55
+ "image",
56
+ "audio",
57
+ "video",
58
+ "pdf"
59
+ ],
60
+ "output": [
61
+ "text"
62
+ ]
63
+ },
64
+ "open_weights": false,
65
+ "cost": {
66
+ "input": 0.1,
67
+ "output": 0.4,
68
+ "cache_read": 0.025
69
+ },
70
+ "limit": {
71
+ "context": 1048576,
72
+ "output": 65536
73
+ }
74
+ },
75
+ "gemini-3.1-pro-preview-customtools": {
76
+ "id": "gemini-3.1-pro-preview-customtools",
77
+ "name": "Gemini 3.1 Pro Preview Custom Tools",
78
+ "family": "gemini-pro",
79
+ "attachment": true,
80
+ "reasoning": true,
81
+ "tool_call": true,
82
+ "structured_output": true,
83
+ "temperature": true,
84
+ "knowledge": "2025-01",
85
+ "release_date": "2026-02-19",
86
+ "last_updated": "2026-02-19",
87
+ "modalities": {
88
+ "input": [
89
+ "text",
90
+ "image",
91
+ "video",
92
+ "audio",
93
+ "pdf"
94
+ ],
95
+ "output": [
96
+ "text"
97
+ ]
98
+ },
99
+ "open_weights": false,
100
+ "cost": {
101
+ "input": 2,
102
+ "output": 12,
103
+ "cache_read": 0.2,
104
+ "context_over_200k": {
105
+ "input": 4,
106
+ "output": 18,
107
+ "cache_read": 0.4
108
+ }
109
+ },
110
+ "limit": {
111
+ "context": 1048576,
112
+ "output": 65536
113
+ }
114
+ },
115
+ "gemini-2.5-pro-preview-06-05": {
116
+ "id": "gemini-2.5-pro-preview-06-05",
117
+ "name": "Gemini 2.5 Pro Preview 06-05",
118
+ "family": "gemini-pro",
119
+ "attachment": true,
120
+ "reasoning": true,
121
+ "tool_call": true,
122
+ "structured_output": true,
123
+ "temperature": true,
124
+ "knowledge": "2025-01",
125
+ "release_date": "2025-06-05",
126
+ "last_updated": "2025-06-05",
127
+ "modalities": {
128
+ "input": [
129
+ "text",
130
+ "image",
131
+ "audio",
132
+ "video",
133
+ "pdf"
134
+ ],
135
+ "output": [
136
+ "text"
137
+ ]
138
+ },
139
+ "open_weights": false,
140
+ "cost": {
141
+ "input": 1.25,
142
+ "output": 10,
143
+ "cache_read": 0.31
144
+ },
145
+ "limit": {
146
+ "context": 1048576,
147
+ "output": 65536
148
+ }
149
+ },
150
+ "gemini-2.5-flash-preview-04-17": {
151
+ "id": "gemini-2.5-flash-preview-04-17",
152
+ "name": "Gemini 2.5 Flash Preview 04-17",
153
+ "family": "gemini-flash",
154
+ "attachment": true,
155
+ "reasoning": true,
156
+ "tool_call": true,
157
+ "temperature": true,
158
+ "knowledge": "2025-01",
159
+ "release_date": "2025-04-17",
160
+ "last_updated": "2025-04-17",
161
+ "modalities": {
162
+ "input": [
163
+ "text",
164
+ "image",
165
+ "audio",
166
+ "video",
167
+ "pdf"
168
+ ],
169
+ "output": [
170
+ "text"
171
+ ]
172
+ },
173
+ "open_weights": false,
174
+ "cost": {
175
+ "input": 0.15,
176
+ "output": 0.6,
177
+ "cache_read": 0.0375
178
+ },
179
+ "limit": {
180
+ "context": 1048576,
181
+ "output": 65536
182
+ }
183
+ },
184
+ "gemini-2.5-flash-preview-09-2025": {
185
+ "id": "gemini-2.5-flash-preview-09-2025",
186
+ "name": "Gemini 2.5 Flash Preview 09-25",
187
+ "family": "gemini-flash",
188
+ "attachment": true,
189
+ "reasoning": true,
190
+ "tool_call": true,
191
+ "structured_output": true,
192
+ "temperature": true,
193
+ "knowledge": "2025-01",
194
+ "release_date": "2025-09-25",
195
+ "last_updated": "2025-09-25",
196
+ "modalities": {
197
+ "input": [
198
+ "text",
199
+ "image",
200
+ "audio",
201
+ "video",
202
+ "pdf"
203
+ ],
204
+ "output": [
205
+ "text"
206
+ ]
207
+ },
208
+ "open_weights": false,
209
+ "cost": {
210
+ "input": 0.3,
211
+ "output": 2.5,
212
+ "cache_read": 0.075,
213
+ "input_audio": 1
214
+ },
215
+ "limit": {
216
+ "context": 1048576,
217
+ "output": 65536
218
+ }
219
+ },
220
+ "gemini-2.5-pro-preview-05-06": {
221
+ "id": "gemini-2.5-pro-preview-05-06",
222
+ "name": "Gemini 2.5 Pro Preview 05-06",
223
+ "family": "gemini-pro",
224
+ "attachment": true,
225
+ "reasoning": true,
226
+ "tool_call": true,
227
+ "structured_output": true,
228
+ "temperature": true,
229
+ "knowledge": "2025-01",
230
+ "release_date": "2025-05-06",
231
+ "last_updated": "2025-05-06",
232
+ "modalities": {
233
+ "input": [
234
+ "text",
235
+ "image",
236
+ "audio",
237
+ "video",
238
+ "pdf"
239
+ ],
240
+ "output": [
241
+ "text"
242
+ ]
243
+ },
244
+ "open_weights": false,
245
+ "cost": {
246
+ "input": 1.25,
247
+ "output": 10,
248
+ "cache_read": 0.31
249
+ },
250
+ "limit": {
251
+ "context": 1048576,
252
+ "output": 65536
253
+ }
254
+ },
255
+ "gemini-2.5-flash-preview-05-20": {
256
+ "id": "gemini-2.5-flash-preview-05-20",
257
+ "name": "Gemini 2.5 Flash Preview 05-20",
258
+ "family": "gemini-flash",
259
+ "attachment": true,
260
+ "reasoning": true,
261
+ "tool_call": true,
262
+ "structured_output": true,
263
+ "temperature": true,
264
+ "knowledge": "2025-01",
265
+ "release_date": "2025-05-20",
266
+ "last_updated": "2025-05-20",
267
+ "modalities": {
268
+ "input": [
269
+ "text",
270
+ "image",
271
+ "audio",
272
+ "video",
273
+ "pdf"
274
+ ],
275
+ "output": [
276
+ "text"
277
+ ]
278
+ },
279
+ "open_weights": false,
280
+ "cost": {
281
+ "input": 0.15,
282
+ "output": 0.6,
283
+ "cache_read": 0.0375
284
+ },
285
+ "limit": {
286
+ "context": 1048576,
287
+ "output": 65536
288
+ }
289
+ },
290
+ "gemini-2.5-flash": {
291
+ "id": "gemini-2.5-flash",
292
+ "name": "Gemini 2.5 Flash",
293
+ "family": "gemini-flash",
294
+ "attachment": true,
295
+ "reasoning": true,
296
+ "tool_call": true,
297
+ "structured_output": true,
298
+ "temperature": true,
299
+ "knowledge": "2025-01",
300
+ "release_date": "2025-03-20",
301
+ "last_updated": "2025-06-05",
302
+ "modalities": {
303
+ "input": [
304
+ "text",
305
+ "image",
306
+ "audio",
307
+ "video",
308
+ "pdf"
309
+ ],
310
+ "output": [
311
+ "text"
312
+ ]
313
+ },
314
+ "open_weights": false,
315
+ "cost": {
316
+ "input": 0.3,
317
+ "output": 2.5,
318
+ "cache_read": 0.075,
319
+ "input_audio": 1
320
+ },
321
+ "limit": {
322
+ "context": 1048576,
323
+ "output": 65536
324
+ }
325
+ },
326
+ "gemini-3.1-flash-image-preview": {
327
+ "id": "gemini-3.1-flash-image-preview",
328
+ "name": "Gemini 3.1 Flash Image (Preview)",
329
+ "family": "gemini-flash",
330
+ "attachment": true,
331
+ "reasoning": true,
332
+ "tool_call": false,
333
+ "temperature": true,
334
+ "knowledge": "2025-01",
335
+ "release_date": "2026-02-26",
336
+ "last_updated": "2026-02-26",
337
+ "modalities": {
338
+ "input": [
339
+ "text",
340
+ "image",
341
+ "pdf"
342
+ ],
343
+ "output": [
344
+ "text",
345
+ "image"
346
+ ]
347
+ },
348
+ "open_weights": false,
349
+ "cost": {
350
+ "input": 0.25,
351
+ "output": 60
352
+ },
353
+ "limit": {
354
+ "context": 131072,
355
+ "output": 32768
356
+ }
357
+ },
358
+ "gemini-3.1-flash-lite-preview": {
359
+ "id": "gemini-3.1-flash-lite-preview",
360
+ "name": "Gemini 3.1 Flash Lite Preview",
361
+ "family": "gemini-flash-lite",
362
+ "attachment": true,
363
+ "reasoning": true,
364
+ "tool_call": true,
365
+ "structured_output": true,
366
+ "temperature": true,
367
+ "knowledge": "2025-01",
368
+ "release_date": "2026-03-03",
369
+ "last_updated": "2026-03-03",
370
+ "modalities": {
371
+ "input": [
372
+ "text",
373
+ "image",
374
+ "video",
375
+ "audio",
376
+ "pdf"
377
+ ],
378
+ "output": [
379
+ "text"
380
+ ]
381
+ },
382
+ "open_weights": false,
383
+ "cost": {
384
+ "input": 0.25,
385
+ "output": 1.5,
386
+ "cache_read": 0.025,
387
+ "cache_write": 1
388
+ },
389
+ "limit": {
390
+ "context": 1048576,
391
+ "output": 65536
392
+ }
393
+ },
394
+ "gemini-live-2.5-flash": {
395
+ "id": "gemini-live-2.5-flash",
396
+ "name": "Gemini Live 2.5 Flash",
397
+ "family": "gemini-flash",
398
+ "attachment": true,
399
+ "reasoning": true,
400
+ "tool_call": true,
401
+ "temperature": true,
402
+ "knowledge": "2025-01",
403
+ "release_date": "2025-09-01",
404
+ "last_updated": "2025-09-01",
405
+ "modalities": {
406
+ "input": [
407
+ "text",
408
+ "image",
409
+ "audio",
410
+ "video"
411
+ ],
412
+ "output": [
413
+ "text",
414
+ "audio"
415
+ ]
416
+ },
417
+ "open_weights": false,
418
+ "cost": {
419
+ "input": 0.5,
420
+ "output": 2,
421
+ "input_audio": 3,
422
+ "output_audio": 12
423
+ },
424
+ "limit": {
425
+ "context": 128000,
426
+ "output": 8000
427
+ }
428
+ },
429
+ "gemini-3-flash-preview": {
430
+ "id": "gemini-3-flash-preview",
431
+ "name": "Gemini 3 Flash Preview",
432
+ "family": "gemini-flash",
433
+ "attachment": true,
434
+ "reasoning": true,
435
+ "tool_call": true,
436
+ "structured_output": true,
437
+ "temperature": true,
438
+ "knowledge": "2025-01",
439
+ "release_date": "2025-12-17",
440
+ "last_updated": "2025-12-17",
441
+ "modalities": {
442
+ "input": [
443
+ "text",
444
+ "image",
445
+ "video",
446
+ "audio",
447
+ "pdf"
448
+ ],
449
+ "output": [
450
+ "text"
451
+ ]
452
+ },
453
+ "open_weights": false,
454
+ "cost": {
455
+ "input": 0.5,
456
+ "output": 3,
457
+ "cache_read": 0.05,
458
+ "context_over_200k": {
459
+ "input": 0.5,
460
+ "output": 3,
461
+ "cache_read": 0.05
462
+ }
463
+ },
464
+ "limit": {
465
+ "context": 1048576,
466
+ "output": 65536
467
+ }
468
+ },
469
+ "gemini-live-2.5-flash-preview-native-audio": {
470
+ "id": "gemini-live-2.5-flash-preview-native-audio",
471
+ "name": "Gemini Live 2.5 Flash Preview Native Audio",
472
+ "family": "gemini-flash",
473
+ "attachment": false,
474
+ "reasoning": true,
475
+ "tool_call": true,
476
+ "temperature": false,
477
+ "knowledge": "2025-01",
478
+ "release_date": "2025-06-17",
479
+ "last_updated": "2025-09-18",
480
+ "modalities": {
481
+ "input": [
482
+ "text",
483
+ "audio",
484
+ "video"
485
+ ],
486
+ "output": [
487
+ "text",
488
+ "audio"
489
+ ]
490
+ },
491
+ "open_weights": false,
492
+ "cost": {
493
+ "input": 0.5,
494
+ "output": 2,
495
+ "input_audio": 3,
496
+ "output_audio": 12
497
+ },
498
+ "limit": {
499
+ "context": 131072,
500
+ "output": 65536
501
+ }
502
+ },
503
+ "gemini-2.5-flash-lite": {
504
+ "id": "gemini-2.5-flash-lite",
505
+ "name": "Gemini 2.5 Flash Lite",
506
+ "family": "gemini-flash-lite",
507
+ "attachment": true,
508
+ "reasoning": true,
509
+ "tool_call": true,
510
+ "structured_output": true,
511
+ "temperature": true,
512
+ "knowledge": "2025-01",
513
+ "release_date": "2025-06-17",
514
+ "last_updated": "2025-06-17",
515
+ "modalities": {
516
+ "input": [
517
+ "text",
518
+ "image",
519
+ "audio",
520
+ "video",
521
+ "pdf"
522
+ ],
523
+ "output": [
524
+ "text"
525
+ ]
526
+ },
527
+ "open_weights": false,
528
+ "cost": {
529
+ "input": 0.1,
530
+ "output": 0.4,
531
+ "cache_read": 0.025
532
+ },
533
+ "limit": {
534
+ "context": 1048576,
535
+ "output": 65536
536
+ }
537
+ },
538
+ "gemini-2.5-flash-preview-tts": {
539
+ "id": "gemini-2.5-flash-preview-tts",
540
+ "name": "Gemini 2.5 Flash Preview TTS",
541
+ "family": "gemini-flash",
542
+ "attachment": false,
543
+ "reasoning": false,
544
+ "tool_call": false,
545
+ "temperature": false,
546
+ "knowledge": "2025-01",
547
+ "release_date": "2025-05-01",
548
+ "last_updated": "2025-05-01",
549
+ "modalities": {
550
+ "input": [
551
+ "text"
552
+ ],
553
+ "output": [
554
+ "audio"
555
+ ]
556
+ },
557
+ "open_weights": false,
558
+ "cost": {
559
+ "input": 0.5,
560
+ "output": 10
561
+ },
562
+ "limit": {
563
+ "context": 8000,
564
+ "output": 16000
565
+ }
566
+ },
567
+ "gemini-3.1-pro-preview": {
568
+ "id": "gemini-3.1-pro-preview",
569
+ "name": "Gemini 3.1 Pro Preview",
570
+ "family": "gemini-pro",
571
+ "attachment": true,
572
+ "reasoning": true,
573
+ "tool_call": true,
574
+ "structured_output": true,
575
+ "temperature": true,
576
+ "knowledge": "2025-01",
577
+ "release_date": "2026-02-19",
578
+ "last_updated": "2026-02-19",
579
+ "modalities": {
580
+ "input": [
581
+ "text",
582
+ "image",
583
+ "video",
584
+ "audio",
585
+ "pdf"
586
+ ],
587
+ "output": [
588
+ "text"
589
+ ]
590
+ },
591
+ "open_weights": false,
592
+ "cost": {
593
+ "input": 2,
594
+ "output": 12,
595
+ "cache_read": 0.2,
596
+ "context_over_200k": {
597
+ "input": 4,
598
+ "output": 18,
599
+ "cache_read": 0.4
600
+ }
601
+ },
602
+ "limit": {
603
+ "context": 1048576,
604
+ "output": 65536
605
+ }
606
+ },
607
+ "gemini-flash-latest": {
608
+ "id": "gemini-flash-latest",
609
+ "name": "Gemini Flash Latest",
610
+ "family": "gemini-flash",
611
+ "attachment": true,
612
+ "reasoning": true,
613
+ "tool_call": true,
614
+ "structured_output": true,
615
+ "temperature": true,
616
+ "knowledge": "2025-01",
617
+ "release_date": "2025-09-25",
618
+ "last_updated": "2025-09-25",
619
+ "modalities": {
620
+ "input": [
621
+ "text",
622
+ "image",
623
+ "audio",
624
+ "video",
625
+ "pdf"
626
+ ],
627
+ "output": [
628
+ "text"
629
+ ]
630
+ },
631
+ "open_weights": false,
632
+ "cost": {
633
+ "input": 0.3,
634
+ "output": 2.5,
635
+ "cache_read": 0.075,
636
+ "input_audio": 1
637
+ },
638
+ "limit": {
639
+ "context": 1048576,
640
+ "output": 65536
641
+ }
642
+ },
643
+ "gemini-2.5-flash-lite-preview-06-17": {
644
+ "id": "gemini-2.5-flash-lite-preview-06-17",
645
+ "name": "Gemini 2.5 Flash Lite Preview 06-17",
646
+ "family": "gemini-flash-lite",
647
+ "attachment": true,
648
+ "reasoning": true,
649
+ "tool_call": true,
650
+ "temperature": true,
651
+ "knowledge": "2025-01",
652
+ "release_date": "2025-06-17",
653
+ "last_updated": "2025-06-17",
654
+ "modalities": {
655
+ "input": [
656
+ "text",
657
+ "image",
658
+ "audio",
659
+ "video",
660
+ "pdf"
661
+ ],
662
+ "output": [
663
+ "text"
664
+ ]
665
+ },
666
+ "open_weights": false,
667
+ "cost": {
668
+ "input": 0.1,
669
+ "output": 0.4,
670
+ "cache_read": 0.025,
671
+ "input_audio": 0.3
672
+ },
673
+ "limit": {
674
+ "context": 1048576,
675
+ "output": 65536
676
+ }
677
+ },
678
+ "gemini-2.5-flash-image": {
679
+ "id": "gemini-2.5-flash-image",
680
+ "name": "Gemini 2.5 Flash Image",
681
+ "family": "gemini-flash",
682
+ "attachment": true,
683
+ "reasoning": true,
684
+ "tool_call": false,
685
+ "temperature": true,
686
+ "knowledge": "2025-06",
687
+ "release_date": "2025-08-26",
688
+ "last_updated": "2025-08-26",
689
+ "modalities": {
690
+ "input": [
691
+ "text",
692
+ "image"
693
+ ],
694
+ "output": [
695
+ "text",
696
+ "image"
697
+ ]
698
+ },
699
+ "open_weights": false,
700
+ "cost": {
701
+ "input": 0.3,
702
+ "output": 30,
703
+ "cache_read": 0.075
704
+ },
705
+ "limit": {
706
+ "context": 32768,
707
+ "output": 32768
708
+ }
709
+ },
710
+ "gemini-2.5-pro-preview-tts": {
711
+ "id": "gemini-2.5-pro-preview-tts",
712
+ "name": "Gemini 2.5 Pro Preview TTS",
713
+ "family": "gemini-flash",
714
+ "attachment": false,
715
+ "reasoning": false,
716
+ "tool_call": false,
717
+ "temperature": false,
718
+ "knowledge": "2025-01",
719
+ "release_date": "2025-05-01",
720
+ "last_updated": "2025-05-01",
721
+ "modalities": {
722
+ "input": [
723
+ "text"
724
+ ],
725
+ "output": [
726
+ "audio"
727
+ ]
728
+ },
729
+ "open_weights": false,
730
+ "cost": {
731
+ "input": 1,
732
+ "output": 20
733
+ },
734
+ "limit": {
735
+ "context": 8000,
736
+ "output": 16000
737
+ }
738
+ },
739
+ "gemini-2.5-flash-image-preview": {
740
+ "id": "gemini-2.5-flash-image-preview",
741
+ "name": "Gemini 2.5 Flash Image (Preview)",
742
+ "family": "gemini-flash",
743
+ "attachment": true,
744
+ "reasoning": true,
745
+ "tool_call": false,
746
+ "temperature": true,
747
+ "knowledge": "2025-06",
748
+ "release_date": "2025-08-26",
749
+ "last_updated": "2025-08-26",
750
+ "modalities": {
751
+ "input": [
752
+ "text",
753
+ "image"
754
+ ],
755
+ "output": [
756
+ "text",
757
+ "image"
758
+ ]
759
+ },
760
+ "open_weights": false,
761
+ "cost": {
762
+ "input": 0.3,
763
+ "output": 30,
764
+ "cache_read": 0.075
765
+ },
766
+ "limit": {
767
+ "context": 32768,
768
+ "output": 32768
769
+ }
770
+ },
771
+ "gemini-1.5-flash-8b": {
772
+ "id": "gemini-1.5-flash-8b",
773
+ "name": "Gemini 1.5 Flash-8B",
774
+ "family": "gemini-flash",
775
+ "attachment": true,
776
+ "reasoning": false,
777
+ "tool_call": true,
778
+ "temperature": true,
779
+ "knowledge": "2024-04",
780
+ "release_date": "2024-10-03",
781
+ "last_updated": "2024-10-03",
782
+ "modalities": {
783
+ "input": [
784
+ "text",
785
+ "image",
786
+ "audio",
787
+ "video"
788
+ ],
789
+ "output": [
790
+ "text"
791
+ ]
792
+ },
793
+ "open_weights": false,
794
+ "cost": {
795
+ "input": 0.0375,
796
+ "output": 0.15,
797
+ "cache_read": 0.01
798
+ },
799
+ "limit": {
800
+ "context": 1000000,
801
+ "output": 8192
802
+ }
803
+ },
804
+ "gemini-3-pro-preview": {
805
+ "id": "gemini-3-pro-preview",
806
+ "name": "Gemini 3 Pro Preview",
807
+ "family": "gemini-pro",
808
+ "attachment": true,
809
+ "reasoning": true,
810
+ "tool_call": true,
811
+ "structured_output": true,
812
+ "temperature": true,
813
+ "knowledge": "2025-01",
814
+ "release_date": "2025-11-18",
815
+ "last_updated": "2025-11-18",
816
+ "modalities": {
817
+ "input": [
818
+ "text",
819
+ "image",
820
+ "video",
821
+ "audio",
822
+ "pdf"
823
+ ],
824
+ "output": [
825
+ "text"
826
+ ]
827
+ },
828
+ "open_weights": false,
829
+ "cost": {
830
+ "input": 2,
831
+ "output": 12,
832
+ "cache_read": 0.2,
833
+ "context_over_200k": {
834
+ "input": 4,
835
+ "output": 18,
836
+ "cache_read": 0.4
837
+ }
838
+ },
839
+ "limit": {
840
+ "context": 1000000,
841
+ "output": 64000
842
+ }
843
+ },
844
+ "gemini-2.0-flash-lite": {
845
+ "id": "gemini-2.0-flash-lite",
846
+ "name": "Gemini 2.0 Flash Lite",
847
+ "family": "gemini-flash-lite",
848
+ "attachment": true,
849
+ "reasoning": false,
850
+ "tool_call": true,
851
+ "structured_output": true,
852
+ "temperature": true,
853
+ "knowledge": "2024-06",
854
+ "release_date": "2024-12-11",
855
+ "last_updated": "2024-12-11",
856
+ "modalities": {
857
+ "input": [
858
+ "text",
859
+ "image",
860
+ "audio",
861
+ "video",
862
+ "pdf"
863
+ ],
864
+ "output": [
865
+ "text"
866
+ ]
867
+ },
868
+ "open_weights": false,
869
+ "cost": {
870
+ "input": 0.075,
871
+ "output": 0.3
872
+ },
873
+ "limit": {
874
+ "context": 1048576,
875
+ "output": 8192
876
+ }
877
+ },
878
+ "gemini-1.5-flash": {
879
+ "id": "gemini-1.5-flash",
880
+ "name": "Gemini 1.5 Flash",
881
+ "family": "gemini-flash",
882
+ "attachment": true,
883
+ "reasoning": false,
884
+ "tool_call": true,
885
+ "temperature": true,
886
+ "knowledge": "2024-04",
887
+ "release_date": "2024-05-14",
888
+ "last_updated": "2024-05-14",
889
+ "modalities": {
890
+ "input": [
891
+ "text",
892
+ "image",
893
+ "audio",
894
+ "video"
895
+ ],
896
+ "output": [
897
+ "text"
898
+ ]
899
+ },
900
+ "open_weights": false,
901
+ "cost": {
902
+ "input": 0.075,
903
+ "output": 0.3,
904
+ "cache_read": 0.01875
905
+ },
906
+ "limit": {
907
+ "context": 1000000,
908
+ "output": 8192
909
+ }
910
+ },
911
+ "gemini-flash-lite-latest": {
912
+ "id": "gemini-flash-lite-latest",
913
+ "name": "Gemini Flash-Lite Latest",
914
+ "family": "gemini-flash-lite",
915
+ "attachment": true,
916
+ "reasoning": true,
917
+ "tool_call": true,
918
+ "structured_output": true,
919
+ "temperature": true,
920
+ "knowledge": "2025-01",
921
+ "release_date": "2025-09-25",
922
+ "last_updated": "2025-09-25",
923
+ "modalities": {
924
+ "input": [
925
+ "text",
926
+ "image",
927
+ "audio",
928
+ "video",
929
+ "pdf"
930
+ ],
931
+ "output": [
932
+ "text"
933
+ ]
934
+ },
935
+ "open_weights": false,
936
+ "cost": {
937
+ "input": 0.1,
938
+ "output": 0.4,
939
+ "cache_read": 0.025
940
+ },
941
+ "limit": {
942
+ "context": 1048576,
943
+ "output": 65536
944
+ }
945
+ },
946
+ "gemini-2.5-pro": {
947
+ "id": "gemini-2.5-pro",
948
+ "name": "Gemini 2.5 Pro",
949
+ "family": "gemini-pro",
950
+ "attachment": true,
951
+ "reasoning": true,
952
+ "tool_call": true,
953
+ "structured_output": true,
954
+ "temperature": true,
955
+ "knowledge": "2025-01",
956
+ "release_date": "2025-03-20",
957
+ "last_updated": "2025-06-05",
958
+ "modalities": {
959
+ "input": [
960
+ "text",
961
+ "image",
962
+ "audio",
963
+ "video",
964
+ "pdf"
965
+ ],
966
+ "output": [
967
+ "text"
968
+ ]
969
+ },
970
+ "open_weights": false,
971
+ "cost": {
972
+ "input": 1.25,
973
+ "output": 10,
974
+ "cache_read": 0.31
975
+ },
976
+ "limit": {
977
+ "context": 1048576,
978
+ "output": 65536
979
+ }
980
+ },
981
+ "gemini-2.0-flash": {
982
+ "id": "gemini-2.0-flash",
983
+ "name": "Gemini 2.0 Flash",
984
+ "family": "gemini-flash",
985
+ "attachment": true,
986
+ "reasoning": false,
987
+ "tool_call": true,
988
+ "structured_output": true,
989
+ "temperature": true,
990
+ "knowledge": "2024-06",
991
+ "release_date": "2024-12-11",
992
+ "last_updated": "2024-12-11",
993
+ "modalities": {
994
+ "input": [
995
+ "text",
996
+ "image",
997
+ "audio",
998
+ "video",
999
+ "pdf"
1000
+ ],
1001
+ "output": [
1002
+ "text"
1003
+ ]
1004
+ },
1005
+ "open_weights": false,
1006
+ "cost": {
1007
+ "input": 0.1,
1008
+ "output": 0.4,
1009
+ "cache_read": 0.025
1010
+ },
1011
+ "limit": {
1012
+ "context": 1048576,
1013
+ "output": 8192
1014
+ }
1015
+ },
1016
+ "gemini-1.5-pro": {
1017
+ "id": "gemini-1.5-pro",
1018
+ "name": "Gemini 1.5 Pro",
1019
+ "family": "gemini-pro",
1020
+ "attachment": true,
1021
+ "reasoning": false,
1022
+ "tool_call": true,
1023
+ "temperature": true,
1024
+ "knowledge": "2024-04",
1025
+ "release_date": "2024-02-15",
1026
+ "last_updated": "2024-02-15",
1027
+ "modalities": {
1028
+ "input": [
1029
+ "text",
1030
+ "image",
1031
+ "audio",
1032
+ "video"
1033
+ ],
1034
+ "output": [
1035
+ "text"
1036
+ ]
1037
+ },
1038
+ "open_weights": false,
1039
+ "cost": {
1040
+ "input": 1.25,
1041
+ "output": 5,
1042
+ "cache_read": 0.3125
1043
+ },
1044
+ "limit": {
1045
+ "context": 1000000,
1046
+ "output": 8192
1047
+ }
1048
+ }
1049
+ }
1050
+ }