llm.rb 4.7.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 (95) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +335 -587
  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/eventstream/parser.rb +0 -5
  17. data/lib/llm/function/array.rb +61 -0
  18. data/lib/llm/function/fiber_group.rb +91 -0
  19. data/lib/llm/function/task_group.rb +89 -0
  20. data/lib/llm/function/thread_group.rb +94 -0
  21. data/lib/llm/function.rb +75 -10
  22. data/lib/llm/mcp/command.rb +108 -0
  23. data/lib/llm/mcp/error.rb +31 -0
  24. data/lib/llm/mcp/pipe.rb +82 -0
  25. data/lib/llm/mcp/rpc.rb +118 -0
  26. data/lib/llm/mcp/transport/stdio.rb +85 -0
  27. data/lib/llm/mcp.rb +102 -0
  28. data/lib/llm/message.rb +13 -11
  29. data/lib/llm/model.rb +115 -0
  30. data/lib/llm/prompt.rb +17 -7
  31. data/lib/llm/provider.rb +60 -32
  32. data/lib/llm/providers/anthropic/error_handler.rb +1 -1
  33. data/lib/llm/providers/anthropic/files.rb +3 -3
  34. data/lib/llm/providers/anthropic/models.rb +1 -1
  35. data/lib/llm/providers/anthropic/request_adapter.rb +20 -3
  36. data/lib/llm/providers/anthropic/response_adapter/models.rb +13 -0
  37. data/lib/llm/providers/anthropic/response_adapter.rb +2 -0
  38. data/lib/llm/providers/anthropic.rb +21 -5
  39. data/lib/llm/providers/deepseek.rb +10 -3
  40. data/lib/llm/providers/{gemini → google}/audio.rb +6 -6
  41. data/lib/llm/providers/{gemini → google}/error_handler.rb +20 -5
  42. data/lib/llm/providers/{gemini → google}/files.rb +11 -11
  43. data/lib/llm/providers/{gemini → google}/images.rb +7 -7
  44. data/lib/llm/providers/{gemini → google}/models.rb +5 -5
  45. data/lib/llm/providers/{gemini → google}/request_adapter/completion.rb +7 -3
  46. data/lib/llm/providers/{gemini → google}/request_adapter.rb +1 -1
  47. data/lib/llm/providers/{gemini → google}/response_adapter/completion.rb +7 -7
  48. data/lib/llm/providers/{gemini → google}/response_adapter/embedding.rb +1 -1
  49. data/lib/llm/providers/{gemini → google}/response_adapter/file.rb +1 -1
  50. data/lib/llm/providers/{gemini → google}/response_adapter/files.rb +1 -1
  51. data/lib/llm/providers/{gemini → google}/response_adapter/image.rb +1 -1
  52. data/lib/llm/providers/google/response_adapter/models.rb +13 -0
  53. data/lib/llm/providers/{gemini → google}/response_adapter/web_search.rb +2 -2
  54. data/lib/llm/providers/{gemini → google}/response_adapter.rb +8 -8
  55. data/lib/llm/providers/{gemini → google}/stream_parser.rb +3 -3
  56. data/lib/llm/providers/{gemini.rb → google.rb} +41 -26
  57. data/lib/llm/providers/llamacpp.rb +10 -3
  58. data/lib/llm/providers/ollama/error_handler.rb +1 -1
  59. data/lib/llm/providers/ollama/models.rb +1 -1
  60. data/lib/llm/providers/ollama/response_adapter/models.rb +13 -0
  61. data/lib/llm/providers/ollama/response_adapter.rb +2 -0
  62. data/lib/llm/providers/ollama.rb +19 -4
  63. data/lib/llm/providers/openai/error_handler.rb +18 -3
  64. data/lib/llm/providers/openai/files.rb +3 -3
  65. data/lib/llm/providers/openai/images.rb +17 -11
  66. data/lib/llm/providers/openai/models.rb +1 -1
  67. data/lib/llm/providers/openai/response_adapter/completion.rb +9 -1
  68. data/lib/llm/providers/openai/response_adapter/models.rb +13 -0
  69. data/lib/llm/providers/openai/response_adapter/responds.rb +9 -1
  70. data/lib/llm/providers/openai/response_adapter.rb +2 -0
  71. data/lib/llm/providers/openai/responses.rb +16 -1
  72. data/lib/llm/providers/openai/stream_parser.rb +2 -0
  73. data/lib/llm/providers/openai.rb +28 -6
  74. data/lib/llm/providers/xai/images.rb +7 -6
  75. data/lib/llm/providers/xai.rb +10 -3
  76. data/lib/llm/providers/zai.rb +9 -2
  77. data/lib/llm/registry.rb +81 -0
  78. data/lib/llm/schema/enum.rb +16 -0
  79. data/lib/llm/schema/parser.rb +109 -0
  80. data/lib/llm/schema.rb +5 -0
  81. data/lib/llm/server_tool.rb +5 -5
  82. data/lib/llm/session.rb +10 -1
  83. data/lib/llm/tool/param.rb +1 -1
  84. data/lib/llm/tool.rb +86 -5
  85. data/lib/llm/tracer/langsmith.rb +144 -0
  86. data/lib/llm/tracer/logger.rb +9 -1
  87. data/lib/llm/tracer/null.rb +8 -0
  88. data/lib/llm/tracer/telemetry.rb +98 -78
  89. data/lib/llm/tracer.rb +108 -4
  90. data/lib/llm/usage.rb +5 -0
  91. data/lib/llm/version.rb +1 -1
  92. data/lib/llm.rb +40 -6
  93. data/llm.gemspec +45 -8
  94. metadata +87 -28
  95. data/lib/llm/providers/gemini/response_adapter/models.rb +0 -15
@@ -0,0 +1,770 @@
1
+ {
2
+ "id": "anthropic",
3
+ "env": [
4
+ "ANTHROPIC_API_KEY"
5
+ ],
6
+ "npm": "@ai-sdk/anthropic",
7
+ "name": "Anthropic",
8
+ "doc": "https://docs.anthropic.com/en/docs/about-claude/models",
9
+ "models": {
10
+ "claude-opus-4-5-20251101": {
11
+ "id": "claude-opus-4-5-20251101",
12
+ "name": "Claude Opus 4.5",
13
+ "family": "claude-opus",
14
+ "attachment": true,
15
+ "reasoning": true,
16
+ "tool_call": true,
17
+ "temperature": true,
18
+ "knowledge": "2025-03-31",
19
+ "release_date": "2025-11-01",
20
+ "last_updated": "2025-11-01",
21
+ "modalities": {
22
+ "input": [
23
+ "text",
24
+ "image",
25
+ "pdf"
26
+ ],
27
+ "output": [
28
+ "text"
29
+ ]
30
+ },
31
+ "open_weights": false,
32
+ "cost": {
33
+ "input": 5,
34
+ "output": 25,
35
+ "cache_read": 0.5,
36
+ "cache_write": 6.25
37
+ },
38
+ "limit": {
39
+ "context": 200000,
40
+ "output": 64000
41
+ }
42
+ },
43
+ "claude-3-5-haiku-latest": {
44
+ "id": "claude-3-5-haiku-latest",
45
+ "name": "Claude Haiku 3.5 (latest)",
46
+ "family": "claude-haiku",
47
+ "attachment": true,
48
+ "reasoning": false,
49
+ "tool_call": true,
50
+ "temperature": true,
51
+ "knowledge": "2024-07-31",
52
+ "release_date": "2024-10-22",
53
+ "last_updated": "2024-10-22",
54
+ "modalities": {
55
+ "input": [
56
+ "text",
57
+ "image",
58
+ "pdf"
59
+ ],
60
+ "output": [
61
+ "text"
62
+ ]
63
+ },
64
+ "open_weights": false,
65
+ "cost": {
66
+ "input": 0.8,
67
+ "output": 4,
68
+ "cache_read": 0.08,
69
+ "cache_write": 1
70
+ },
71
+ "limit": {
72
+ "context": 200000,
73
+ "output": 8192
74
+ }
75
+ },
76
+ "claude-opus-4-1": {
77
+ "id": "claude-opus-4-1",
78
+ "name": "Claude Opus 4.1 (latest)",
79
+ "family": "claude-opus",
80
+ "attachment": true,
81
+ "reasoning": true,
82
+ "tool_call": true,
83
+ "temperature": true,
84
+ "knowledge": "2025-03-31",
85
+ "release_date": "2025-08-05",
86
+ "last_updated": "2025-08-05",
87
+ "modalities": {
88
+ "input": [
89
+ "text",
90
+ "image",
91
+ "pdf"
92
+ ],
93
+ "output": [
94
+ "text"
95
+ ]
96
+ },
97
+ "open_weights": false,
98
+ "cost": {
99
+ "input": 15,
100
+ "output": 75,
101
+ "cache_read": 1.5,
102
+ "cache_write": 18.75
103
+ },
104
+ "limit": {
105
+ "context": 200000,
106
+ "output": 32000
107
+ }
108
+ },
109
+ "claude-3-5-sonnet-20241022": {
110
+ "id": "claude-3-5-sonnet-20241022",
111
+ "name": "Claude Sonnet 3.5 v2",
112
+ "family": "claude-sonnet",
113
+ "attachment": true,
114
+ "reasoning": false,
115
+ "tool_call": true,
116
+ "temperature": true,
117
+ "knowledge": "2024-04-30",
118
+ "release_date": "2024-10-22",
119
+ "last_updated": "2024-10-22",
120
+ "modalities": {
121
+ "input": [
122
+ "text",
123
+ "image",
124
+ "pdf"
125
+ ],
126
+ "output": [
127
+ "text"
128
+ ]
129
+ },
130
+ "open_weights": false,
131
+ "cost": {
132
+ "input": 3,
133
+ "output": 15,
134
+ "cache_read": 0.3,
135
+ "cache_write": 3.75
136
+ },
137
+ "limit": {
138
+ "context": 200000,
139
+ "output": 8192
140
+ }
141
+ },
142
+ "claude-3-sonnet-20240229": {
143
+ "id": "claude-3-sonnet-20240229",
144
+ "name": "Claude Sonnet 3",
145
+ "family": "claude-sonnet",
146
+ "attachment": true,
147
+ "reasoning": false,
148
+ "tool_call": true,
149
+ "temperature": true,
150
+ "knowledge": "2023-08-31",
151
+ "release_date": "2024-03-04",
152
+ "last_updated": "2024-03-04",
153
+ "modalities": {
154
+ "input": [
155
+ "text",
156
+ "image",
157
+ "pdf"
158
+ ],
159
+ "output": [
160
+ "text"
161
+ ]
162
+ },
163
+ "open_weights": false,
164
+ "cost": {
165
+ "input": 3,
166
+ "output": 15,
167
+ "cache_read": 0.3,
168
+ "cache_write": 0.3
169
+ },
170
+ "limit": {
171
+ "context": 200000,
172
+ "output": 4096
173
+ }
174
+ },
175
+ "claude-opus-4-6": {
176
+ "id": "claude-opus-4-6",
177
+ "name": "Claude Opus 4.6",
178
+ "family": "claude-opus",
179
+ "attachment": true,
180
+ "reasoning": true,
181
+ "tool_call": true,
182
+ "temperature": true,
183
+ "knowledge": "2025-05",
184
+ "release_date": "2026-02-05",
185
+ "last_updated": "2026-03-13",
186
+ "modalities": {
187
+ "input": [
188
+ "text",
189
+ "image",
190
+ "pdf"
191
+ ],
192
+ "output": [
193
+ "text"
194
+ ]
195
+ },
196
+ "open_weights": false,
197
+ "cost": {
198
+ "input": 5,
199
+ "output": 25,
200
+ "cache_read": 0.5,
201
+ "cache_write": 6.25
202
+ },
203
+ "limit": {
204
+ "context": 1000000,
205
+ "output": 128000
206
+ }
207
+ },
208
+ "claude-sonnet-4-6": {
209
+ "id": "claude-sonnet-4-6",
210
+ "name": "Claude Sonnet 4.6",
211
+ "family": "claude-sonnet",
212
+ "attachment": true,
213
+ "reasoning": true,
214
+ "tool_call": true,
215
+ "temperature": true,
216
+ "knowledge": "2025-08",
217
+ "release_date": "2026-02-17",
218
+ "last_updated": "2026-03-13",
219
+ "modalities": {
220
+ "input": [
221
+ "text",
222
+ "image",
223
+ "pdf"
224
+ ],
225
+ "output": [
226
+ "text"
227
+ ]
228
+ },
229
+ "open_weights": false,
230
+ "cost": {
231
+ "input": 3,
232
+ "output": 15,
233
+ "cache_read": 0.3,
234
+ "cache_write": 3.75
235
+ },
236
+ "limit": {
237
+ "context": 1000000,
238
+ "output": 64000
239
+ }
240
+ },
241
+ "claude-sonnet-4-0": {
242
+ "id": "claude-sonnet-4-0",
243
+ "name": "Claude Sonnet 4 (latest)",
244
+ "family": "claude-sonnet",
245
+ "attachment": true,
246
+ "reasoning": true,
247
+ "tool_call": true,
248
+ "temperature": true,
249
+ "knowledge": "2025-03-31",
250
+ "release_date": "2025-05-22",
251
+ "last_updated": "2025-05-22",
252
+ "modalities": {
253
+ "input": [
254
+ "text",
255
+ "image",
256
+ "pdf"
257
+ ],
258
+ "output": [
259
+ "text"
260
+ ]
261
+ },
262
+ "open_weights": false,
263
+ "cost": {
264
+ "input": 3,
265
+ "output": 15,
266
+ "cache_read": 0.3,
267
+ "cache_write": 3.75
268
+ },
269
+ "limit": {
270
+ "context": 200000,
271
+ "output": 64000
272
+ }
273
+ },
274
+ "claude-opus-4-20250514": {
275
+ "id": "claude-opus-4-20250514",
276
+ "name": "Claude Opus 4",
277
+ "family": "claude-opus",
278
+ "attachment": true,
279
+ "reasoning": true,
280
+ "tool_call": true,
281
+ "temperature": true,
282
+ "knowledge": "2025-03-31",
283
+ "release_date": "2025-05-22",
284
+ "last_updated": "2025-05-22",
285
+ "modalities": {
286
+ "input": [
287
+ "text",
288
+ "image",
289
+ "pdf"
290
+ ],
291
+ "output": [
292
+ "text"
293
+ ]
294
+ },
295
+ "open_weights": false,
296
+ "cost": {
297
+ "input": 15,
298
+ "output": 75,
299
+ "cache_read": 1.5,
300
+ "cache_write": 18.75
301
+ },
302
+ "limit": {
303
+ "context": 200000,
304
+ "output": 32000
305
+ }
306
+ },
307
+ "claude-sonnet-4-5-20250929": {
308
+ "id": "claude-sonnet-4-5-20250929",
309
+ "name": "Claude Sonnet 4.5",
310
+ "family": "claude-sonnet",
311
+ "attachment": true,
312
+ "reasoning": true,
313
+ "tool_call": true,
314
+ "temperature": true,
315
+ "knowledge": "2025-07-31",
316
+ "release_date": "2025-09-29",
317
+ "last_updated": "2025-09-29",
318
+ "modalities": {
319
+ "input": [
320
+ "text",
321
+ "image",
322
+ "pdf"
323
+ ],
324
+ "output": [
325
+ "text"
326
+ ]
327
+ },
328
+ "open_weights": false,
329
+ "cost": {
330
+ "input": 3,
331
+ "output": 15,
332
+ "cache_read": 0.3,
333
+ "cache_write": 3.75
334
+ },
335
+ "limit": {
336
+ "context": 200000,
337
+ "output": 64000
338
+ }
339
+ },
340
+ "claude-opus-4-0": {
341
+ "id": "claude-opus-4-0",
342
+ "name": "Claude Opus 4 (latest)",
343
+ "family": "claude-opus",
344
+ "attachment": true,
345
+ "reasoning": true,
346
+ "tool_call": true,
347
+ "temperature": true,
348
+ "knowledge": "2025-03-31",
349
+ "release_date": "2025-05-22",
350
+ "last_updated": "2025-05-22",
351
+ "modalities": {
352
+ "input": [
353
+ "text",
354
+ "image",
355
+ "pdf"
356
+ ],
357
+ "output": [
358
+ "text"
359
+ ]
360
+ },
361
+ "open_weights": false,
362
+ "cost": {
363
+ "input": 15,
364
+ "output": 75,
365
+ "cache_read": 1.5,
366
+ "cache_write": 18.75
367
+ },
368
+ "limit": {
369
+ "context": 200000,
370
+ "output": 32000
371
+ }
372
+ },
373
+ "claude-3-5-haiku-20241022": {
374
+ "id": "claude-3-5-haiku-20241022",
375
+ "name": "Claude Haiku 3.5",
376
+ "family": "claude-haiku",
377
+ "attachment": true,
378
+ "reasoning": false,
379
+ "tool_call": true,
380
+ "temperature": true,
381
+ "knowledge": "2024-07-31",
382
+ "release_date": "2024-10-22",
383
+ "last_updated": "2024-10-22",
384
+ "modalities": {
385
+ "input": [
386
+ "text",
387
+ "image",
388
+ "pdf"
389
+ ],
390
+ "output": [
391
+ "text"
392
+ ]
393
+ },
394
+ "open_weights": false,
395
+ "cost": {
396
+ "input": 0.8,
397
+ "output": 4,
398
+ "cache_read": 0.08,
399
+ "cache_write": 1
400
+ },
401
+ "limit": {
402
+ "context": 200000,
403
+ "output": 8192
404
+ }
405
+ },
406
+ "claude-3-5-sonnet-20240620": {
407
+ "id": "claude-3-5-sonnet-20240620",
408
+ "name": "Claude Sonnet 3.5",
409
+ "family": "claude-sonnet",
410
+ "attachment": true,
411
+ "reasoning": false,
412
+ "tool_call": true,
413
+ "temperature": true,
414
+ "knowledge": "2024-04-30",
415
+ "release_date": "2024-06-20",
416
+ "last_updated": "2024-06-20",
417
+ "modalities": {
418
+ "input": [
419
+ "text",
420
+ "image",
421
+ "pdf"
422
+ ],
423
+ "output": [
424
+ "text"
425
+ ]
426
+ },
427
+ "open_weights": false,
428
+ "cost": {
429
+ "input": 3,
430
+ "output": 15,
431
+ "cache_read": 0.3,
432
+ "cache_write": 3.75
433
+ },
434
+ "limit": {
435
+ "context": 200000,
436
+ "output": 8192
437
+ }
438
+ },
439
+ "claude-3-7-sonnet-latest": {
440
+ "id": "claude-3-7-sonnet-latest",
441
+ "name": "Claude Sonnet 3.7 (latest)",
442
+ "family": "claude-sonnet",
443
+ "attachment": true,
444
+ "reasoning": true,
445
+ "tool_call": true,
446
+ "temperature": true,
447
+ "knowledge": "2024-10-31",
448
+ "release_date": "2025-02-19",
449
+ "last_updated": "2025-02-19",
450
+ "modalities": {
451
+ "input": [
452
+ "text",
453
+ "image",
454
+ "pdf"
455
+ ],
456
+ "output": [
457
+ "text"
458
+ ]
459
+ },
460
+ "open_weights": false,
461
+ "cost": {
462
+ "input": 3,
463
+ "output": 15,
464
+ "cache_read": 0.3,
465
+ "cache_write": 3.75
466
+ },
467
+ "limit": {
468
+ "context": 200000,
469
+ "output": 64000
470
+ }
471
+ },
472
+ "claude-3-7-sonnet-20250219": {
473
+ "id": "claude-3-7-sonnet-20250219",
474
+ "name": "Claude Sonnet 3.7",
475
+ "family": "claude-sonnet",
476
+ "attachment": true,
477
+ "reasoning": true,
478
+ "tool_call": true,
479
+ "temperature": true,
480
+ "knowledge": "2024-10-31",
481
+ "release_date": "2025-02-19",
482
+ "last_updated": "2025-02-19",
483
+ "modalities": {
484
+ "input": [
485
+ "text",
486
+ "image",
487
+ "pdf"
488
+ ],
489
+ "output": [
490
+ "text"
491
+ ]
492
+ },
493
+ "open_weights": false,
494
+ "cost": {
495
+ "input": 3,
496
+ "output": 15,
497
+ "cache_read": 0.3,
498
+ "cache_write": 3.75
499
+ },
500
+ "limit": {
501
+ "context": 200000,
502
+ "output": 64000
503
+ }
504
+ },
505
+ "claude-3-haiku-20240307": {
506
+ "id": "claude-3-haiku-20240307",
507
+ "name": "Claude Haiku 3",
508
+ "family": "claude-haiku",
509
+ "attachment": true,
510
+ "reasoning": false,
511
+ "tool_call": true,
512
+ "temperature": true,
513
+ "knowledge": "2023-08-31",
514
+ "release_date": "2024-03-13",
515
+ "last_updated": "2024-03-13",
516
+ "modalities": {
517
+ "input": [
518
+ "text",
519
+ "image",
520
+ "pdf"
521
+ ],
522
+ "output": [
523
+ "text"
524
+ ]
525
+ },
526
+ "open_weights": false,
527
+ "cost": {
528
+ "input": 0.25,
529
+ "output": 1.25,
530
+ "cache_read": 0.03,
531
+ "cache_write": 0.3
532
+ },
533
+ "limit": {
534
+ "context": 200000,
535
+ "output": 4096
536
+ }
537
+ },
538
+ "claude-haiku-4-5-20251001": {
539
+ "id": "claude-haiku-4-5-20251001",
540
+ "name": "Claude Haiku 4.5",
541
+ "family": "claude-haiku",
542
+ "attachment": true,
543
+ "reasoning": true,
544
+ "tool_call": true,
545
+ "temperature": true,
546
+ "knowledge": "2025-02-28",
547
+ "release_date": "2025-10-15",
548
+ "last_updated": "2025-10-15",
549
+ "modalities": {
550
+ "input": [
551
+ "text",
552
+ "image",
553
+ "pdf"
554
+ ],
555
+ "output": [
556
+ "text"
557
+ ]
558
+ },
559
+ "open_weights": false,
560
+ "cost": {
561
+ "input": 1,
562
+ "output": 5,
563
+ "cache_read": 0.1,
564
+ "cache_write": 1.25
565
+ },
566
+ "limit": {
567
+ "context": 200000,
568
+ "output": 64000
569
+ }
570
+ },
571
+ "claude-haiku-4-5": {
572
+ "id": "claude-haiku-4-5",
573
+ "name": "Claude Haiku 4.5 (latest)",
574
+ "family": "claude-haiku",
575
+ "attachment": true,
576
+ "reasoning": true,
577
+ "tool_call": true,
578
+ "temperature": true,
579
+ "knowledge": "2025-02-28",
580
+ "release_date": "2025-10-15",
581
+ "last_updated": "2025-10-15",
582
+ "modalities": {
583
+ "input": [
584
+ "text",
585
+ "image",
586
+ "pdf"
587
+ ],
588
+ "output": [
589
+ "text"
590
+ ]
591
+ },
592
+ "open_weights": false,
593
+ "cost": {
594
+ "input": 1,
595
+ "output": 5,
596
+ "cache_read": 0.1,
597
+ "cache_write": 1.25
598
+ },
599
+ "limit": {
600
+ "context": 200000,
601
+ "output": 64000
602
+ }
603
+ },
604
+ "claude-opus-4-5": {
605
+ "id": "claude-opus-4-5",
606
+ "name": "Claude Opus 4.5 (latest)",
607
+ "family": "claude-opus",
608
+ "attachment": true,
609
+ "reasoning": true,
610
+ "tool_call": true,
611
+ "temperature": true,
612
+ "knowledge": "2025-03-31",
613
+ "release_date": "2025-11-24",
614
+ "last_updated": "2025-11-24",
615
+ "modalities": {
616
+ "input": [
617
+ "text",
618
+ "image",
619
+ "pdf"
620
+ ],
621
+ "output": [
622
+ "text"
623
+ ]
624
+ },
625
+ "open_weights": false,
626
+ "cost": {
627
+ "input": 5,
628
+ "output": 25,
629
+ "cache_read": 0.5,
630
+ "cache_write": 6.25
631
+ },
632
+ "limit": {
633
+ "context": 200000,
634
+ "output": 64000
635
+ }
636
+ },
637
+ "claude-3-opus-20240229": {
638
+ "id": "claude-3-opus-20240229",
639
+ "name": "Claude Opus 3",
640
+ "family": "claude-opus",
641
+ "attachment": true,
642
+ "reasoning": false,
643
+ "tool_call": true,
644
+ "temperature": true,
645
+ "knowledge": "2023-08-31",
646
+ "release_date": "2024-02-29",
647
+ "last_updated": "2024-02-29",
648
+ "modalities": {
649
+ "input": [
650
+ "text",
651
+ "image",
652
+ "pdf"
653
+ ],
654
+ "output": [
655
+ "text"
656
+ ]
657
+ },
658
+ "open_weights": false,
659
+ "cost": {
660
+ "input": 15,
661
+ "output": 75,
662
+ "cache_read": 1.5,
663
+ "cache_write": 18.75
664
+ },
665
+ "limit": {
666
+ "context": 200000,
667
+ "output": 4096
668
+ }
669
+ },
670
+ "claude-sonnet-4-5": {
671
+ "id": "claude-sonnet-4-5",
672
+ "name": "Claude Sonnet 4.5 (latest)",
673
+ "family": "claude-sonnet",
674
+ "attachment": true,
675
+ "reasoning": true,
676
+ "tool_call": true,
677
+ "temperature": true,
678
+ "knowledge": "2025-07-31",
679
+ "release_date": "2025-09-29",
680
+ "last_updated": "2025-09-29",
681
+ "modalities": {
682
+ "input": [
683
+ "text",
684
+ "image",
685
+ "pdf"
686
+ ],
687
+ "output": [
688
+ "text"
689
+ ]
690
+ },
691
+ "open_weights": false,
692
+ "cost": {
693
+ "input": 3,
694
+ "output": 15,
695
+ "cache_read": 0.3,
696
+ "cache_write": 3.75
697
+ },
698
+ "limit": {
699
+ "context": 200000,
700
+ "output": 64000
701
+ }
702
+ },
703
+ "claude-sonnet-4-20250514": {
704
+ "id": "claude-sonnet-4-20250514",
705
+ "name": "Claude Sonnet 4",
706
+ "family": "claude-sonnet",
707
+ "attachment": true,
708
+ "reasoning": true,
709
+ "tool_call": true,
710
+ "temperature": true,
711
+ "knowledge": "2025-03-31",
712
+ "release_date": "2025-05-22",
713
+ "last_updated": "2025-05-22",
714
+ "modalities": {
715
+ "input": [
716
+ "text",
717
+ "image",
718
+ "pdf"
719
+ ],
720
+ "output": [
721
+ "text"
722
+ ]
723
+ },
724
+ "open_weights": false,
725
+ "cost": {
726
+ "input": 3,
727
+ "output": 15,
728
+ "cache_read": 0.3,
729
+ "cache_write": 3.75
730
+ },
731
+ "limit": {
732
+ "context": 200000,
733
+ "output": 64000
734
+ }
735
+ },
736
+ "claude-opus-4-1-20250805": {
737
+ "id": "claude-opus-4-1-20250805",
738
+ "name": "Claude Opus 4.1",
739
+ "family": "claude-opus",
740
+ "attachment": true,
741
+ "reasoning": true,
742
+ "tool_call": true,
743
+ "temperature": true,
744
+ "knowledge": "2025-03-31",
745
+ "release_date": "2025-08-05",
746
+ "last_updated": "2025-08-05",
747
+ "modalities": {
748
+ "input": [
749
+ "text",
750
+ "image",
751
+ "pdf"
752
+ ],
753
+ "output": [
754
+ "text"
755
+ ]
756
+ },
757
+ "open_weights": false,
758
+ "cost": {
759
+ "input": 15,
760
+ "output": 75,
761
+ "cache_read": 1.5,
762
+ "cache_write": 18.75
763
+ },
764
+ "limit": {
765
+ "context": 200000,
766
+ "output": 32000
767
+ }
768
+ }
769
+ }
770
+ }