llm.rb 15.0.3 → 15.2.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 (104) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +433 -3
  3. data/README.md +188 -71
  4. data/bin/llm.rb +50 -7
  5. data/data/alibaba.json +912 -823
  6. data/data/anthropic.json +234 -187
  7. data/data/bedrock.json +3702 -2058
  8. data/data/deepinfra.json +1288 -951
  9. data/data/deepseek.json +87 -53
  10. data/data/google.json +670 -670
  11. data/data/mistral.json +501 -460
  12. data/data/moonshot.json +43 -248
  13. data/data/openai.json +1008 -914
  14. data/data/openrouter.json +14417 -0
  15. data/data/xai.json +213 -201
  16. data/data/zai.json +242 -149
  17. data/docs/deepdive/advanced/compaction.md +5 -5
  18. data/docs/deepdive/advanced/context.md +8 -6
  19. data/docs/deepdive/advanced/guard.md +2 -2
  20. data/docs/deepdive/features/builtin_tools.md +93 -22
  21. data/docs/deepdive/features/{repl.md → console.md} +28 -28
  22. data/docs/deepdive/features/database.md +3 -3
  23. data/docs/deepdive/fundamentals/agents.md +13 -12
  24. data/docs/deepdive/fundamentals/providers.md +91 -6
  25. data/docs/deepdive/fundamentals/skills.md +14 -6
  26. data/docs/deepdive/fundamentals/stream.md +4 -4
  27. data/docs/deepdive/fundamentals/tools.md +63 -31
  28. data/docs/deepdive/reference/cost.md +2 -2
  29. data/docs/deepdive/reference/model_registry.md +2 -2
  30. data/docs/deepdive/reference/tracer.md +15 -13
  31. data/docs/deepdive.md +2 -2
  32. data/lib/llm/active_record/acts_as_agent.rb +9 -5
  33. data/lib/llm/agent.rb +40 -15
  34. data/lib/llm/{repl → console}/bar.rb +3 -3
  35. data/lib/llm/{repl → console}/buffer.rb +24 -9
  36. data/lib/llm/{repl → console}/color.rb +2 -2
  37. data/lib/llm/{repl → console}/command.rb +12 -12
  38. data/lib/llm/{repl → console}/commands/exit.rb +4 -4
  39. data/lib/llm/{repl → console}/commands/help.rb +1 -1
  40. data/lib/llm/{repl/commands/compact.rb → console/commands/keep.rb} +11 -9
  41. data/lib/llm/{repl → console}/commands/model.rb +2 -2
  42. data/lib/llm/{repl → console}/input/cache.rb +2 -2
  43. data/lib/llm/{repl → console}/input/char.rb +2 -2
  44. data/lib/llm/{repl → console}/input/row.rb +1 -1
  45. data/lib/llm/{repl → console}/input.rb +18 -10
  46. data/lib/llm/console/markdown/parser.rb +78 -0
  47. data/lib/llm/{repl → console}/markdown/table.rb +8 -5
  48. data/lib/llm/{repl → console}/markdown.rb +13 -30
  49. data/lib/llm/console/node.rb +69 -0
  50. data/lib/llm/{repl → console}/status.rb +11 -11
  51. data/lib/llm/{repl → console}/stream.rb +36 -9
  52. data/lib/llm/{repl → console}/walker.rb +1 -1
  53. data/lib/llm/{repl → console}/window.rb +17 -17
  54. data/lib/llm/{repl.rb → console.rb} +39 -19
  55. data/lib/llm/context/deserializer.rb +2 -1
  56. data/lib/llm/context.rb +29 -13
  57. data/lib/llm/cost.rb +13 -0
  58. data/lib/llm/function/async/reactor.rb +20 -1
  59. data/lib/llm/function/fork/task.rb +14 -10
  60. data/lib/llm/function.rb +1 -1
  61. data/lib/llm/json_adapter.rb +40 -28
  62. data/lib/llm/message.rb +7 -0
  63. data/lib/llm/provider.rb +31 -10
  64. data/lib/llm/providers/alibaba.rb +1 -1
  65. data/lib/llm/providers/anthropic.rb +1 -1
  66. data/lib/llm/providers/bedrock/models.rb +2 -2
  67. data/lib/llm/providers/bedrock.rb +1 -1
  68. data/lib/llm/providers/deepseek.rb +1 -1
  69. data/lib/llm/providers/google.rb +1 -1
  70. data/lib/llm/providers/ollama.rb +1 -1
  71. data/lib/llm/providers/openai/responses.rb +2 -1
  72. data/lib/llm/providers/openai.rb +2 -1
  73. data/lib/llm/providers/openrouter.rb +87 -0
  74. data/lib/llm/schema/leaf.rb +34 -2
  75. data/lib/llm/schema.rb +4 -2
  76. data/lib/llm/sequel/agent.rb +9 -5
  77. data/lib/llm/skill.rb +7 -1
  78. data/lib/llm/stream.rb +8 -3
  79. data/lib/llm/tool/param.rb +5 -1
  80. data/lib/llm/tool.rb +5 -0
  81. data/lib/llm/tools/bundle.rb +53 -0
  82. data/lib/llm/tools/edit-file.rb +7 -2
  83. data/lib/llm/tools/exec.rb +78 -0
  84. data/lib/llm/tools/git.rb +27 -26
  85. data/lib/llm/tools/mkdir.rb +12 -19
  86. data/lib/llm/tools/read_file.rb +69 -9
  87. data/lib/llm/tools/rg.rb +20 -24
  88. data/lib/llm/tools/ruby.rb +17 -25
  89. data/lib/llm/tools/utils.rb +75 -2
  90. data/lib/llm/tools/write_file.rb +4 -1
  91. data/lib/llm/tracer/logger.rb +2 -2
  92. data/lib/llm/tracer/pretty_logger.rb +4 -4
  93. data/lib/llm/tracer/telemetry.rb +2 -2
  94. data/lib/llm/tracer.rb +33 -0
  95. data/lib/llm/transport/curb.rb +5 -3
  96. data/lib/llm/transport/http.rb +5 -2
  97. data/lib/llm/transport/persistent_http.rb +6 -4
  98. data/lib/llm/transport/utils.rb +8 -6
  99. data/lib/llm/version.rb +1 -1
  100. data/lib/llm.rb +18 -12
  101. data/llm.gemspec +8 -8
  102. metadata +80 -37
  103. data/lib/llm/repl/node.rb +0 -44
  104. data/lib/llm/tools/shell.rb +0 -55
data/data/anthropic.json CHANGED
@@ -7,11 +7,11 @@
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",
10
+ "claude-sonnet-4-6": {
11
+ "id": "claude-sonnet-4-6",
12
+ "name": "Claude Sonnet 4.6",
13
+ "description": "Claude workhorse for coding agents, careful analysis, and production cost control",
14
+ "family": "claude-sonnet",
15
15
  "attachment": true,
16
16
  "reasoning": true,
17
17
  "reasoning_options": [
@@ -21,17 +21,20 @@
21
21
  "low",
22
22
  "medium",
23
23
  "high",
24
- "xhigh",
25
24
  "max"
26
25
  ]
26
+ },
27
+ {
28
+ "type": "budget_tokens",
29
+ "min": 1024
27
30
  }
28
31
  ],
29
32
  "tool_call": true,
30
33
  "structured_output": true,
31
- "temperature": false,
32
- "knowledge": "2026-01-31",
33
- "release_date": "2026-04-14",
34
- "last_updated": "2026-04-16",
34
+ "temperature": true,
35
+ "knowledge": "2025-08-31",
36
+ "release_date": "2026-02-17",
37
+ "last_updated": "2026-03-13",
35
38
  "modalities": {
36
39
  "input": [
37
40
  "text",
@@ -48,16 +51,16 @@
48
51
  "output": 128000
49
52
  },
50
53
  "cost": {
51
- "input": 5,
52
- "output": 25,
53
- "cache_read": 0.5,
54
- "cache_write": 6.25
54
+ "input": 3,
55
+ "output": 15,
56
+ "cache_read": 0.3,
57
+ "cache_write": 3.75
55
58
  }
56
59
  },
57
- "claude-opus-4-8": {
58
- "id": "claude-opus-4-8",
59
- "name": "Claude Opus 4.8",
60
- "description": "Top Claude Opus tier for the hardest reasoning, coding, and long-horizon agents",
60
+ "claude-opus-5": {
61
+ "id": "claude-opus-5",
62
+ "name": "Claude Opus 5",
63
+ "description": "Strongest Claude Opus model for coding, agents, and professional work",
61
64
  "family": "claude-opus",
62
65
  "attachment": true,
63
66
  "reasoning": true,
@@ -76,9 +79,9 @@
76
79
  "tool_call": true,
77
80
  "structured_output": true,
78
81
  "temperature": false,
79
- "knowledge": "2026-01",
80
- "release_date": "2026-05-28",
81
- "last_updated": "2026-05-28",
82
+ "knowledge": "2026-05",
83
+ "release_date": "2026-07-24",
84
+ "last_updated": "2026-07-24",
82
85
  "modalities": {
83
86
  "input": [
84
87
  "text",
@@ -121,64 +124,22 @@
121
124
  "cache_write": 6.25
122
125
  }
123
126
  },
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",
127
+ "claude-opus-4-5": {
128
+ "id": "claude-opus-4-5",
129
+ "name": "Claude Opus 4.5 (latest)",
130
+ "description": "Flagship Claude model for deep reasoning, coding, and long-horizon agents",
131
+ "family": "claude-opus",
129
132
  "attachment": true,
130
133
  "reasoning": true,
131
134
  "reasoning_options": [
132
- {
133
- "type": "toggle"
134
- },
135
135
  {
136
136
  "type": "effort",
137
137
  "values": [
138
138
  "low",
139
139
  "medium",
140
- "high",
141
- "xhigh",
142
- "max"
140
+ "high"
143
141
  ]
144
- }
145
- ],
146
- "tool_call": true,
147
- "structured_output": true,
148
- "temperature": false,
149
- "knowledge": "2026-01-31",
150
- "release_date": "2026-06-29",
151
- "last_updated": "2026-06-30",
152
- "modalities": {
153
- "input": [
154
- "text",
155
- "image",
156
- "pdf"
157
- ],
158
- "output": [
159
- "text"
160
- ]
161
- },
162
- "open_weights": false,
163
- "limit": {
164
- "context": 1000000,
165
- "output": 128000
166
- },
167
- "cost": {
168
- "input": 2,
169
- "output": 10,
170
- "cache_read": 0.2,
171
- "cache_write": 2.5
172
- }
173
- },
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",
178
- "family": "claude-sonnet",
179
- "attachment": true,
180
- "reasoning": true,
181
- "reasoning_options": [
142
+ },
182
143
  {
183
144
  "type": "budget_tokens",
184
145
  "min": 1024
@@ -187,9 +148,9 @@
187
148
  "tool_call": true,
188
149
  "structured_output": true,
189
150
  "temperature": true,
190
- "knowledge": "2025-07-31",
191
- "release_date": "2025-09-29",
192
- "last_updated": "2025-09-29",
151
+ "knowledge": "2025-05",
152
+ "release_date": "2025-11-24",
153
+ "last_updated": "2025-11-24",
193
154
  "modalities": {
194
155
  "input": [
195
156
  "text",
@@ -202,21 +163,21 @@
202
163
  },
203
164
  "open_weights": false,
204
165
  "limit": {
205
- "context": 1000000,
166
+ "context": 200000,
206
167
  "output": 64000
207
168
  },
208
169
  "cost": {
209
- "input": 3,
210
- "output": 15,
211
- "cache_read": 0.3,
212
- "cache_write": 3.75
170
+ "input": 5,
171
+ "output": 25,
172
+ "cache_read": 0.5,
173
+ "cache_write": 6.25
213
174
  }
214
175
  },
215
- "claude-opus-4-5": {
216
- "id": "claude-opus-4-5",
217
- "name": "Claude Opus 4.5 (latest)",
218
- "description": "Flagship Claude model for deep reasoning, coding, and long-horizon agents",
219
- "family": "claude-opus",
176
+ "claude-fable-5-1": {
177
+ "id": "claude-fable-5-1",
178
+ "name": "Claude Fable 5.1",
179
+ "description": "Claude model for demanding reasoning and long-horizon agentic work",
180
+ "family": "claude-fable",
220
181
  "attachment": true,
221
182
  "reasoning": true,
222
183
  "reasoning_options": [
@@ -225,20 +186,18 @@
225
186
  "values": [
226
187
  "low",
227
188
  "medium",
228
- "high"
189
+ "high",
190
+ "xhigh",
191
+ "max"
229
192
  ]
230
- },
231
- {
232
- "type": "budget_tokens",
233
- "min": 1024
234
193
  }
235
194
  ],
236
195
  "tool_call": true,
237
196
  "structured_output": true,
238
- "temperature": true,
239
- "knowledge": "2025-05",
240
- "release_date": "2025-11-24",
241
- "last_updated": "2025-11-24",
197
+ "temperature": false,
198
+ "knowledge": "2026-06",
199
+ "release_date": "2026-09-01",
200
+ "last_updated": "2026-09-01",
242
201
  "modalities": {
243
202
  "input": [
244
203
  "text",
@@ -251,21 +210,21 @@
251
210
  },
252
211
  "open_weights": false,
253
212
  "limit": {
254
- "context": 200000,
255
- "output": 64000
213
+ "context": 1000000,
214
+ "output": 128000
256
215
  },
257
216
  "cost": {
258
- "input": 5,
259
- "output": 25,
260
- "cache_read": 0.5,
261
- "cache_write": 6.25
217
+ "input": 10,
218
+ "output": 50,
219
+ "cache_read": 0.25,
220
+ "cache_write": 12.5
262
221
  }
263
222
  },
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",
223
+ "claude-opus-4-6": {
224
+ "id": "claude-opus-4-6",
225
+ "name": "Claude Opus 4.6",
226
+ "description": "High-end Claude for difficult coding, planning, and slower expert reasoning",
227
+ "family": "claude-opus",
269
228
  "attachment": true,
270
229
  "reasoning": true,
271
230
  "reasoning_options": [
@@ -286,8 +245,8 @@
286
245
  "tool_call": true,
287
246
  "structured_output": true,
288
247
  "temperature": true,
289
- "knowledge": "2025-08-31",
290
- "release_date": "2026-02-17",
248
+ "knowledge": "2025-05-31",
249
+ "release_date": "2026-02-04",
291
250
  "last_updated": "2026-03-13",
292
251
  "modalities": {
293
252
  "input": [
@@ -305,17 +264,17 @@
305
264
  "output": 128000
306
265
  },
307
266
  "cost": {
308
- "input": 3,
309
- "output": 15,
310
- "cache_read": 0.3,
311
- "cache_write": 3.75
267
+ "input": 5,
268
+ "output": 25,
269
+ "cache_read": 0.5,
270
+ "cache_write": 6.25
312
271
  }
313
272
  },
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",
273
+ "claude-sonnet-4-5-20250929": {
274
+ "id": "claude-sonnet-4-5-20250929",
275
+ "name": "Claude Sonnet 4.5",
276
+ "description": "Balanced Claude model for coding, analysis, agent workflows, and cost control",
277
+ "family": "claude-sonnet",
319
278
  "attachment": true,
320
279
  "reasoning": true,
321
280
  "reasoning_options": [
@@ -327,9 +286,9 @@
327
286
  "tool_call": true,
328
287
  "structured_output": true,
329
288
  "temperature": true,
330
- "knowledge": "2025-02-28",
331
- "release_date": "2025-10-15",
332
- "last_updated": "2025-10-15",
289
+ "knowledge": "2025-07-31",
290
+ "release_date": "2025-09-29",
291
+ "last_updated": "2025-09-29",
333
292
  "modalities": {
334
293
  "input": [
335
294
  "text",
@@ -342,35 +301,41 @@
342
301
  },
343
302
  "open_weights": false,
344
303
  "limit": {
345
- "context": 200000,
304
+ "context": 1000000,
346
305
  "output": 64000
347
306
  },
348
307
  "cost": {
349
- "input": 1,
350
- "output": 5,
351
- "cache_read": 0.1,
352
- "cache_write": 1.25
308
+ "input": 3,
309
+ "output": 15,
310
+ "cache_read": 0.3,
311
+ "cache_write": 3.75
353
312
  }
354
313
  },
355
- "claude-sonnet-4-5": {
356
- "id": "claude-sonnet-4-5",
357
- "name": "Claude Sonnet 4.5 (latest)",
358
- "description": "Balanced Claude model for coding, analysis, agent workflows, and cost control",
359
- "family": "claude-sonnet",
314
+ "claude-opus-4-7": {
315
+ "id": "claude-opus-4-7",
316
+ "name": "Claude Opus 4.7",
317
+ "description": "Stronger Opus tier for advanced software work and high-stakes reasoning",
318
+ "family": "claude-opus",
360
319
  "attachment": true,
361
320
  "reasoning": true,
362
321
  "reasoning_options": [
363
322
  {
364
- "type": "budget_tokens",
365
- "min": 1024
323
+ "type": "effort",
324
+ "values": [
325
+ "low",
326
+ "medium",
327
+ "high",
328
+ "xhigh",
329
+ "max"
330
+ ]
366
331
  }
367
332
  ],
368
333
  "tool_call": true,
369
334
  "structured_output": true,
370
- "temperature": true,
371
- "knowledge": "2025-07-31",
372
- "release_date": "2025-09-29",
373
- "last_updated": "2025-09-29",
335
+ "temperature": false,
336
+ "knowledge": "2026-01-31",
337
+ "release_date": "2026-04-14",
338
+ "last_updated": "2026-04-16",
374
339
  "modalities": {
375
340
  "input": [
376
341
  "text",
@@ -384,31 +349,23 @@
384
349
  "open_weights": false,
385
350
  "limit": {
386
351
  "context": 1000000,
387
- "output": 64000
352
+ "output": 128000
388
353
  },
389
354
  "cost": {
390
- "input": 3,
391
- "output": 15,
392
- "cache_read": 0.3,
393
- "cache_write": 3.75
355
+ "input": 5,
356
+ "output": 25,
357
+ "cache_read": 0.5,
358
+ "cache_write": 6.25
394
359
  }
395
360
  },
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",
361
+ "claude-haiku-4-5-20251001": {
362
+ "id": "claude-haiku-4-5-20251001",
363
+ "name": "Claude Haiku 4.5",
364
+ "description": "Fast Claude model for responsive assistance, classification, and lightweight agents",
365
+ "family": "claude-haiku",
401
366
  "attachment": true,
402
367
  "reasoning": true,
403
368
  "reasoning_options": [
404
- {
405
- "type": "effort",
406
- "values": [
407
- "low",
408
- "medium",
409
- "high"
410
- ]
411
- },
412
369
  {
413
370
  "type": "budget_tokens",
414
371
  "min": 1024
@@ -417,9 +374,9 @@
417
374
  "tool_call": true,
418
375
  "structured_output": true,
419
376
  "temperature": true,
420
- "knowledge": "2025-05",
421
- "release_date": "2025-11-24",
422
- "last_updated": "2025-11-01",
377
+ "knowledge": "2025-02-28",
378
+ "release_date": "2025-10-15",
379
+ "last_updated": "2025-10-15",
423
380
  "modalities": {
424
381
  "input": [
425
382
  "text",
@@ -436,10 +393,10 @@
436
393
  "output": 64000
437
394
  },
438
395
  "cost": {
439
- "input": 5,
440
- "output": 25,
441
- "cache_read": 0.5,
442
- "cache_write": 6.25
396
+ "input": 1,
397
+ "output": 5,
398
+ "cache_read": 0.1,
399
+ "cache_write": 1.25
443
400
  }
444
401
  },
445
402
  "claude-fable-5": {
@@ -529,23 +486,14 @@
529
486
  "cache_write": 1.25
530
487
  }
531
488
  },
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",
536
- "family": "claude-opus",
489
+ "claude-sonnet-4-5": {
490
+ "id": "claude-sonnet-4-5",
491
+ "name": "Claude Sonnet 4.5 (latest)",
492
+ "description": "Balanced Claude model for coding, analysis, agent workflows, and cost control",
493
+ "family": "claude-sonnet",
537
494
  "attachment": true,
538
495
  "reasoning": true,
539
496
  "reasoning_options": [
540
- {
541
- "type": "effort",
542
- "values": [
543
- "low",
544
- "medium",
545
- "high",
546
- "max"
547
- ]
548
- },
549
497
  {
550
498
  "type": "budget_tokens",
551
499
  "min": 1024
@@ -554,9 +502,9 @@
554
502
  "tool_call": true,
555
503
  "structured_output": true,
556
504
  "temperature": true,
557
- "knowledge": "2025-05-31",
558
- "release_date": "2026-02-04",
559
- "last_updated": "2026-03-13",
505
+ "knowledge": "2025-07-31",
506
+ "release_date": "2025-09-29",
507
+ "last_updated": "2025-09-29",
560
508
  "modalities": {
561
509
  "input": [
562
510
  "text",
@@ -570,19 +518,19 @@
570
518
  "open_weights": false,
571
519
  "limit": {
572
520
  "context": 1000000,
573
- "output": 128000
521
+ "output": 64000
574
522
  },
575
523
  "cost": {
576
- "input": 5,
577
- "output": 25,
578
- "cache_read": 0.5,
579
- "cache_write": 6.25
524
+ "input": 3,
525
+ "output": 15,
526
+ "cache_read": 0.3,
527
+ "cache_write": 3.75
580
528
  }
581
529
  },
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",
530
+ "claude-opus-4-8": {
531
+ "id": "claude-opus-4-8",
532
+ "name": "Claude Opus 4.8",
533
+ "description": "Top Claude Opus tier for the hardest reasoning, coding, and long-horizon agents",
586
534
  "family": "claude-opus",
587
535
  "attachment": true,
588
536
  "reasoning": true,
@@ -601,9 +549,9 @@
601
549
  "tool_call": true,
602
550
  "structured_output": true,
603
551
  "temperature": false,
604
- "knowledge": "2026-05",
605
- "release_date": "2026-07-24",
606
- "last_updated": "2026-07-24",
552
+ "knowledge": "2026-01",
553
+ "release_date": "2026-05-28",
554
+ "last_updated": "2026-05-28",
607
555
  "modalities": {
608
556
  "input": [
609
557
  "text",
@@ -645,6 +593,105 @@
645
593
  "cache_read": 0.5,
646
594
  "cache_write": 6.25
647
595
  }
596
+ },
597
+ "claude-sonnet-5": {
598
+ "id": "claude-sonnet-5",
599
+ "name": "Claude Sonnet 5",
600
+ "description": "Everyday Claude agent model for coding, planning, browsing, and general work",
601
+ "family": "claude-sonnet",
602
+ "attachment": true,
603
+ "reasoning": true,
604
+ "reasoning_options": [
605
+ {
606
+ "type": "toggle"
607
+ },
608
+ {
609
+ "type": "effort",
610
+ "values": [
611
+ "low",
612
+ "medium",
613
+ "high",
614
+ "xhigh",
615
+ "max"
616
+ ]
617
+ }
618
+ ],
619
+ "tool_call": true,
620
+ "structured_output": true,
621
+ "temperature": false,
622
+ "knowledge": "2026-01-31",
623
+ "release_date": "2026-06-29",
624
+ "last_updated": "2026-06-30",
625
+ "modalities": {
626
+ "input": [
627
+ "text",
628
+ "image",
629
+ "pdf"
630
+ ],
631
+ "output": [
632
+ "text"
633
+ ]
634
+ },
635
+ "open_weights": false,
636
+ "limit": {
637
+ "context": 1000000,
638
+ "output": 128000
639
+ },
640
+ "cost": {
641
+ "input": 2,
642
+ "output": 10,
643
+ "cache_read": 0.2,
644
+ "cache_write": 2.5
645
+ }
646
+ },
647
+ "claude-opus-4-5-20251101": {
648
+ "id": "claude-opus-4-5-20251101",
649
+ "name": "Claude Opus 4.5",
650
+ "description": "Flagship Claude model for deep reasoning, coding, and long-horizon agents",
651
+ "family": "claude-opus",
652
+ "attachment": true,
653
+ "reasoning": true,
654
+ "reasoning_options": [
655
+ {
656
+ "type": "effort",
657
+ "values": [
658
+ "low",
659
+ "medium",
660
+ "high"
661
+ ]
662
+ },
663
+ {
664
+ "type": "budget_tokens",
665
+ "min": 1024
666
+ }
667
+ ],
668
+ "tool_call": true,
669
+ "structured_output": true,
670
+ "temperature": true,
671
+ "knowledge": "2025-05",
672
+ "release_date": "2025-11-24",
673
+ "last_updated": "2025-11-01",
674
+ "modalities": {
675
+ "input": [
676
+ "text",
677
+ "image",
678
+ "pdf"
679
+ ],
680
+ "output": [
681
+ "text"
682
+ ]
683
+ },
684
+ "open_weights": false,
685
+ "limit": {
686
+ "context": 200000,
687
+ "output": 64000
688
+ },
689
+ "cost": {
690
+ "input": 5,
691
+ "output": 25,
692
+ "cache_read": 0.5,
693
+ "cache_write": 6.25
694
+ }
648
695
  }
649
696
  }
650
697
  }