llm.rb 13.1.0 → 15.0.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 (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +716 -1826
  3. data/README.md +668 -253
  4. data/bin/llm.rb +156 -56
  5. data/data/alibaba.json +1999 -0
  6. data/data/anthropic.json +195 -252
  7. data/data/bedrock.json +2189 -1854
  8. data/data/deepinfra.json +1312 -728
  9. data/data/deepseek.json +42 -39
  10. data/data/google.json +1024 -404
  11. data/data/mistral.json +481 -401
  12. data/data/moonshot.json +384 -0
  13. data/data/openai.json +985 -1354
  14. data/data/xai.json +220 -115
  15. data/data/zai.json +166 -166
  16. data/docs/deepdive/advanced/cancellation.md +74 -0
  17. data/docs/deepdive/advanced/compaction.md +85 -0
  18. data/docs/deepdive/advanced/context.md +280 -0
  19. data/docs/deepdive/advanced/guard.md +371 -0
  20. data/docs/deepdive/advanced/transformer.md +67 -0
  21. data/docs/deepdive/advanced/transports.md +45 -0
  22. data/docs/deepdive/features/builtin_tools.md +191 -0
  23. data/docs/deepdive/features/concurrency.md +110 -0
  24. data/docs/deepdive/features/database.md +449 -0
  25. data/docs/deepdive/features/embeddings.md +157 -0
  26. data/docs/deepdive/features/repl.md +141 -0
  27. data/docs/deepdive/fundamentals/agents.md +253 -0
  28. data/docs/deepdive/fundamentals/providers.md +159 -0
  29. data/docs/deepdive/fundamentals/schema.md +61 -0
  30. data/docs/deepdive/fundamentals/skills.md +111 -0
  31. data/docs/deepdive/fundamentals/stream.md +143 -0
  32. data/docs/deepdive/fundamentals/tools.md +329 -0
  33. data/docs/deepdive/media/audio.md +122 -0
  34. data/docs/deepdive/media/images.md +89 -0
  35. data/docs/deepdive/media/ocr.md +48 -0
  36. data/docs/deepdive/protocols/a2a.md +106 -0
  37. data/docs/deepdive/protocols/mcp.md +111 -0
  38. data/docs/deepdive/reference/cost.md +109 -0
  39. data/docs/deepdive/reference/model_registry.md +271 -0
  40. data/docs/deepdive/reference/object.md +108 -0
  41. data/docs/deepdive/reference/tracer.md +187 -0
  42. data/{resources → docs}/deepdive.md +37 -23
  43. data/lib/llm/a2a/transport/http.rb +1 -1
  44. data/lib/llm/active_record/acts_as_llm.rb +19 -5
  45. data/lib/llm/agent.rb +107 -17
  46. data/lib/llm/context.rb +164 -134
  47. data/lib/llm/cost.rb +114 -49
  48. data/lib/llm/error.rb +7 -8
  49. data/lib/llm/function/array.rb +1 -1
  50. data/lib/llm/function/async/task.rb +2 -0
  51. data/lib/llm/function/fiber/task.rb +2 -0
  52. data/lib/llm/function/fork/task.rb +16 -1
  53. data/lib/llm/function/ractor/task.rb +2 -0
  54. data/lib/llm/function/sequential/group.rb +20 -10
  55. data/lib/llm/function/sequential/task.rb +2 -9
  56. data/lib/llm/function/task.rb +4 -0
  57. data/lib/llm/function/thread/task.rb +2 -0
  58. data/lib/llm/function.rb +33 -4
  59. data/lib/llm/guard/loop.rb +89 -0
  60. data/lib/llm/guard/null.rb +19 -0
  61. data/lib/llm/guard.rb +61 -0
  62. data/lib/llm/message.rb +5 -4
  63. data/lib/llm/provider.rb +43 -0
  64. data/lib/llm/providers/alibaba/error_handler.rb +34 -0
  65. data/lib/llm/providers/alibaba/request_adapter.rb +13 -0
  66. data/lib/llm/providers/alibaba.rb +93 -0
  67. data/lib/llm/providers/anthropic/stream_parser.rb +1 -0
  68. data/lib/llm/providers/anthropic.rb +1 -9
  69. data/lib/llm/providers/bedrock/stream_parser.rb +1 -0
  70. data/lib/llm/providers/bedrock.rb +9 -9
  71. data/lib/llm/providers/deepseek/request_adapter.rb +2 -33
  72. data/lib/llm/providers/google/stream_parser.rb +1 -0
  73. data/lib/llm/providers/google.rb +1 -9
  74. data/lib/llm/providers/moonshot.rb +76 -0
  75. data/lib/llm/providers/ollama.rb +1 -9
  76. data/lib/llm/providers/openai/responses/stream_parser.rb +1 -0
  77. data/lib/llm/providers/openai/responses.rb +6 -9
  78. data/lib/llm/providers/openai/schema.rb +37 -0
  79. data/lib/llm/providers/openai/stream_parser.rb +1 -0
  80. data/lib/llm/providers/openai.rb +4 -12
  81. data/lib/llm/registry/model.rb +186 -0
  82. data/lib/llm/registry.rb +45 -14
  83. data/lib/llm/repl/bar.rb +11 -12
  84. data/lib/llm/repl/buffer.rb +43 -16
  85. data/lib/llm/repl/color.rb +85 -0
  86. data/lib/llm/repl/command.rb +12 -0
  87. data/lib/llm/repl/commands/model.rb +39 -0
  88. data/lib/llm/repl/input/cache.rb +45 -0
  89. data/lib/llm/repl/input/char.rb +46 -0
  90. data/lib/llm/repl/input/row.rb +39 -0
  91. data/lib/llm/repl/input.rb +327 -79
  92. data/lib/llm/repl/markdown/table.rb +6 -2
  93. data/lib/llm/repl/markdown.rb +56 -6
  94. data/lib/llm/repl/node.rb +7 -0
  95. data/lib/llm/repl/status.rb +54 -5
  96. data/lib/llm/repl/stream.rb +16 -4
  97. data/lib/llm/repl/walker.rb +3 -2
  98. data/lib/llm/repl/window.rb +111 -11
  99. data/lib/llm/repl.rb +47 -21
  100. data/lib/llm/sequel/plugin.rb +19 -5
  101. data/lib/llm/skill.rb +21 -8
  102. data/lib/llm/stream.rb +35 -7
  103. data/lib/llm/tool.rb +27 -0
  104. data/lib/llm/tools/rg.rb +2 -1
  105. data/lib/llm/transformer/null.rb +21 -0
  106. data/lib/llm/transformer.rb +55 -0
  107. data/lib/llm/transport/curb.rb +23 -3
  108. data/lib/llm/usage.rb +155 -9
  109. data/lib/llm/version.rb +1 -1
  110. data/lib/llm.rb +121 -29
  111. data/llm.gemspec +16 -10
  112. metadata +100 -13
  113. data/lib/llm/loop_guard.rb +0 -107
data/data/anthropic.json CHANGED
@@ -7,6 +7,53 @@
7
7
  "name": "Anthropic",
8
8
  "doc": "https://docs.anthropic.com/en/docs/about-claude/models",
9
9
  "models": {
10
+ "claude-opus-4-7": {
11
+ "id": "claude-opus-4-7",
12
+ "name": "Claude Opus 4.7",
13
+ "description": "Stronger Opus tier for advanced software work and high-stakes reasoning",
14
+ "family": "claude-opus",
15
+ "attachment": true,
16
+ "reasoning": true,
17
+ "reasoning_options": [
18
+ {
19
+ "type": "effort",
20
+ "values": [
21
+ "low",
22
+ "medium",
23
+ "high",
24
+ "xhigh",
25
+ "max"
26
+ ]
27
+ }
28
+ ],
29
+ "tool_call": true,
30
+ "structured_output": true,
31
+ "temperature": false,
32
+ "knowledge": "2026-01-31",
33
+ "release_date": "2026-04-14",
34
+ "last_updated": "2026-04-16",
35
+ "modalities": {
36
+ "input": [
37
+ "text",
38
+ "image",
39
+ "pdf"
40
+ ],
41
+ "output": [
42
+ "text"
43
+ ]
44
+ },
45
+ "open_weights": false,
46
+ "limit": {
47
+ "context": 1000000,
48
+ "output": 128000
49
+ },
50
+ "cost": {
51
+ "input": 5,
52
+ "output": 25,
53
+ "cache_read": 0.5,
54
+ "cache_write": 6.25
55
+ }
56
+ },
10
57
  "claude-opus-4-8": {
11
58
  "id": "claude-opus-4-8",
12
59
  "name": "Claude Opus 4.8",
@@ -74,25 +121,34 @@
74
121
  "cache_write": 6.25
75
122
  }
76
123
  },
77
- "claude-opus-4-1": {
78
- "id": "claude-opus-4-1",
79
- "name": "Claude Opus 4.1 (latest)",
80
- "description": "Flagship Claude model for deep reasoning, coding, and long-horizon agents",
81
- "family": "claude-opus",
124
+ "claude-sonnet-5": {
125
+ "id": "claude-sonnet-5",
126
+ "name": "Claude Sonnet 5",
127
+ "description": "Everyday Claude agent model for coding, planning, browsing, and general work",
128
+ "family": "claude-sonnet",
82
129
  "attachment": true,
83
130
  "reasoning": true,
84
131
  "reasoning_options": [
85
132
  {
86
- "type": "budget_tokens",
87
- "min": 1024
133
+ "type": "toggle"
134
+ },
135
+ {
136
+ "type": "effort",
137
+ "values": [
138
+ "low",
139
+ "medium",
140
+ "high",
141
+ "xhigh",
142
+ "max"
143
+ ]
88
144
  }
89
145
  ],
90
146
  "tool_call": true,
91
147
  "structured_output": true,
92
- "temperature": true,
93
- "knowledge": "2025-03-31",
94
- "release_date": "2025-08-05",
95
- "last_updated": "2025-08-05",
148
+ "temperature": false,
149
+ "knowledge": "2026-01-31",
150
+ "release_date": "2026-06-29",
151
+ "last_updated": "2026-06-30",
96
152
  "modalities": {
97
153
  "input": [
98
154
  "text",
@@ -105,34 +161,24 @@
105
161
  },
106
162
  "open_weights": false,
107
163
  "limit": {
108
- "context": 200000,
109
- "output": 32000
164
+ "context": 1000000,
165
+ "output": 128000
110
166
  },
111
- "status": "deprecated",
112
167
  "cost": {
113
- "input": 15,
114
- "output": 75,
115
- "cache_read": 1.5,
116
- "cache_write": 18.75
168
+ "input": 2,
169
+ "output": 10,
170
+ "cache_read": 0.2,
171
+ "cache_write": 2.5
117
172
  }
118
173
  },
119
- "claude-sonnet-4-6": {
120
- "id": "claude-sonnet-4-6",
121
- "name": "Claude Sonnet 4.6",
122
- "description": "Claude workhorse for coding agents, careful analysis, and production cost control",
174
+ "claude-sonnet-4-5-20250929": {
175
+ "id": "claude-sonnet-4-5-20250929",
176
+ "name": "Claude Sonnet 4.5",
177
+ "description": "Balanced Claude model for coding, analysis, agent workflows, and cost control",
123
178
  "family": "claude-sonnet",
124
179
  "attachment": true,
125
180
  "reasoning": true,
126
181
  "reasoning_options": [
127
- {
128
- "type": "effort",
129
- "values": [
130
- "low",
131
- "medium",
132
- "high",
133
- "max"
134
- ]
135
- },
136
182
  {
137
183
  "type": "budget_tokens",
138
184
  "min": 1024
@@ -141,9 +187,9 @@
141
187
  "tool_call": true,
142
188
  "structured_output": true,
143
189
  "temperature": true,
144
- "knowledge": "2025-08-31",
145
- "release_date": "2026-02-17",
146
- "last_updated": "2026-03-13",
190
+ "knowledge": "2025-07-31",
191
+ "release_date": "2025-09-29",
192
+ "last_updated": "2025-09-29",
147
193
  "modalities": {
148
194
  "input": [
149
195
  "text",
@@ -157,7 +203,7 @@
157
203
  "open_weights": false,
158
204
  "limit": {
159
205
  "context": 1000000,
160
- "output": 128000
206
+ "output": 64000
161
207
  },
162
208
  "cost": {
163
209
  "input": 3,
@@ -166,14 +212,22 @@
166
212
  "cache_write": 3.75
167
213
  }
168
214
  },
169
- "claude-opus-4-1-20250805": {
170
- "id": "claude-opus-4-1-20250805",
171
- "name": "Claude Opus 4.1",
215
+ "claude-opus-4-5": {
216
+ "id": "claude-opus-4-5",
217
+ "name": "Claude Opus 4.5 (latest)",
172
218
  "description": "Flagship Claude model for deep reasoning, coding, and long-horizon agents",
173
219
  "family": "claude-opus",
174
220
  "attachment": true,
175
221
  "reasoning": true,
176
222
  "reasoning_options": [
223
+ {
224
+ "type": "effort",
225
+ "values": [
226
+ "low",
227
+ "medium",
228
+ "high"
229
+ ]
230
+ },
177
231
  {
178
232
  "type": "budget_tokens",
179
233
  "min": 1024
@@ -182,9 +236,9 @@
182
236
  "tool_call": true,
183
237
  "structured_output": true,
184
238
  "temperature": true,
185
- "knowledge": "2025-03-31",
186
- "release_date": "2025-08-05",
187
- "last_updated": "2025-08-05",
239
+ "knowledge": "2025-05",
240
+ "release_date": "2025-11-24",
241
+ "last_updated": "2025-11-24",
188
242
  "modalities": {
189
243
  "input": [
190
244
  "text",
@@ -198,24 +252,32 @@
198
252
  "open_weights": false,
199
253
  "limit": {
200
254
  "context": 200000,
201
- "output": 32000
255
+ "output": 64000
202
256
  },
203
- "status": "deprecated",
204
257
  "cost": {
205
- "input": 15,
206
- "output": 75,
207
- "cache_read": 1.5,
208
- "cache_write": 18.75
258
+ "input": 5,
259
+ "output": 25,
260
+ "cache_read": 0.5,
261
+ "cache_write": 6.25
209
262
  }
210
263
  },
211
- "claude-haiku-4-5": {
212
- "id": "claude-haiku-4-5",
213
- "name": "Claude Haiku 4.5 (latest)",
214
- "description": "Fast Claude lane for lightweight agents, office tasks, and responsive chat",
215
- "family": "claude-haiku",
264
+ "claude-sonnet-4-6": {
265
+ "id": "claude-sonnet-4-6",
266
+ "name": "Claude Sonnet 4.6",
267
+ "description": "Claude workhorse for coding agents, careful analysis, and production cost control",
268
+ "family": "claude-sonnet",
216
269
  "attachment": true,
217
270
  "reasoning": true,
218
271
  "reasoning_options": [
272
+ {
273
+ "type": "effort",
274
+ "values": [
275
+ "low",
276
+ "medium",
277
+ "high",
278
+ "max"
279
+ ]
280
+ },
219
281
  {
220
282
  "type": "budget_tokens",
221
283
  "min": 1024
@@ -224,9 +286,9 @@
224
286
  "tool_call": true,
225
287
  "structured_output": true,
226
288
  "temperature": true,
227
- "knowledge": "2025-02-28",
228
- "release_date": "2025-10-15",
229
- "last_updated": "2025-10-15",
289
+ "knowledge": "2025-08-31",
290
+ "release_date": "2026-02-17",
291
+ "last_updated": "2026-03-13",
230
292
  "modalities": {
231
293
  "input": [
232
294
  "text",
@@ -239,32 +301,24 @@
239
301
  },
240
302
  "open_weights": false,
241
303
  "limit": {
242
- "context": 200000,
243
- "output": 64000
304
+ "context": 1000000,
305
+ "output": 128000
244
306
  },
245
307
  "cost": {
246
- "input": 1,
247
- "output": 5,
248
- "cache_read": 0.1,
249
- "cache_write": 1.25
308
+ "input": 3,
309
+ "output": 15,
310
+ "cache_read": 0.3,
311
+ "cache_write": 3.75
250
312
  }
251
313
  },
252
- "claude-opus-4-5-20251101": {
253
- "id": "claude-opus-4-5-20251101",
254
- "name": "Claude Opus 4.5",
255
- "description": "Flagship Claude model for deep reasoning, coding, and long-horizon agents",
256
- "family": "claude-opus",
314
+ "claude-haiku-4-5-20251001": {
315
+ "id": "claude-haiku-4-5-20251001",
316
+ "name": "Claude Haiku 4.5",
317
+ "description": "Fast Claude model for responsive assistance, classification, and lightweight agents",
318
+ "family": "claude-haiku",
257
319
  "attachment": true,
258
320
  "reasoning": true,
259
321
  "reasoning_options": [
260
- {
261
- "type": "effort",
262
- "values": [
263
- "low",
264
- "medium",
265
- "high"
266
- ]
267
- },
268
322
  {
269
323
  "type": "budget_tokens",
270
324
  "min": 1024
@@ -273,9 +327,9 @@
273
327
  "tool_call": true,
274
328
  "structured_output": true,
275
329
  "temperature": true,
276
- "knowledge": "2025-05",
277
- "release_date": "2025-11-24",
278
- "last_updated": "2025-11-01",
330
+ "knowledge": "2025-02-28",
331
+ "release_date": "2025-10-15",
332
+ "last_updated": "2025-10-15",
279
333
  "modalities": {
280
334
  "input": [
281
335
  "text",
@@ -292,15 +346,15 @@
292
346
  "output": 64000
293
347
  },
294
348
  "cost": {
295
- "input": 5,
296
- "output": 25,
297
- "cache_read": 0.5,
298
- "cache_write": 6.25
349
+ "input": 1,
350
+ "output": 5,
351
+ "cache_read": 0.1,
352
+ "cache_write": 1.25
299
353
  }
300
354
  },
301
- "claude-sonnet-4-5-20250929": {
302
- "id": "claude-sonnet-4-5-20250929",
303
- "name": "Claude Sonnet 4.5",
355
+ "claude-sonnet-4-5": {
356
+ "id": "claude-sonnet-4-5",
357
+ "name": "Claude Sonnet 4.5 (latest)",
304
358
  "description": "Balanced Claude model for coding, analysis, agent workflows, and cost control",
305
359
  "family": "claude-sonnet",
306
360
  "attachment": true,
@@ -339,11 +393,11 @@
339
393
  "cache_write": 3.75
340
394
  }
341
395
  },
342
- "claude-fable-5": {
343
- "id": "claude-fable-5",
344
- "name": "Claude Fable 5",
345
- "description": "Claude model for creative writing, analysis, and controlled agent workflows",
346
- "family": "claude-fable",
396
+ "claude-opus-4-5-20251101": {
397
+ "id": "claude-opus-4-5-20251101",
398
+ "name": "Claude Opus 4.5",
399
+ "description": "Flagship Claude model for deep reasoning, coding, and long-horizon agents",
400
+ "family": "claude-opus",
347
401
  "attachment": true,
348
402
  "reasoning": true,
349
403
  "reasoning_options": [
@@ -352,17 +406,20 @@
352
406
  "values": [
353
407
  "low",
354
408
  "medium",
355
- "high",
356
- "xhigh",
357
- "max"
409
+ "high"
358
410
  ]
411
+ },
412
+ {
413
+ "type": "budget_tokens",
414
+ "min": 1024
359
415
  }
360
416
  ],
361
417
  "tool_call": true,
362
418
  "structured_output": true,
363
- "temperature": false,
364
- "release_date": "2026-06-07",
365
- "last_updated": "2026-06-09",
419
+ "temperature": true,
420
+ "knowledge": "2025-05",
421
+ "release_date": "2025-11-24",
422
+ "last_updated": "2025-11-01",
366
423
  "modalities": {
367
424
  "input": [
368
425
  "text",
@@ -375,27 +432,24 @@
375
432
  },
376
433
  "open_weights": false,
377
434
  "limit": {
378
- "context": 1000000,
379
- "output": 128000
435
+ "context": 200000,
436
+ "output": 64000
380
437
  },
381
438
  "cost": {
382
- "input": 10,
383
- "output": 50,
384
- "cache_read": 1,
385
- "cache_write": 12.5
439
+ "input": 5,
440
+ "output": 25,
441
+ "cache_read": 0.5,
442
+ "cache_write": 6.25
386
443
  }
387
444
  },
388
- "claude-sonnet-5": {
389
- "id": "claude-sonnet-5",
390
- "name": "Claude Sonnet 5",
391
- "description": "Everyday Claude agent model for coding, planning, browsing, and general work",
392
- "family": "claude-sonnet",
445
+ "claude-fable-5": {
446
+ "id": "claude-fable-5",
447
+ "name": "Claude Fable 5",
448
+ "description": "Claude model for creative writing, analysis, and controlled agent workflows",
449
+ "family": "claude-fable",
393
450
  "attachment": true,
394
451
  "reasoning": true,
395
452
  "reasoning_options": [
396
- {
397
- "type": "toggle"
398
- },
399
453
  {
400
454
  "type": "effort",
401
455
  "values": [
@@ -410,9 +464,8 @@
410
464
  "tool_call": true,
411
465
  "structured_output": true,
412
466
  "temperature": false,
413
- "knowledge": "2026-01-31",
414
- "release_date": "2026-06-29",
415
- "last_updated": "2026-06-30",
467
+ "release_date": "2026-06-07",
468
+ "last_updated": "2026-06-09",
416
469
  "modalities": {
417
470
  "input": [
418
471
  "text",
@@ -429,16 +482,16 @@
429
482
  "output": 128000
430
483
  },
431
484
  "cost": {
432
- "input": 2,
433
- "output": 10,
434
- "cache_read": 0.2,
435
- "cache_write": 2.5
485
+ "input": 10,
486
+ "output": 50,
487
+ "cache_read": 1,
488
+ "cache_write": 12.5
436
489
  }
437
490
  },
438
- "claude-haiku-4-5-20251001": {
439
- "id": "claude-haiku-4-5-20251001",
440
- "name": "Claude Haiku 4.5",
441
- "description": "Fast Claude model for responsive assistance, classification, and lightweight agents",
491
+ "claude-haiku-4-5": {
492
+ "id": "claude-haiku-4-5",
493
+ "name": "Claude Haiku 4.5 (latest)",
494
+ "description": "Fast Claude lane for lightweight agents, office tasks, and responsive chat",
442
495
  "family": "claude-haiku",
443
496
  "attachment": true,
444
497
  "reasoning": true,
@@ -476,10 +529,10 @@
476
529
  "cache_write": 1.25
477
530
  }
478
531
  },
479
- "claude-opus-4-5": {
480
- "id": "claude-opus-4-5",
481
- "name": "Claude Opus 4.5 (latest)",
482
- "description": "Flagship Claude model for deep reasoning, coding, and long-horizon agents",
532
+ "claude-opus-4-6": {
533
+ "id": "claude-opus-4-6",
534
+ "name": "Claude Opus 4.6",
535
+ "description": "High-end Claude for difficult coding, planning, and slower expert reasoning",
483
536
  "family": "claude-opus",
484
537
  "attachment": true,
485
538
  "reasoning": true,
@@ -489,7 +542,8 @@
489
542
  "values": [
490
543
  "low",
491
544
  "medium",
492
- "high"
545
+ "high",
546
+ "max"
493
547
  ]
494
548
  },
495
549
  {
@@ -500,56 +554,9 @@
500
554
  "tool_call": true,
501
555
  "structured_output": true,
502
556
  "temperature": true,
503
- "knowledge": "2025-05",
504
- "release_date": "2025-11-24",
505
- "last_updated": "2025-11-24",
506
- "modalities": {
507
- "input": [
508
- "text",
509
- "image",
510
- "pdf"
511
- ],
512
- "output": [
513
- "text"
514
- ]
515
- },
516
- "open_weights": false,
517
- "limit": {
518
- "context": 200000,
519
- "output": 64000
520
- },
521
- "cost": {
522
- "input": 5,
523
- "output": 25,
524
- "cache_read": 0.5,
525
- "cache_write": 6.25
526
- }
527
- },
528
- "claude-opus-4-7": {
529
- "id": "claude-opus-4-7",
530
- "name": "Claude Opus 4.7",
531
- "description": "Stronger Opus tier for advanced software work and high-stakes reasoning",
532
- "family": "claude-opus",
533
- "attachment": true,
534
- "reasoning": true,
535
- "reasoning_options": [
536
- {
537
- "type": "effort",
538
- "values": [
539
- "low",
540
- "medium",
541
- "high",
542
- "xhigh",
543
- "max"
544
- ]
545
- }
546
- ],
547
- "tool_call": true,
548
- "structured_output": true,
549
- "temperature": false,
550
- "knowledge": "2026-01-31",
551
- "release_date": "2026-04-14",
552
- "last_updated": "2026-04-16",
557
+ "knowledge": "2025-05-31",
558
+ "release_date": "2026-02-04",
559
+ "last_updated": "2026-03-13",
553
560
  "modalities": {
554
561
  "input": [
555
562
  "text",
@@ -565,26 +572,6 @@
565
572
  "context": 1000000,
566
573
  "output": 128000
567
574
  },
568
- "experimental": {
569
- "modes": {
570
- "fast": {
571
- "cost": {
572
- "input": 30,
573
- "output": 150,
574
- "cache_read": 3,
575
- "cache_write": 37.5
576
- },
577
- "provider": {
578
- "body": {
579
- "speed": "fast"
580
- },
581
- "headers": {
582
- "anthropic-beta": "fast-mode-2026-02-01"
583
- }
584
- }
585
- }
586
- }
587
- },
588
575
  "cost": {
589
576
  "input": 5,
590
577
  "output": 25,
@@ -592,10 +579,10 @@
592
579
  "cache_write": 6.25
593
580
  }
594
581
  },
595
- "claude-opus-4-6": {
596
- "id": "claude-opus-4-6",
597
- "name": "Claude Opus 4.6",
598
- "description": "High-end Claude for difficult coding, planning, and slower expert reasoning",
582
+ "claude-opus-5": {
583
+ "id": "claude-opus-5",
584
+ "name": "Claude Opus 5",
585
+ "description": "Strongest Claude Opus model for coding, agents, and professional work",
599
586
  "family": "claude-opus",
600
587
  "attachment": true,
601
588
  "reasoning": true,
@@ -606,20 +593,17 @@
606
593
  "low",
607
594
  "medium",
608
595
  "high",
596
+ "xhigh",
609
597
  "max"
610
598
  ]
611
- },
612
- {
613
- "type": "budget_tokens",
614
- "min": 1024
615
599
  }
616
600
  ],
617
601
  "tool_call": true,
618
602
  "structured_output": true,
619
- "temperature": true,
620
- "knowledge": "2025-05-31",
621
- "release_date": "2026-02-04",
622
- "last_updated": "2026-03-13",
603
+ "temperature": false,
604
+ "knowledge": "2026-05",
605
+ "release_date": "2026-07-24",
606
+ "last_updated": "2026-07-24",
623
607
  "modalities": {
624
608
  "input": [
625
609
  "text",
@@ -639,10 +623,10 @@
639
623
  "modes": {
640
624
  "fast": {
641
625
  "cost": {
642
- "input": 30,
643
- "output": 150,
644
- "cache_read": 3,
645
- "cache_write": 37.5
626
+ "input": 10,
627
+ "output": 50,
628
+ "cache_read": 1,
629
+ "cache_write": 12.5
646
630
  },
647
631
  "provider": {
648
632
  "body": {
@@ -661,47 +645,6 @@
661
645
  "cache_read": 0.5,
662
646
  "cache_write": 6.25
663
647
  }
664
- },
665
- "claude-sonnet-4-5": {
666
- "id": "claude-sonnet-4-5",
667
- "name": "Claude Sonnet 4.5 (latest)",
668
- "description": "Balanced Claude model for coding, analysis, agent workflows, and cost control",
669
- "family": "claude-sonnet",
670
- "attachment": true,
671
- "reasoning": true,
672
- "reasoning_options": [
673
- {
674
- "type": "budget_tokens",
675
- "min": 1024
676
- }
677
- ],
678
- "tool_call": true,
679
- "structured_output": true,
680
- "temperature": true,
681
- "knowledge": "2025-07-31",
682
- "release_date": "2025-09-29",
683
- "last_updated": "2025-09-29",
684
- "modalities": {
685
- "input": [
686
- "text",
687
- "image",
688
- "pdf"
689
- ],
690
- "output": [
691
- "text"
692
- ]
693
- },
694
- "open_weights": false,
695
- "limit": {
696
- "context": 1000000,
697
- "output": 64000
698
- },
699
- "cost": {
700
- "input": 3,
701
- "output": 15,
702
- "cache_read": 0.3,
703
- "cache_write": 3.75
704
- }
705
648
  }
706
649
  }
707
650
  }