llm.rb 12.0.0 → 12.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +193 -1
- data/LICENSE +5 -4
- data/README.md +56 -18
- data/data/anthropic.json +85 -372
- data/data/bedrock.json +498 -3
- data/data/deepinfra.json +567 -47
- data/data/deepseek.json +4 -0
- data/data/google.json +54 -0
- data/data/mistral.json +968 -0
- data/data/openai.json +51 -0
- data/data/xai.json +67 -0
- data/data/zai.json +14 -0
- data/lib/llm/agent.rb +41 -1
- data/lib/llm/context.rb +9 -1
- data/lib/llm/function.rb +6 -0
- data/lib/llm/json_adapter.rb +29 -3
- data/lib/llm/provider.rb +3 -3
- data/lib/llm/providers/anthropic.rb +2 -2
- data/lib/llm/providers/google.rb +3 -1
- data/lib/llm/providers/llamacpp.rb +5 -5
- data/lib/llm/providers/mistral/request_adapter/completion.rb +122 -0
- data/lib/llm/providers/mistral/request_adapter.rb +20 -0
- data/lib/llm/providers/mistral.rb +96 -0
- data/lib/llm/repl/input.rb +64 -0
- data/lib/llm/repl/status.rb +30 -0
- data/lib/llm/repl/stream.rb +46 -0
- data/lib/llm/repl/transcript.rb +61 -0
- data/lib/llm/repl/window.rb +107 -0
- data/lib/llm/repl.rb +78 -0
- data/lib/llm/tools/chdir.rb +23 -0
- data/lib/llm/tools/git.rb +41 -0
- data/lib/llm/tools/mkdir.rb +32 -0
- data/lib/llm/tools/pwd.rb +20 -0
- data/lib/llm/tools/read_file.rb +40 -0
- data/lib/llm/tools/rg.rb +46 -0
- data/lib/llm/tools/shell.rb +48 -0
- data/lib/llm/tools/swap_text.rb +25 -0
- data/lib/llm/tools/write_file.rb +24 -0
- data/lib/llm/tools.rb +5 -0
- data/lib/llm/version.rb +1 -1
- data/lib/llm.rb +9 -0
- data/llm.gemspec +1 -1
- data/resources/deepdive.md +32 -0
- metadata +22 -2
data/data/openai.json
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"o3": {
|
|
11
11
|
"id": "o3",
|
|
12
12
|
"name": "o3",
|
|
13
|
+
"description": "Deliberate o-series reasoner for hard math, coding, and multi-step analysis",
|
|
13
14
|
"family": "o",
|
|
14
15
|
"attachment": true,
|
|
15
16
|
"reasoning": true,
|
|
@@ -53,6 +54,7 @@
|
|
|
53
54
|
"text-embedding-3-large": {
|
|
54
55
|
"id": "text-embedding-3-large",
|
|
55
56
|
"name": "text-embedding-3-large",
|
|
57
|
+
"description": "Embedding model for semantic search, retrieval, clustering, and ranking pipelines",
|
|
56
58
|
"family": "text-embedding",
|
|
57
59
|
"attachment": false,
|
|
58
60
|
"reasoning": false,
|
|
@@ -82,6 +84,7 @@
|
|
|
82
84
|
"gpt-5.2-pro": {
|
|
83
85
|
"id": "gpt-5.2-pro",
|
|
84
86
|
"name": "GPT-5.2 Pro",
|
|
87
|
+
"description": "Higher-accuracy GPT-5.2 variant for tougher reasoning and review workflows",
|
|
85
88
|
"family": "gpt-pro",
|
|
86
89
|
"attachment": true,
|
|
87
90
|
"reasoning": true,
|
|
@@ -124,6 +127,7 @@
|
|
|
124
127
|
"gpt-5": {
|
|
125
128
|
"id": "gpt-5",
|
|
126
129
|
"name": "GPT-5",
|
|
130
|
+
"description": "Original GPT-5 workhorse for reasoning, coding, writing, and tool workflows",
|
|
127
131
|
"family": "gpt",
|
|
128
132
|
"attachment": true,
|
|
129
133
|
"reasoning": true,
|
|
@@ -168,6 +172,7 @@
|
|
|
168
172
|
"gpt-3.5-turbo": {
|
|
169
173
|
"id": "gpt-3.5-turbo",
|
|
170
174
|
"name": "GPT-3.5-turbo",
|
|
175
|
+
"description": "Compact GPT model for low-latency assistance and high-volume workloads",
|
|
171
176
|
"family": "gpt",
|
|
172
177
|
"attachment": false,
|
|
173
178
|
"reasoning": false,
|
|
@@ -199,6 +204,7 @@
|
|
|
199
204
|
"gpt-5-pro": {
|
|
200
205
|
"id": "gpt-5-pro",
|
|
201
206
|
"name": "GPT-5 Pro",
|
|
207
|
+
"description": "Higher-accuracy GPT-5 tier for tough analysis, coding reviews, and planning",
|
|
202
208
|
"family": "gpt-pro",
|
|
203
209
|
"attachment": true,
|
|
204
210
|
"reasoning": true,
|
|
@@ -239,6 +245,7 @@
|
|
|
239
245
|
"gpt-4o": {
|
|
240
246
|
"id": "gpt-4o",
|
|
241
247
|
"name": "GPT-4o",
|
|
248
|
+
"description": "Omni-era GPT for multimodal chat, practical coding, and general assistants",
|
|
242
249
|
"family": "gpt",
|
|
243
250
|
"attachment": true,
|
|
244
251
|
"reasoning": false,
|
|
@@ -272,6 +279,7 @@
|
|
|
272
279
|
"gpt-4": {
|
|
273
280
|
"id": "gpt-4",
|
|
274
281
|
"name": "GPT-4",
|
|
282
|
+
"description": "GPT model for general reasoning, writing, coding, and tool-assisted tasks",
|
|
275
283
|
"family": "gpt",
|
|
276
284
|
"attachment": true,
|
|
277
285
|
"reasoning": false,
|
|
@@ -302,6 +310,7 @@
|
|
|
302
310
|
"o4-mini": {
|
|
303
311
|
"id": "o4-mini",
|
|
304
312
|
"name": "o4-mini",
|
|
313
|
+
"description": "Fast o-series model for compact reasoning, coding, and tool use",
|
|
305
314
|
"family": "o-mini",
|
|
306
315
|
"attachment": true,
|
|
307
316
|
"reasoning": true,
|
|
@@ -344,6 +353,7 @@
|
|
|
344
353
|
"o3-pro": {
|
|
345
354
|
"id": "o3-pro",
|
|
346
355
|
"name": "o3-pro",
|
|
356
|
+
"description": "High-effort o3 tier for difficult technical reasoning and careful answers",
|
|
347
357
|
"family": "o-pro",
|
|
348
358
|
"attachment": true,
|
|
349
359
|
"reasoning": true,
|
|
@@ -385,6 +395,7 @@
|
|
|
385
395
|
"chatgpt-image-latest": {
|
|
386
396
|
"id": "chatgpt-image-latest",
|
|
387
397
|
"name": "chatgpt-image-latest",
|
|
398
|
+
"description": "Image model for prompt-driven generation, editing, and visual design workflows",
|
|
388
399
|
"family": "gpt-image",
|
|
389
400
|
"attachment": true,
|
|
390
401
|
"reasoning": false,
|
|
@@ -412,6 +423,7 @@
|
|
|
412
423
|
"gpt-4o-2024-05-13": {
|
|
413
424
|
"id": "gpt-4o-2024-05-13",
|
|
414
425
|
"name": "GPT-4o (2024-05-13)",
|
|
426
|
+
"description": "GPT model for general reasoning, writing, coding, and tool-assisted tasks",
|
|
415
427
|
"family": "gpt",
|
|
416
428
|
"attachment": true,
|
|
417
429
|
"reasoning": false,
|
|
@@ -443,6 +455,7 @@
|
|
|
443
455
|
"gpt-5.4-nano": {
|
|
444
456
|
"id": "gpt-5.4-nano",
|
|
445
457
|
"name": "GPT-5.4 nano",
|
|
458
|
+
"description": "Cheapest GPT-5.4 lane for simple routing, extraction, and bulk automation",
|
|
446
459
|
"family": "gpt-nano",
|
|
447
460
|
"attachment": true,
|
|
448
461
|
"reasoning": true,
|
|
@@ -488,6 +501,7 @@
|
|
|
488
501
|
"gpt-5-chat-latest": {
|
|
489
502
|
"id": "gpt-5-chat-latest",
|
|
490
503
|
"name": "GPT-5 Chat (latest)",
|
|
504
|
+
"description": "Chat-tuned GPT model for conversational assistance, writing, and tool workflows",
|
|
491
505
|
"family": "gpt-codex",
|
|
492
506
|
"attachment": true,
|
|
493
507
|
"reasoning": true,
|
|
@@ -522,6 +536,7 @@
|
|
|
522
536
|
"gpt-5.1-codex": {
|
|
523
537
|
"id": "gpt-5.1-codex",
|
|
524
538
|
"name": "GPT-5.1 Codex",
|
|
539
|
+
"description": "Codex GPT for repository edits, code review, and practical software agents",
|
|
525
540
|
"family": "gpt-codex",
|
|
526
541
|
"attachment": true,
|
|
527
542
|
"reasoning": true,
|
|
@@ -565,6 +580,7 @@
|
|
|
565
580
|
"gpt-5.3-codex-spark": {
|
|
566
581
|
"id": "gpt-5.3-codex-spark",
|
|
567
582
|
"name": "GPT-5.3 Codex Spark",
|
|
583
|
+
"description": "Coding-optimized GPT model for repository edits, reviews, and agentic software work",
|
|
568
584
|
"family": "gpt-codex-spark",
|
|
569
585
|
"attachment": true,
|
|
570
586
|
"reasoning": true,
|
|
@@ -611,6 +627,7 @@
|
|
|
611
627
|
"gpt-5.1-codex-max": {
|
|
612
628
|
"id": "gpt-5.1-codex-max",
|
|
613
629
|
"name": "GPT-5.1 Codex Max",
|
|
630
|
+
"description": "Coding-optimized GPT model for repository edits, reviews, and agentic software work",
|
|
614
631
|
"family": "gpt-codex",
|
|
615
632
|
"attachment": true,
|
|
616
633
|
"reasoning": true,
|
|
@@ -655,6 +672,7 @@
|
|
|
655
672
|
"gpt-5.3-chat-latest": {
|
|
656
673
|
"id": "gpt-5.3-chat-latest",
|
|
657
674
|
"name": "GPT-5.3 Chat (latest)",
|
|
675
|
+
"description": "Chat-tuned GPT model for conversational assistance, writing, and tool workflows",
|
|
658
676
|
"family": "gpt",
|
|
659
677
|
"attachment": true,
|
|
660
678
|
"reasoning": false,
|
|
@@ -687,6 +705,7 @@
|
|
|
687
705
|
"gpt-4o-2024-08-06": {
|
|
688
706
|
"id": "gpt-4o-2024-08-06",
|
|
689
707
|
"name": "GPT-4o (2024-08-06)",
|
|
708
|
+
"description": "GPT model for general reasoning, writing, coding, and tool-assisted tasks",
|
|
690
709
|
"family": "gpt",
|
|
691
710
|
"attachment": true,
|
|
692
711
|
"reasoning": false,
|
|
@@ -719,6 +738,7 @@
|
|
|
719
738
|
"text-embedding-ada-002": {
|
|
720
739
|
"id": "text-embedding-ada-002",
|
|
721
740
|
"name": "text-embedding-ada-002",
|
|
741
|
+
"description": "Embedding model for semantic search, retrieval, clustering, and ranking pipelines",
|
|
722
742
|
"family": "text-embedding",
|
|
723
743
|
"attachment": false,
|
|
724
744
|
"reasoning": false,
|
|
@@ -748,6 +768,7 @@
|
|
|
748
768
|
"o3-mini": {
|
|
749
769
|
"id": "o3-mini",
|
|
750
770
|
"name": "o3-mini",
|
|
771
|
+
"description": "Smaller o-series reasoner for economical coding, math, and planning tasks",
|
|
751
772
|
"family": "o-mini",
|
|
752
773
|
"attachment": false,
|
|
753
774
|
"reasoning": true,
|
|
@@ -789,6 +810,7 @@
|
|
|
789
810
|
"gpt-5.2": {
|
|
790
811
|
"id": "gpt-5.2",
|
|
791
812
|
"name": "GPT-5.2",
|
|
813
|
+
"description": "Reliable GPT generation for broad coding, writing, and tool-assisted product work",
|
|
792
814
|
"family": "gpt",
|
|
793
815
|
"attachment": true,
|
|
794
816
|
"reasoning": true,
|
|
@@ -834,6 +856,7 @@
|
|
|
834
856
|
"gpt-5.3-codex": {
|
|
835
857
|
"id": "gpt-5.3-codex",
|
|
836
858
|
"name": "GPT-5.3 Codex",
|
|
859
|
+
"description": "Coding-optimized GPT model for repository edits, reviews, and agentic software work",
|
|
837
860
|
"family": "gpt-codex",
|
|
838
861
|
"attachment": true,
|
|
839
862
|
"reasoning": true,
|
|
@@ -880,6 +903,7 @@
|
|
|
880
903
|
"text-embedding-3-small": {
|
|
881
904
|
"id": "text-embedding-3-small",
|
|
882
905
|
"name": "text-embedding-3-small",
|
|
906
|
+
"description": "Embedding model for semantic search, retrieval, clustering, and ranking pipelines",
|
|
883
907
|
"family": "text-embedding",
|
|
884
908
|
"attachment": false,
|
|
885
909
|
"reasoning": false,
|
|
@@ -909,6 +933,7 @@
|
|
|
909
933
|
"gpt-5.1-codex-mini": {
|
|
910
934
|
"id": "gpt-5.1-codex-mini",
|
|
911
935
|
"name": "GPT-5.1 Codex mini",
|
|
936
|
+
"description": "Coding-optimized GPT model for repository edits, reviews, and agentic software work",
|
|
912
937
|
"family": "gpt-codex",
|
|
913
938
|
"attachment": true,
|
|
914
939
|
"reasoning": true,
|
|
@@ -952,6 +977,7 @@
|
|
|
952
977
|
"gpt-5.1-chat-latest": {
|
|
953
978
|
"id": "gpt-5.1-chat-latest",
|
|
954
979
|
"name": "GPT-5.1 Chat",
|
|
980
|
+
"description": "Chat-tuned GPT-5.1 for polished assistants, writing, and product conversations",
|
|
955
981
|
"family": "gpt-codex",
|
|
956
982
|
"attachment": true,
|
|
957
983
|
"reasoning": true,
|
|
@@ -992,6 +1018,7 @@
|
|
|
992
1018
|
"gpt-5.2-chat-latest": {
|
|
993
1019
|
"id": "gpt-5.2-chat-latest",
|
|
994
1020
|
"name": "GPT-5.2 Chat",
|
|
1021
|
+
"description": "Chat-tuned GPT model for conversational assistance, writing, and tool workflows",
|
|
995
1022
|
"family": "gpt-codex",
|
|
996
1023
|
"attachment": true,
|
|
997
1024
|
"reasoning": true,
|
|
@@ -1032,6 +1059,7 @@
|
|
|
1032
1059
|
"o4-mini-deep-research": {
|
|
1033
1060
|
"id": "o4-mini-deep-research",
|
|
1034
1061
|
"name": "o4-mini-deep-research",
|
|
1062
|
+
"description": "Research model for long-horizon investigation, synthesis, and analytical reports",
|
|
1035
1063
|
"family": "o-mini",
|
|
1036
1064
|
"attachment": true,
|
|
1037
1065
|
"reasoning": true,
|
|
@@ -1071,6 +1099,7 @@
|
|
|
1071
1099
|
"gpt-image-1.5": {
|
|
1072
1100
|
"id": "gpt-image-1.5",
|
|
1073
1101
|
"name": "gpt-image-1.5",
|
|
1102
|
+
"description": "Image model for prompt-driven generation, editing, and visual design workflows",
|
|
1074
1103
|
"family": "gpt-image",
|
|
1075
1104
|
"attachment": true,
|
|
1076
1105
|
"reasoning": false,
|
|
@@ -1098,6 +1127,7 @@
|
|
|
1098
1127
|
"gpt-4.1-nano": {
|
|
1099
1128
|
"id": "gpt-4.1-nano",
|
|
1100
1129
|
"name": "GPT-4.1 nano",
|
|
1130
|
+
"description": "Tiny GPT-4.1 option for classification, routing, and very high-volume tasks",
|
|
1101
1131
|
"family": "gpt-nano",
|
|
1102
1132
|
"attachment": true,
|
|
1103
1133
|
"reasoning": false,
|
|
@@ -1130,6 +1160,7 @@
|
|
|
1130
1160
|
"gpt-4o-2024-11-20": {
|
|
1131
1161
|
"id": "gpt-4o-2024-11-20",
|
|
1132
1162
|
"name": "GPT-4o (2024-11-20)",
|
|
1163
|
+
"description": "GPT model for general reasoning, writing, coding, and tool-assisted tasks",
|
|
1133
1164
|
"family": "gpt",
|
|
1134
1165
|
"attachment": true,
|
|
1135
1166
|
"reasoning": false,
|
|
@@ -1162,6 +1193,7 @@
|
|
|
1162
1193
|
"o1": {
|
|
1163
1194
|
"id": "o1",
|
|
1164
1195
|
"name": "o1",
|
|
1196
|
+
"description": "O-series reasoning model for hard analysis, math, coding, and planning",
|
|
1165
1197
|
"family": "o",
|
|
1166
1198
|
"attachment": true,
|
|
1167
1199
|
"reasoning": true,
|
|
@@ -1205,6 +1237,7 @@
|
|
|
1205
1237
|
"o1-pro": {
|
|
1206
1238
|
"id": "o1-pro",
|
|
1207
1239
|
"name": "o1-pro",
|
|
1240
|
+
"description": "O-series reasoning model for hard analysis, math, coding, and planning",
|
|
1208
1241
|
"family": "o-pro",
|
|
1209
1242
|
"attachment": true,
|
|
1210
1243
|
"reasoning": true,
|
|
@@ -1246,6 +1279,7 @@
|
|
|
1246
1279
|
"gpt-5.4": {
|
|
1247
1280
|
"id": "gpt-5.4",
|
|
1248
1281
|
"name": "GPT-5.4",
|
|
1282
|
+
"description": "Agent-ready GPT for coding and computer-use workflows at a lower cost",
|
|
1249
1283
|
"family": "gpt",
|
|
1250
1284
|
"attachment": true,
|
|
1251
1285
|
"reasoning": true,
|
|
@@ -1324,6 +1358,7 @@
|
|
|
1324
1358
|
"gpt-5.4-mini": {
|
|
1325
1359
|
"id": "gpt-5.4-mini",
|
|
1326
1360
|
"name": "GPT-5.4 mini",
|
|
1361
|
+
"description": "Strong small GPT for coding subagents, quick tool use, and high-volume work",
|
|
1327
1362
|
"family": "gpt-mini",
|
|
1328
1363
|
"attachment": true,
|
|
1329
1364
|
"reasoning": true,
|
|
@@ -1385,6 +1420,7 @@
|
|
|
1385
1420
|
"gpt-4.1": {
|
|
1386
1421
|
"id": "gpt-4.1",
|
|
1387
1422
|
"name": "GPT-4.1",
|
|
1423
|
+
"description": "Long-lived GPT workhorse for coding, instruction following, and production apps",
|
|
1388
1424
|
"family": "gpt",
|
|
1389
1425
|
"attachment": true,
|
|
1390
1426
|
"reasoning": false,
|
|
@@ -1418,6 +1454,7 @@
|
|
|
1418
1454
|
"o3-deep-research": {
|
|
1419
1455
|
"id": "o3-deep-research",
|
|
1420
1456
|
"name": "o3-deep-research",
|
|
1457
|
+
"description": "Research model for long-horizon investigation, synthesis, and analytical reports",
|
|
1421
1458
|
"family": "o",
|
|
1422
1459
|
"attachment": true,
|
|
1423
1460
|
"reasoning": true,
|
|
@@ -1457,6 +1494,7 @@
|
|
|
1457
1494
|
"gpt-5-mini": {
|
|
1458
1495
|
"id": "gpt-5-mini",
|
|
1459
1496
|
"name": "GPT-5 Mini",
|
|
1497
|
+
"description": "Small GPT-5 for responsive agents, coding help, and everyday automation",
|
|
1460
1498
|
"family": "gpt-mini",
|
|
1461
1499
|
"attachment": true,
|
|
1462
1500
|
"reasoning": true,
|
|
@@ -1501,6 +1539,7 @@
|
|
|
1501
1539
|
"gpt-image-1": {
|
|
1502
1540
|
"id": "gpt-image-1",
|
|
1503
1541
|
"name": "gpt-image-1",
|
|
1542
|
+
"description": "OpenAI image model for production generation, edits, and brand-safe visual workflows",
|
|
1504
1543
|
"family": "gpt-image",
|
|
1505
1544
|
"attachment": true,
|
|
1506
1545
|
"reasoning": false,
|
|
@@ -1527,6 +1566,7 @@
|
|
|
1527
1566
|
"gpt-4.1-mini": {
|
|
1528
1567
|
"id": "gpt-4.1-mini",
|
|
1529
1568
|
"name": "GPT-4.1 mini",
|
|
1569
|
+
"description": "Affordable GPT-4.1 lane for fast coding help and structured extraction",
|
|
1530
1570
|
"family": "gpt-mini",
|
|
1531
1571
|
"attachment": true,
|
|
1532
1572
|
"reasoning": false,
|
|
@@ -1560,6 +1600,7 @@
|
|
|
1560
1600
|
"gpt-4-turbo": {
|
|
1561
1601
|
"id": "gpt-4-turbo",
|
|
1562
1602
|
"name": "GPT-4 Turbo",
|
|
1603
|
+
"description": "Compact GPT model for low-latency assistance and high-volume workloads",
|
|
1563
1604
|
"family": "gpt",
|
|
1564
1605
|
"attachment": true,
|
|
1565
1606
|
"reasoning": false,
|
|
@@ -1591,6 +1632,7 @@
|
|
|
1591
1632
|
"gpt-image-1-mini": {
|
|
1592
1633
|
"id": "gpt-image-1-mini",
|
|
1593
1634
|
"name": "gpt-image-1-mini",
|
|
1635
|
+
"description": "Image model for prompt-driven generation, editing, and visual design workflows",
|
|
1594
1636
|
"family": "gpt-image",
|
|
1595
1637
|
"attachment": true,
|
|
1596
1638
|
"reasoning": false,
|
|
@@ -1618,6 +1660,7 @@
|
|
|
1618
1660
|
"gpt-5-nano": {
|
|
1619
1661
|
"id": "gpt-5-nano",
|
|
1620
1662
|
"name": "GPT-5 Nano",
|
|
1663
|
+
"description": "Tiny GPT-5 lane for routing, extraction, classification, and bulk jobs",
|
|
1621
1664
|
"family": "gpt-nano",
|
|
1622
1665
|
"attachment": true,
|
|
1623
1666
|
"reasoning": true,
|
|
@@ -1662,6 +1705,7 @@
|
|
|
1662
1705
|
"gpt-5.4-pro": {
|
|
1663
1706
|
"id": "gpt-5.4-pro",
|
|
1664
1707
|
"name": "GPT-5.4 Pro",
|
|
1708
|
+
"description": "More exact GPT-5.4 tier for demanding professional reasoning and agent tasks",
|
|
1665
1709
|
"family": "gpt-pro",
|
|
1666
1710
|
"attachment": true,
|
|
1667
1711
|
"reasoning": true,
|
|
@@ -1718,6 +1762,7 @@
|
|
|
1718
1762
|
"gpt-5.5-pro": {
|
|
1719
1763
|
"id": "gpt-5.5-pro",
|
|
1720
1764
|
"name": "GPT-5.5 Pro",
|
|
1765
|
+
"description": "Highest-accuracy GPT-5.5 tier for slower, precision-heavy reasoning and coding",
|
|
1721
1766
|
"family": "gpt-pro",
|
|
1722
1767
|
"attachment": true,
|
|
1723
1768
|
"reasoning": true,
|
|
@@ -1775,6 +1820,7 @@
|
|
|
1775
1820
|
"gpt-4o-mini": {
|
|
1776
1821
|
"id": "gpt-4o-mini",
|
|
1777
1822
|
"name": "GPT-4o mini",
|
|
1823
|
+
"description": "Small omni GPT for cheap multimodal assistance and production-scale traffic",
|
|
1778
1824
|
"family": "gpt-mini",
|
|
1779
1825
|
"attachment": true,
|
|
1780
1826
|
"reasoning": false,
|
|
@@ -1808,6 +1854,7 @@
|
|
|
1808
1854
|
"gpt-5-codex": {
|
|
1809
1855
|
"id": "gpt-5-codex",
|
|
1810
1856
|
"name": "GPT-5-Codex",
|
|
1857
|
+
"description": "Coding-optimized GPT model for repository edits, reviews, and agentic software work",
|
|
1811
1858
|
"family": "gpt-codex",
|
|
1812
1859
|
"attachment": false,
|
|
1813
1860
|
"reasoning": true,
|
|
@@ -1851,6 +1898,7 @@
|
|
|
1851
1898
|
"gpt-5.2-codex": {
|
|
1852
1899
|
"id": "gpt-5.2-codex",
|
|
1853
1900
|
"name": "GPT-5.2 Codex",
|
|
1901
|
+
"description": "Code-specialist GPT for repository edits, reviews, and long-running software agents",
|
|
1854
1902
|
"family": "gpt-codex",
|
|
1855
1903
|
"attachment": true,
|
|
1856
1904
|
"reasoning": true,
|
|
@@ -1896,6 +1944,7 @@
|
|
|
1896
1944
|
"gpt-image-2": {
|
|
1897
1945
|
"id": "gpt-image-2",
|
|
1898
1946
|
"name": "gpt-image-2",
|
|
1947
|
+
"description": "Image model for prompt-driven generation, editing, and visual design workflows",
|
|
1899
1948
|
"family": "gpt-image",
|
|
1900
1949
|
"attachment": true,
|
|
1901
1950
|
"reasoning": false,
|
|
@@ -1927,6 +1976,7 @@
|
|
|
1927
1976
|
"gpt-5.1": {
|
|
1928
1977
|
"id": "gpt-5.1",
|
|
1929
1978
|
"name": "GPT-5.1",
|
|
1979
|
+
"description": "Sharper GPT-5 generation for coding, product work, and tool-assisted tasks",
|
|
1930
1980
|
"family": "gpt",
|
|
1931
1981
|
"attachment": true,
|
|
1932
1982
|
"reasoning": true,
|
|
@@ -1971,6 +2021,7 @@
|
|
|
1971
2021
|
"gpt-5.5": {
|
|
1972
2022
|
"id": "gpt-5.5",
|
|
1973
2023
|
"name": "GPT-5.5",
|
|
2024
|
+
"description": "Default frontier GPT for coding, computer use, research, and knowledge work",
|
|
1974
2025
|
"family": "gpt",
|
|
1975
2026
|
"attachment": true,
|
|
1976
2027
|
"reasoning": true,
|
data/data/xai.json
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"grok-4.20-multi-agent-0309": {
|
|
11
11
|
"id": "grok-4.20-multi-agent-0309",
|
|
12
12
|
"name": "Grok 4.20 Multi-Agent",
|
|
13
|
+
"description": "Grok model for agentic tool use, reasoning, coding, and live assistance",
|
|
13
14
|
"family": "grok",
|
|
14
15
|
"attachment": true,
|
|
15
16
|
"reasoning": true,
|
|
@@ -69,6 +70,7 @@
|
|
|
69
70
|
"grok-4.20-0309-non-reasoning": {
|
|
70
71
|
"id": "grok-4.20-0309-non-reasoning",
|
|
71
72
|
"name": "Grok 4.20 (Non-Reasoning)",
|
|
73
|
+
"description": "Grok model for agentic tool use, reasoning, coding, and live assistance",
|
|
72
74
|
"family": "grok",
|
|
73
75
|
"attachment": true,
|
|
74
76
|
"reasoning": false,
|
|
@@ -117,6 +119,7 @@
|
|
|
117
119
|
"grok-4.3": {
|
|
118
120
|
"id": "grok-4.3",
|
|
119
121
|
"name": "Grok 4.3",
|
|
122
|
+
"description": "xAI's Grok for chat, coding, agentic tools, and lower hallucination risk",
|
|
120
123
|
"family": "grok",
|
|
121
124
|
"attachment": true,
|
|
122
125
|
"reasoning": true,
|
|
@@ -176,6 +179,7 @@
|
|
|
176
179
|
"grok-imagine-image-quality": {
|
|
177
180
|
"id": "grok-imagine-image-quality",
|
|
178
181
|
"name": "Grok Imagine Image Quality",
|
|
182
|
+
"description": "Image model for prompt-driven generation, editing, and visual design workflows",
|
|
179
183
|
"family": "grok",
|
|
180
184
|
"attachment": true,
|
|
181
185
|
"reasoning": false,
|
|
@@ -203,6 +207,7 @@
|
|
|
203
207
|
"grok-imagine-video": {
|
|
204
208
|
"id": "grok-imagine-video",
|
|
205
209
|
"name": "Grok Imagine Video",
|
|
210
|
+
"description": "Image model for prompt-driven generation, editing, and visual design workflows",
|
|
206
211
|
"family": "grok",
|
|
207
212
|
"attachment": true,
|
|
208
213
|
"reasoning": false,
|
|
@@ -227,9 +232,69 @@
|
|
|
227
232
|
"output": 0
|
|
228
233
|
}
|
|
229
234
|
},
|
|
235
|
+
"grok-4.5": {
|
|
236
|
+
"id": "grok-4.5",
|
|
237
|
+
"name": "Grok 4.5",
|
|
238
|
+
"description": "xAI's latest Grok for chat, coding, agentic tools, and lower hallucination risk",
|
|
239
|
+
"family": "grok",
|
|
240
|
+
"attachment": true,
|
|
241
|
+
"reasoning": true,
|
|
242
|
+
"reasoning_options": [
|
|
243
|
+
{
|
|
244
|
+
"type": "effort",
|
|
245
|
+
"values": [
|
|
246
|
+
"low",
|
|
247
|
+
"medium",
|
|
248
|
+
"high"
|
|
249
|
+
]
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
"tool_call": true,
|
|
253
|
+
"structured_output": true,
|
|
254
|
+
"temperature": true,
|
|
255
|
+
"release_date": "2026-07-08",
|
|
256
|
+
"last_updated": "2026-07-08",
|
|
257
|
+
"modalities": {
|
|
258
|
+
"input": [
|
|
259
|
+
"text",
|
|
260
|
+
"image",
|
|
261
|
+
"pdf"
|
|
262
|
+
],
|
|
263
|
+
"output": [
|
|
264
|
+
"text"
|
|
265
|
+
]
|
|
266
|
+
},
|
|
267
|
+
"open_weights": false,
|
|
268
|
+
"limit": {
|
|
269
|
+
"context": 500000,
|
|
270
|
+
"output": 500000
|
|
271
|
+
},
|
|
272
|
+
"cost": {
|
|
273
|
+
"input": 2,
|
|
274
|
+
"output": 6,
|
|
275
|
+
"cache_read": 0.5,
|
|
276
|
+
"tiers": [
|
|
277
|
+
{
|
|
278
|
+
"input": 4,
|
|
279
|
+
"output": 12,
|
|
280
|
+
"cache_read": 1,
|
|
281
|
+
"tier": {
|
|
282
|
+
"type": "context",
|
|
283
|
+
"size": 200000
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
],
|
|
287
|
+
"context_over_200k": {
|
|
288
|
+
"input": 4,
|
|
289
|
+
"output": 12,
|
|
290
|
+
"cache_read": 1
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
},
|
|
230
294
|
"grok-4.20-0309-reasoning": {
|
|
231
295
|
"id": "grok-4.20-0309-reasoning",
|
|
232
296
|
"name": "Grok 4.20 (Reasoning)",
|
|
297
|
+
"description": "Reasoning Grok for document-heavy analysis and long-horizon tool use",
|
|
233
298
|
"family": "grok",
|
|
234
299
|
"attachment": true,
|
|
235
300
|
"reasoning": true,
|
|
@@ -279,6 +344,7 @@
|
|
|
279
344
|
"grok-imagine-image": {
|
|
280
345
|
"id": "grok-imagine-image",
|
|
281
346
|
"name": "Grok Imagine Image",
|
|
347
|
+
"description": "Image model for prompt-driven generation, editing, and visual design workflows",
|
|
282
348
|
"family": "grok",
|
|
283
349
|
"attachment": true,
|
|
284
350
|
"reasoning": false,
|
|
@@ -306,6 +372,7 @@
|
|
|
306
372
|
"grok-build-0.1": {
|
|
307
373
|
"id": "grok-build-0.1",
|
|
308
374
|
"name": "Grok Build 0.1",
|
|
375
|
+
"description": "Fast Grok coding model tuned for agentic engineering and iterative edits",
|
|
309
376
|
"family": "grok-build",
|
|
310
377
|
"attachment": true,
|
|
311
378
|
"reasoning": true,
|
data/data/zai.json
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"glm-4.7": {
|
|
12
12
|
"id": "glm-4.7",
|
|
13
13
|
"name": "GLM-4.7",
|
|
14
|
+
"description": "Mature GLM model for dependable coding, reasoning, and structured agent tasks",
|
|
14
15
|
"family": "glm",
|
|
15
16
|
"attachment": false,
|
|
16
17
|
"reasoning": true,
|
|
@@ -50,6 +51,7 @@
|
|
|
50
51
|
"glm-4.5v": {
|
|
51
52
|
"id": "glm-4.5v",
|
|
52
53
|
"name": "GLM-4.5V",
|
|
54
|
+
"description": "GLM vision model for visual reasoning, documents, and multimodal agents",
|
|
53
55
|
"family": "glm",
|
|
54
56
|
"attachment": true,
|
|
55
57
|
"reasoning": true,
|
|
@@ -86,6 +88,7 @@
|
|
|
86
88
|
"glm-4.5": {
|
|
87
89
|
"id": "glm-4.5",
|
|
88
90
|
"name": "GLM-4.5",
|
|
91
|
+
"description": "Hybrid-reasoning GLM release that made the 4.5 line broadly useful",
|
|
89
92
|
"family": "glm",
|
|
90
93
|
"attachment": false,
|
|
91
94
|
"reasoning": true,
|
|
@@ -122,6 +125,7 @@
|
|
|
122
125
|
"glm-4.7-flashx": {
|
|
123
126
|
"id": "glm-4.7-flashx",
|
|
124
127
|
"name": "GLM-4.7-FlashX",
|
|
128
|
+
"description": "Efficient GLM model for fast reasoning, coding, and agent workflows",
|
|
125
129
|
"family": "glm-flash",
|
|
126
130
|
"attachment": false,
|
|
127
131
|
"reasoning": true,
|
|
@@ -158,6 +162,7 @@
|
|
|
158
162
|
"glm-5.1": {
|
|
159
163
|
"id": "glm-5.1",
|
|
160
164
|
"name": "GLM-5.1",
|
|
165
|
+
"description": "Strong GLM coding model for agentic engineering, terminals, and repository generation",
|
|
161
166
|
"family": "glm",
|
|
162
167
|
"attachment": false,
|
|
163
168
|
"reasoning": true,
|
|
@@ -197,6 +202,7 @@
|
|
|
197
202
|
"glm-4.6": {
|
|
198
203
|
"id": "glm-4.6",
|
|
199
204
|
"name": "GLM-4.6",
|
|
205
|
+
"description": "Late GLM-4 workhorse for coding agents, reasoning, and structured tasks",
|
|
200
206
|
"family": "glm",
|
|
201
207
|
"attachment": false,
|
|
202
208
|
"reasoning": true,
|
|
@@ -233,6 +239,7 @@
|
|
|
233
239
|
"glm-5.2": {
|
|
234
240
|
"id": "glm-5.2",
|
|
235
241
|
"name": "GLM-5.2",
|
|
242
|
+
"description": "Open flagship GLM for long-horizon coding agents and million-token context work",
|
|
236
243
|
"family": "glm",
|
|
237
244
|
"attachment": false,
|
|
238
245
|
"reasoning": true,
|
|
@@ -276,6 +283,7 @@
|
|
|
276
283
|
"glm-4.6v": {
|
|
277
284
|
"id": "glm-4.6v",
|
|
278
285
|
"name": "GLM-4.6V",
|
|
286
|
+
"description": "GLM vision model for visual reasoning, documents, and multimodal agents",
|
|
279
287
|
"family": "glm",
|
|
280
288
|
"attachment": true,
|
|
281
289
|
"reasoning": true,
|
|
@@ -312,6 +320,7 @@
|
|
|
312
320
|
"glm-5v-turbo": {
|
|
313
321
|
"id": "glm-5v-turbo",
|
|
314
322
|
"name": "GLM-5V-Turbo",
|
|
323
|
+
"description": "Fast GLM vision model for screenshots, documents, and multimodal agent tasks",
|
|
315
324
|
"family": "glm",
|
|
316
325
|
"attachment": true,
|
|
317
326
|
"reasoning": true,
|
|
@@ -353,6 +362,7 @@
|
|
|
353
362
|
"glm-4.5-air": {
|
|
354
363
|
"id": "glm-4.5-air",
|
|
355
364
|
"name": "GLM-4.5-Air",
|
|
365
|
+
"description": "Lighter GLM-4.5 variant for fast coding assistance and cheaper agents",
|
|
356
366
|
"family": "glm-air",
|
|
357
367
|
"attachment": false,
|
|
358
368
|
"reasoning": true,
|
|
@@ -389,6 +399,7 @@
|
|
|
389
399
|
"glm-4.7-flash": {
|
|
390
400
|
"id": "glm-4.7-flash",
|
|
391
401
|
"name": "GLM-4.7-Flash",
|
|
402
|
+
"description": "Budget GLM lane for fast coding help, routing, and everyday automation",
|
|
392
403
|
"family": "glm-flash",
|
|
393
404
|
"attachment": false,
|
|
394
405
|
"reasoning": true,
|
|
@@ -425,6 +436,7 @@
|
|
|
425
436
|
"glm-4.5-flash": {
|
|
426
437
|
"id": "glm-4.5-flash",
|
|
427
438
|
"name": "GLM-4.5-Flash",
|
|
439
|
+
"description": "Efficient GLM model for fast reasoning, coding, and agent workflows",
|
|
428
440
|
"family": "glm-flash",
|
|
429
441
|
"attachment": false,
|
|
430
442
|
"reasoning": true,
|
|
@@ -461,6 +473,7 @@
|
|
|
461
473
|
"glm-5": {
|
|
462
474
|
"id": "glm-5",
|
|
463
475
|
"name": "GLM-5",
|
|
476
|
+
"description": "General GLM flagship for coding, analysis, and tool-heavy engineering workflows",
|
|
464
477
|
"family": "glm",
|
|
465
478
|
"attachment": false,
|
|
466
479
|
"reasoning": true,
|
|
@@ -499,6 +512,7 @@
|
|
|
499
512
|
"glm-5-turbo": {
|
|
500
513
|
"id": "glm-5-turbo",
|
|
501
514
|
"name": "GLM-5-Turbo",
|
|
515
|
+
"description": "Faster GLM-5 lane for coding agents that need lower latency",
|
|
502
516
|
"family": "glm",
|
|
503
517
|
"attachment": false,
|
|
504
518
|
"reasoning": true,
|
data/lib/llm/agent.rb
CHANGED
|
@@ -61,7 +61,11 @@ module LLM
|
|
|
61
61
|
# Returns the current tools when no argument is provided
|
|
62
62
|
def self.tools(*tools, &block)
|
|
63
63
|
return @tools || [] if tools.empty? && !block
|
|
64
|
-
|
|
64
|
+
if tools.size == 1 and tools.grep(Symbol).any?
|
|
65
|
+
@tools = tools.first
|
|
66
|
+
else
|
|
67
|
+
@tools = block || tools.flatten
|
|
68
|
+
end
|
|
65
69
|
end
|
|
66
70
|
|
|
67
71
|
##
|
|
@@ -334,6 +338,15 @@ module LLM
|
|
|
334
338
|
@tracer || @ctx.tracer
|
|
335
339
|
end
|
|
336
340
|
|
|
341
|
+
##
|
|
342
|
+
# @param [LLM::Tracer, nil] other
|
|
343
|
+
# A tracer, or nil.
|
|
344
|
+
# @return [void]
|
|
345
|
+
def tracer=(other)
|
|
346
|
+
@ctx.tracer = other
|
|
347
|
+
@tracer = other
|
|
348
|
+
end
|
|
349
|
+
|
|
337
350
|
##
|
|
338
351
|
# @return [LLM::Stream, #<<, nil]
|
|
339
352
|
# Returns a stream object, or nil
|
|
@@ -375,6 +388,33 @@ module LLM
|
|
|
375
388
|
@ctx.context_window
|
|
376
389
|
end
|
|
377
390
|
|
|
391
|
+
##
|
|
392
|
+
# Start a minimalist repl that can interact
|
|
393
|
+
# with the agent and its current state. This
|
|
394
|
+
# method requires the 'curses' gem to be installed
|
|
395
|
+
# and available to require.
|
|
396
|
+
#
|
|
397
|
+
# @note
|
|
398
|
+
# By default this method disables the tracer for
|
|
399
|
+
# the duration of the repl session, and restores
|
|
400
|
+
# it afterwards.
|
|
401
|
+
# @param [Boolean] trace
|
|
402
|
+
# When true, the tracer is kept alive during the
|
|
403
|
+
# repl session. Default is false.
|
|
404
|
+
# @return [void]
|
|
405
|
+
def repl(trace: false)
|
|
406
|
+
if !trace
|
|
407
|
+
previous = tracer
|
|
408
|
+
self.tracer = nil
|
|
409
|
+
end
|
|
410
|
+
require_relative "repl" unless defined?(::LLM::Repl)
|
|
411
|
+
LLM::Repl.new(self).start
|
|
412
|
+
ensure
|
|
413
|
+
if !trace
|
|
414
|
+
self.tracer = previous
|
|
415
|
+
end
|
|
416
|
+
end
|
|
417
|
+
|
|
378
418
|
##
|
|
379
419
|
# @see LLM::Context#params
|
|
380
420
|
# @return [Hash]
|