llm.rb 16.0.0.pre.8 → 16.0.0.pre.9
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 +69 -43
- data/data/bedrock.json +255 -0
- data/data/deepinfra.json +9 -3
- data/data/deepseek.json +4 -4
- data/data/moonshot.json +0 -3
- data/data/openai.json +323 -0
- data/data/openrouter.json +162 -61
- data/data/xai.json +27 -0
- data/docs/deepdive/advanced/cancellation.md +16 -11
- data/lib/llm/error.rb +14 -0
- data/lib/llm/function/async/task.rb +38 -29
- data/lib/llm/function/fiber/task.rb +61 -37
- data/lib/llm/function/fork/task.rb +88 -6
- data/lib/llm/function/ractor/task.rb +28 -1
- data/lib/llm/function/thread/task.rb +73 -30
- data/lib/llm/function/window.rb +160 -14
- data/lib/llm/provider.rb +1 -1
- data/lib/llm/version.rb +1 -1
- metadata +1 -1
data/data/openai.json
CHANGED
|
@@ -332,6 +332,22 @@
|
|
|
332
332
|
"input": 272000,
|
|
333
333
|
"output": 128000
|
|
334
334
|
},
|
|
335
|
+
"experimental": {
|
|
336
|
+
"modes": {
|
|
337
|
+
"flex": {
|
|
338
|
+
"cost": {
|
|
339
|
+
"input": 0.1,
|
|
340
|
+
"output": 0.625,
|
|
341
|
+
"cache_read": 0.01
|
|
342
|
+
},
|
|
343
|
+
"provider": {
|
|
344
|
+
"body": {
|
|
345
|
+
"service_tier": "flex"
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
},
|
|
335
351
|
"cost": {
|
|
336
352
|
"input": 0.2,
|
|
337
353
|
"output": 1.25,
|
|
@@ -417,6 +433,21 @@
|
|
|
417
433
|
"output": 4096
|
|
418
434
|
},
|
|
419
435
|
"status": "deprecated",
|
|
436
|
+
"experimental": {
|
|
437
|
+
"modes": {
|
|
438
|
+
"fast": {
|
|
439
|
+
"cost": {
|
|
440
|
+
"input": 8.75,
|
|
441
|
+
"output": 26.25
|
|
442
|
+
},
|
|
443
|
+
"provider": {
|
|
444
|
+
"body": {
|
|
445
|
+
"service_tier": "priority"
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
},
|
|
420
451
|
"cost": {
|
|
421
452
|
"input": 5,
|
|
422
453
|
"output": 15
|
|
@@ -450,6 +481,22 @@
|
|
|
450
481
|
"context": 128000,
|
|
451
482
|
"output": 16384
|
|
452
483
|
},
|
|
484
|
+
"experimental": {
|
|
485
|
+
"modes": {
|
|
486
|
+
"fast": {
|
|
487
|
+
"cost": {
|
|
488
|
+
"input": 4.25,
|
|
489
|
+
"output": 17,
|
|
490
|
+
"cache_read": 2.125
|
|
491
|
+
},
|
|
492
|
+
"provider": {
|
|
493
|
+
"body": {
|
|
494
|
+
"service_tier": "priority"
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
},
|
|
453
500
|
"cost": {
|
|
454
501
|
"input": 2.5,
|
|
455
502
|
"output": 10,
|
|
@@ -495,6 +542,34 @@
|
|
|
495
542
|
"input": 272000,
|
|
496
543
|
"output": 128000
|
|
497
544
|
},
|
|
545
|
+
"experimental": {
|
|
546
|
+
"modes": {
|
|
547
|
+
"fast": {
|
|
548
|
+
"cost": {
|
|
549
|
+
"input": 0.45,
|
|
550
|
+
"output": 3.6,
|
|
551
|
+
"cache_read": 0.045
|
|
552
|
+
},
|
|
553
|
+
"provider": {
|
|
554
|
+
"body": {
|
|
555
|
+
"service_tier": "priority"
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
"flex": {
|
|
560
|
+
"cost": {
|
|
561
|
+
"input": 0.125,
|
|
562
|
+
"output": 1,
|
|
563
|
+
"cache_read": 0.0125
|
|
564
|
+
},
|
|
565
|
+
"provider": {
|
|
566
|
+
"body": {
|
|
567
|
+
"service_tier": "flex"
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
},
|
|
498
573
|
"cost": {
|
|
499
574
|
"input": 0.25,
|
|
500
575
|
"output": 2,
|
|
@@ -615,6 +690,34 @@
|
|
|
615
690
|
"output": 100000
|
|
616
691
|
},
|
|
617
692
|
"status": "deprecated",
|
|
693
|
+
"experimental": {
|
|
694
|
+
"modes": {
|
|
695
|
+
"fast": {
|
|
696
|
+
"cost": {
|
|
697
|
+
"input": 2,
|
|
698
|
+
"output": 8,
|
|
699
|
+
"cache_read": 0.5
|
|
700
|
+
},
|
|
701
|
+
"provider": {
|
|
702
|
+
"body": {
|
|
703
|
+
"service_tier": "priority"
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
"flex": {
|
|
708
|
+
"cost": {
|
|
709
|
+
"input": 0.55,
|
|
710
|
+
"output": 2.2,
|
|
711
|
+
"cache_read": 0.138
|
|
712
|
+
},
|
|
713
|
+
"provider": {
|
|
714
|
+
"body": {
|
|
715
|
+
"service_tier": "flex"
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
},
|
|
618
721
|
"cost": {
|
|
619
722
|
"input": 1.1,
|
|
620
723
|
"output": 4.4,
|
|
@@ -767,6 +870,22 @@
|
|
|
767
870
|
"input": 272000,
|
|
768
871
|
"output": 128000
|
|
769
872
|
},
|
|
873
|
+
"experimental": {
|
|
874
|
+
"modes": {
|
|
875
|
+
"fast": {
|
|
876
|
+
"cost": {
|
|
877
|
+
"input": 3.5,
|
|
878
|
+
"output": 28,
|
|
879
|
+
"cache_read": 0.35
|
|
880
|
+
},
|
|
881
|
+
"provider": {
|
|
882
|
+
"body": {
|
|
883
|
+
"service_tier": "priority"
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
},
|
|
770
889
|
"cost": {
|
|
771
890
|
"input": 1.75,
|
|
772
891
|
"output": 14,
|
|
@@ -801,6 +920,22 @@
|
|
|
801
920
|
"output": 32768
|
|
802
921
|
},
|
|
803
922
|
"status": "deprecated",
|
|
923
|
+
"experimental": {
|
|
924
|
+
"modes": {
|
|
925
|
+
"fast": {
|
|
926
|
+
"cost": {
|
|
927
|
+
"input": 0.2,
|
|
928
|
+
"output": 0.8,
|
|
929
|
+
"cache_read": 0.05
|
|
930
|
+
},
|
|
931
|
+
"provider": {
|
|
932
|
+
"body": {
|
|
933
|
+
"service_tier": "priority"
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
},
|
|
804
939
|
"cost": {
|
|
805
940
|
"input": 0.1,
|
|
806
941
|
"output": 0.4,
|
|
@@ -846,6 +981,22 @@
|
|
|
846
981
|
"input": 272000,
|
|
847
982
|
"output": 128000
|
|
848
983
|
},
|
|
984
|
+
"experimental": {
|
|
985
|
+
"modes": {
|
|
986
|
+
"flex": {
|
|
987
|
+
"cost": {
|
|
988
|
+
"input": 0.025,
|
|
989
|
+
"output": 0.2,
|
|
990
|
+
"cache_read": 0.0025
|
|
991
|
+
},
|
|
992
|
+
"provider": {
|
|
993
|
+
"body": {
|
|
994
|
+
"service_tier": "flex"
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
},
|
|
849
1000
|
"cost": {
|
|
850
1001
|
"input": 0.05,
|
|
851
1002
|
"output": 0.4,
|
|
@@ -1422,6 +1573,34 @@
|
|
|
1422
1573
|
"input": 272000,
|
|
1423
1574
|
"output": 128000
|
|
1424
1575
|
},
|
|
1576
|
+
"experimental": {
|
|
1577
|
+
"modes": {
|
|
1578
|
+
"fast": {
|
|
1579
|
+
"cost": {
|
|
1580
|
+
"input": 2.5,
|
|
1581
|
+
"output": 20,
|
|
1582
|
+
"cache_read": 0.25
|
|
1583
|
+
},
|
|
1584
|
+
"provider": {
|
|
1585
|
+
"body": {
|
|
1586
|
+
"service_tier": "priority"
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
},
|
|
1590
|
+
"flex": {
|
|
1591
|
+
"cost": {
|
|
1592
|
+
"input": 0.625,
|
|
1593
|
+
"output": 5,
|
|
1594
|
+
"cache_read": 0.0625
|
|
1595
|
+
},
|
|
1596
|
+
"provider": {
|
|
1597
|
+
"body": {
|
|
1598
|
+
"service_tier": "flex"
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1603
|
+
},
|
|
1425
1604
|
"cost": {
|
|
1426
1605
|
"input": 1.25,
|
|
1427
1606
|
"output": 10,
|
|
@@ -1456,6 +1635,22 @@
|
|
|
1456
1635
|
"context": 128000,
|
|
1457
1636
|
"output": 16384
|
|
1458
1637
|
},
|
|
1638
|
+
"experimental": {
|
|
1639
|
+
"modes": {
|
|
1640
|
+
"fast": {
|
|
1641
|
+
"cost": {
|
|
1642
|
+
"input": 0.25,
|
|
1643
|
+
"output": 1,
|
|
1644
|
+
"cache_read": 0.125
|
|
1645
|
+
},
|
|
1646
|
+
"provider": {
|
|
1647
|
+
"body": {
|
|
1648
|
+
"service_tier": "priority"
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
},
|
|
1459
1654
|
"cost": {
|
|
1460
1655
|
"input": 0.15,
|
|
1461
1656
|
"output": 0.6,
|
|
@@ -1654,6 +1849,18 @@
|
|
|
1654
1849
|
"service_tier": "priority"
|
|
1655
1850
|
}
|
|
1656
1851
|
}
|
|
1852
|
+
},
|
|
1853
|
+
"flex": {
|
|
1854
|
+
"cost": {
|
|
1855
|
+
"input": 0.375,
|
|
1856
|
+
"output": 2.25,
|
|
1857
|
+
"cache_read": 0.0375
|
|
1858
|
+
},
|
|
1859
|
+
"provider": {
|
|
1860
|
+
"body": {
|
|
1861
|
+
"service_tier": "flex"
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1657
1864
|
}
|
|
1658
1865
|
}
|
|
1659
1866
|
},
|
|
@@ -1797,6 +2004,34 @@
|
|
|
1797
2004
|
"input": 272000,
|
|
1798
2005
|
"output": 128000
|
|
1799
2006
|
},
|
|
2007
|
+
"experimental": {
|
|
2008
|
+
"modes": {
|
|
2009
|
+
"fast": {
|
|
2010
|
+
"cost": {
|
|
2011
|
+
"input": 3.5,
|
|
2012
|
+
"output": 28,
|
|
2013
|
+
"cache_read": 0.35
|
|
2014
|
+
},
|
|
2015
|
+
"provider": {
|
|
2016
|
+
"body": {
|
|
2017
|
+
"service_tier": "priority"
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
},
|
|
2021
|
+
"flex": {
|
|
2022
|
+
"cost": {
|
|
2023
|
+
"input": 0.875,
|
|
2024
|
+
"output": 7,
|
|
2025
|
+
"cache_read": 0.0875
|
|
2026
|
+
},
|
|
2027
|
+
"provider": {
|
|
2028
|
+
"body": {
|
|
2029
|
+
"service_tier": "flex"
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
}
|
|
2034
|
+
},
|
|
1800
2035
|
"cost": {
|
|
1801
2036
|
"input": 1.75,
|
|
1802
2037
|
"output": 14,
|
|
@@ -1910,6 +2145,22 @@
|
|
|
1910
2145
|
"context": 1047576,
|
|
1911
2146
|
"output": 32768
|
|
1912
2147
|
},
|
|
2148
|
+
"experimental": {
|
|
2149
|
+
"modes": {
|
|
2150
|
+
"fast": {
|
|
2151
|
+
"cost": {
|
|
2152
|
+
"input": 3.5,
|
|
2153
|
+
"output": 14,
|
|
2154
|
+
"cache_read": 0.875
|
|
2155
|
+
},
|
|
2156
|
+
"provider": {
|
|
2157
|
+
"body": {
|
|
2158
|
+
"service_tier": "priority"
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
2161
|
+
}
|
|
2162
|
+
}
|
|
2163
|
+
},
|
|
1913
2164
|
"cost": {
|
|
1914
2165
|
"input": 2,
|
|
1915
2166
|
"output": 8,
|
|
@@ -1977,6 +2228,22 @@
|
|
|
1977
2228
|
"context": 1047576,
|
|
1978
2229
|
"output": 32768
|
|
1979
2230
|
},
|
|
2231
|
+
"experimental": {
|
|
2232
|
+
"modes": {
|
|
2233
|
+
"fast": {
|
|
2234
|
+
"cost": {
|
|
2235
|
+
"input": 0.7,
|
|
2236
|
+
"output": 2.8,
|
|
2237
|
+
"cache_read": 0.175
|
|
2238
|
+
},
|
|
2239
|
+
"provider": {
|
|
2240
|
+
"body": {
|
|
2241
|
+
"service_tier": "priority"
|
|
2242
|
+
}
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
}
|
|
2246
|
+
},
|
|
1980
2247
|
"cost": {
|
|
1981
2248
|
"input": 0.4,
|
|
1982
2249
|
"output": 1.6,
|
|
@@ -2382,6 +2649,34 @@
|
|
|
2382
2649
|
"context": 200000,
|
|
2383
2650
|
"output": 100000
|
|
2384
2651
|
},
|
|
2652
|
+
"experimental": {
|
|
2653
|
+
"modes": {
|
|
2654
|
+
"fast": {
|
|
2655
|
+
"cost": {
|
|
2656
|
+
"input": 3.5,
|
|
2657
|
+
"output": 14,
|
|
2658
|
+
"cache_read": 0.875
|
|
2659
|
+
},
|
|
2660
|
+
"provider": {
|
|
2661
|
+
"body": {
|
|
2662
|
+
"service_tier": "priority"
|
|
2663
|
+
}
|
|
2664
|
+
}
|
|
2665
|
+
},
|
|
2666
|
+
"flex": {
|
|
2667
|
+
"cost": {
|
|
2668
|
+
"input": 1,
|
|
2669
|
+
"output": 4,
|
|
2670
|
+
"cache_read": 0.25
|
|
2671
|
+
},
|
|
2672
|
+
"provider": {
|
|
2673
|
+
"body": {
|
|
2674
|
+
"service_tier": "flex"
|
|
2675
|
+
}
|
|
2676
|
+
}
|
|
2677
|
+
}
|
|
2678
|
+
}
|
|
2679
|
+
},
|
|
2385
2680
|
"cost": {
|
|
2386
2681
|
"input": 2,
|
|
2387
2682
|
"output": 8,
|
|
@@ -2427,6 +2722,34 @@
|
|
|
2427
2722
|
"input": 272000,
|
|
2428
2723
|
"output": 128000
|
|
2429
2724
|
},
|
|
2725
|
+
"experimental": {
|
|
2726
|
+
"modes": {
|
|
2727
|
+
"fast": {
|
|
2728
|
+
"cost": {
|
|
2729
|
+
"input": 2.5,
|
|
2730
|
+
"output": 20,
|
|
2731
|
+
"cache_read": 0.25
|
|
2732
|
+
},
|
|
2733
|
+
"provider": {
|
|
2734
|
+
"body": {
|
|
2735
|
+
"service_tier": "priority"
|
|
2736
|
+
}
|
|
2737
|
+
}
|
|
2738
|
+
},
|
|
2739
|
+
"flex": {
|
|
2740
|
+
"cost": {
|
|
2741
|
+
"input": 0.625,
|
|
2742
|
+
"output": 5,
|
|
2743
|
+
"cache_read": 0.0625
|
|
2744
|
+
},
|
|
2745
|
+
"provider": {
|
|
2746
|
+
"body": {
|
|
2747
|
+
"service_tier": "flex"
|
|
2748
|
+
}
|
|
2749
|
+
}
|
|
2750
|
+
}
|
|
2751
|
+
}
|
|
2752
|
+
},
|
|
2430
2753
|
"cost": {
|
|
2431
2754
|
"input": 1.25,
|
|
2432
2755
|
"output": 10,
|