liter_llm 2.2.0 → 2.2.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b3dc0a9f183e0f7d2e468d519ad911720501e3633f68a67bd0940782e1ff018
4
- data.tar.gz: 83bac628afe410dc0da63752c7ebae701cdd433b15b0e58522283d677d1e8a59
3
+ metadata.gz: 46a3c3ebc5ebec1d5a355be68d99db71abb7af029521172c0c6bce9915db95fd
4
+ data.tar.gz: 933dc832f63646babeb7c91f267140d5cf500ac5f164ead5da8ea587566bff41
5
5
  SHA512:
6
- metadata.gz: 9d83d1ae3756951a5c819cb6a15d46e6ec08def7161bd5810db59192b62ee875b0b10c459ba1c7f2339c58042ebb2dc53e18a557b5a9b248f564fc8ba0959168
7
- data.tar.gz: ccdbd3742fa8e71e8b6fbe372a4ac7ff59a5879f240d91249575737e9f317fe28caeb336525f247026281457860cef4a0fa70400ba51627839cd8288b4b1a1be
6
+ metadata.gz: 2586587a37f0e418578c23e005f254d26a250cc027d32c8fbf024802a88689e529327081d88863d78bceef0b95c0acd2f7000f55bdc86fc98affaa5c3646a02d
7
+ data.tar.gz: d4eb80b4a4157e9c6b73d875291d508fde96043cdba4c31412efd519bcbf90c5ed08da47bbcc57870a6ebcabee84005b973e1bd58dc2a8e3c0fb5fa9e48be4fa
@@ -103,9 +103,9 @@ dependencies = [
103
103
 
104
104
  [[package]]
105
105
  name = "asyncband"
106
- version = "0.7.2"
106
+ version = "0.7.3"
107
107
  source = "registry+https://github.com/rust-lang/crates.io-index"
108
- checksum = "f2d85fd3d291fabcc40c7232c92c280ec1754fd7b5d7ea769f143222143e179a"
108
+ checksum = "5161fb43cb8f231f06983cb2b8f9ee9cee14be0b1356d8383398cc0f312800d1"
109
109
 
110
110
  [[package]]
111
111
  name = "atomic-waker"
@@ -186,9 +186,9 @@ dependencies = [
186
186
 
187
187
  [[package]]
188
188
  name = "aws-smithy-runtime-api"
189
- version = "1.18.0"
189
+ version = "1.19.0"
190
190
  source = "registry+https://github.com/rust-lang/crates.io-index"
191
- checksum = "9bb0deb40a69de59f7809251cfe1ab16de135f42c49d222d1202b4d0ce19720f"
191
+ checksum = "c0730c16f91124c6a2abb4932c77e299288b3dd9f967ea2e9ec48cc6731e87a4"
192
192
  dependencies = [
193
193
  "aws-smithy-async",
194
194
  "aws-smithy-runtime-api-macros",
@@ -645,9 +645,9 @@ dependencies = [
645
645
 
646
646
  [[package]]
647
647
  name = "ctutils"
648
- version = "0.4.2"
648
+ version = "0.4.3"
649
649
  source = "registry+https://github.com/rust-lang/crates.io-index"
650
- checksum = "7d5515a3834141de9eafb9717ad39eea8247b5674e6066c404e8c4b365d2a29e"
650
+ checksum = "03bb0e1cc970d482d121d9a1744999169b69a07470b3d644a7894e53fcaf4574"
651
651
  dependencies = [
652
652
  "cmov",
653
653
  ]
@@ -848,9 +848,9 @@ dependencies = [
848
848
 
849
849
  [[package]]
850
850
  name = "either"
851
- version = "1.18.0"
851
+ version = "1.19.0"
852
852
  source = "registry+https://github.com/rust-lang/crates.io-index"
853
- checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34"
853
+ checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be"
854
854
 
855
855
  [[package]]
856
856
  name = "encode_unicode"
@@ -1144,9 +1144,9 @@ dependencies = [
1144
1144
 
1145
1145
  [[package]]
1146
1146
  name = "h2"
1147
- version = "0.4.19"
1147
+ version = "0.4.20"
1148
1148
  source = "registry+https://github.com/rust-lang/crates.io-index"
1149
- checksum = "ef8e5e5a340588f4452631496976cf8636d4a7ecf600239fdc27615d2530bc16"
1149
+ checksum = "7d29020232d6aa3fb1daca64c1127cf662cf97f254ae16c18c05b8ab635fc118"
1150
1150
  dependencies = [
1151
1151
  "atomic-waker",
1152
1152
  "bytes",
@@ -1246,6 +1246,12 @@ version = "1.10.1"
1246
1246
  source = "registry+https://github.com/rust-lang/crates.io-index"
1247
1247
  checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
1248
1248
 
1249
+ [[package]]
1250
+ name = "httpdate"
1251
+ version = "1.0.3"
1252
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1253
+ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
1254
+
1249
1255
  [[package]]
1250
1256
  name = "hybrid-array"
1251
1257
  version = "0.4.15"
@@ -1257,9 +1263,9 @@ dependencies = [
1257
1263
 
1258
1264
  [[package]]
1259
1265
  name = "hyper"
1260
- version = "1.11.1"
1266
+ version = "1.12.0"
1261
1267
  source = "registry+https://github.com/rust-lang/crates.io-index"
1262
- checksum = "27b501faa50e7a26c3d3560ca625132f4078a17771f4810baf70475ae48cbe43"
1268
+ checksum = "2c3e324da4c95177d6291d4c8730197c0d1822f8a9766814a4a44fa5ab797c9c"
1263
1269
  dependencies = [
1264
1270
  "atomic-waker",
1265
1271
  "bytes",
@@ -1521,9 +1527,9 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
1521
1527
 
1522
1528
  [[package]]
1523
1529
  name = "jiff"
1524
- version = "0.2.37"
1530
+ version = "0.2.38"
1525
1531
  source = "registry+https://github.com/rust-lang/crates.io-index"
1526
- checksum = "0ab1baf72f08796de0260609515130699b890ac25f30e610ad894bc5856cafdb"
1532
+ checksum = "b2b005715dcbeb0089a3c0dab99f2ff1cc3b2525323552703d648585d342a383"
1527
1533
  dependencies = [
1528
1534
  "defmt",
1529
1535
  "jiff-core",
@@ -1550,9 +1556,9 @@ dependencies = [
1550
1556
 
1551
1557
  [[package]]
1552
1558
  name = "jiff-static"
1553
- version = "0.2.37"
1559
+ version = "0.2.38"
1554
1560
  source = "registry+https://github.com/rust-lang/crates.io-index"
1555
- checksum = "378268a1116ad67ae6228701118ac9f491d78fda38a40a1f1a9e1348de6f7212"
1561
+ checksum = "2cc9817253cf7c7ee4684451bd327e88d6f3658014e54a29198625590650695c"
1556
1562
  dependencies = [
1557
1563
  "jiff-core",
1558
1564
  "proc-macro2",
@@ -1562,9 +1568,9 @@ dependencies = [
1562
1568
 
1563
1569
  [[package]]
1564
1570
  name = "jiff-tzdb"
1565
- version = "0.1.8"
1571
+ version = "0.1.9"
1566
1572
  source = "registry+https://github.com/rust-lang/crates.io-index"
1567
- checksum = "142bd39932ad231f10513df9ab62661fead8719872150b7ad02a2df79f4e141e"
1573
+ checksum = "fa8377070c6bae868759445e5a77f66d84f0b72f3a054bfb00e6d038b8282da7"
1568
1574
 
1569
1575
  [[package]]
1570
1576
  name = "jiff-tzdb-platform"
@@ -1654,9 +1660,9 @@ dependencies = [
1654
1660
 
1655
1661
  [[package]]
1656
1662
  name = "lazy_static"
1657
- version = "1.5.0"
1663
+ version = "1.5.1"
1658
1664
  source = "registry+https://github.com/rust-lang/crates.io-index"
1659
- checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
1665
+ checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb"
1660
1666
 
1661
1667
  [[package]]
1662
1668
  name = "libc"
@@ -1697,9 +1703,9 @@ checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae"
1697
1703
 
1698
1704
  [[package]]
1699
1705
  name = "liter-llm"
1700
- version = "2.2.0"
1706
+ version = "2.2.3"
1701
1707
  source = "registry+https://github.com/rust-lang/crates.io-index"
1702
- checksum = "8638e8a77817d0debb8944de890ad736f80e1a46c2c53b8d75a303f59307fa68"
1708
+ checksum = "c814c4f161e13d656752dc477411a6ac223f768f2fbe96e10a02ce9eee07915f"
1703
1709
  dependencies = [
1704
1710
  "ahash",
1705
1711
  "arc-swap",
@@ -1713,6 +1719,9 @@ dependencies = [
1713
1719
  "futures-util",
1714
1720
  "gcp_auth",
1715
1721
  "gloo-timers",
1722
+ "hex",
1723
+ "http",
1724
+ "httpdate",
1716
1725
  "jsonwebtoken",
1717
1726
  "memchr",
1718
1727
  "opendal",
@@ -1727,6 +1736,7 @@ dependencies = [
1727
1736
  "secrecy",
1728
1737
  "serde",
1729
1738
  "serde_json",
1739
+ "sha2",
1730
1740
  "thiserror",
1731
1741
  "tokenizers",
1732
1742
  "tokio",
@@ -1742,7 +1752,7 @@ dependencies = [
1742
1752
 
1743
1753
  [[package]]
1744
1754
  name = "liter-llm-rb"
1745
- version = "2.2.0"
1755
+ version = "2.2.3"
1746
1756
  dependencies = [
1747
1757
  "futures",
1748
1758
  "liter-llm",
@@ -1817,16 +1827,6 @@ dependencies = [
1817
1827
  "digest 0.11.3",
1818
1828
  ]
1819
1829
 
1820
- [[package]]
1821
- name = "mea"
1822
- version = "0.6.7"
1823
- source = "registry+https://github.com/rust-lang/crates.io-index"
1824
- checksum = "c709842c4ce65cb91e2666ad5319dfc1efc3af0d34f02075eddca9000d9f8afb"
1825
- dependencies = [
1826
- "hashbrown 0.17.1",
1827
- "slab",
1828
- ]
1829
-
1830
1830
  [[package]]
1831
1831
  name = "memchr"
1832
1832
  version = "2.8.3"
@@ -2009,7 +2009,7 @@ dependencies = [
2009
2009
  "log",
2010
2010
  "md-5",
2011
2011
  "percent-encoding",
2012
- "quick-xml",
2012
+ "quick-xml 0.41.0",
2013
2013
  "reqsign-core",
2014
2014
  "serde",
2015
2015
  "serde_json",
@@ -2075,7 +2075,7 @@ dependencies = [
2075
2075
  "log",
2076
2076
  "md-5",
2077
2077
  "opendal-core",
2078
- "quick-xml",
2078
+ "quick-xml 0.41.0",
2079
2079
  "reqsign-aws-v4",
2080
2080
  "reqsign-core",
2081
2081
  "reqsign-file-read-tokio",
@@ -2247,9 +2247,9 @@ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
2247
2247
 
2248
2248
  [[package]]
2249
2249
  name = "pin-utils"
2250
- version = "0.1.0"
2250
+ version = "0.1.1"
2251
2251
  source = "registry+https://github.com/rust-lang/crates.io-index"
2252
- checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
2252
+ checksum = "13bee6c73da26345c729282832b60b0363cf3dd9f4bfd81d8551b7a1c889a113"
2253
2253
 
2254
2254
  [[package]]
2255
2255
  name = "pkg-config"
@@ -2324,6 +2324,16 @@ dependencies = [
2324
2324
  "serde",
2325
2325
  ]
2326
2326
 
2327
+ [[package]]
2328
+ name = "quick-xml"
2329
+ version = "0.42.0"
2330
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2331
+ checksum = "41b1177fdf999d2321d3fb46ff47159d9c1fb9ad66a4879f8c50a0b504615e9b"
2332
+ dependencies = [
2333
+ "memchr",
2334
+ "serde",
2335
+ ]
2336
+
2327
2337
  [[package]]
2328
2338
  name = "quote"
2329
2339
  version = "1.0.47"
@@ -2566,9 +2576,9 @@ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
2566
2576
 
2567
2577
  [[package]]
2568
2578
  name = "reqsign-aws-core"
2569
- version = "3.1.1"
2579
+ version = "3.2.0"
2570
2580
  source = "registry+https://github.com/rust-lang/crates.io-index"
2571
- checksum = "bac4749b7dfa7bfaccd01eb03e9dc795ed37e3f20d6f0f38e2c67ee85ad6bc86"
2581
+ checksum = "d38c902d8ec745bd9eadd1abbcbe227f4c1fc2926b2ec8929f89234af3114500"
2572
2582
  dependencies = [
2573
2583
  "bytes",
2574
2584
  "form_urlencoded",
@@ -2576,7 +2586,7 @@ dependencies = [
2576
2586
  "http",
2577
2587
  "log",
2578
2588
  "percent-encoding",
2579
- "quick-xml",
2589
+ "quick-xml 0.42.0",
2580
2590
  "reqsign-core",
2581
2591
  "rust-ini",
2582
2592
  "serde",
@@ -2587,14 +2597,14 @@ dependencies = [
2587
2597
 
2588
2598
  [[package]]
2589
2599
  name = "reqsign-aws-v4"
2590
- version = "3.3.0"
2600
+ version = "3.3.1"
2591
2601
  source = "registry+https://github.com/rust-lang/crates.io-index"
2592
- checksum = "ff250f0fd0b913fbd565e405acc553da0f13bde30bfb5403178c9d0313cdc15f"
2602
+ checksum = "906bfd028f96bfe73fdb892ce26f3b3f99b4f30feb9bd024be58bd6657f68b2b"
2593
2603
  dependencies = [
2594
2604
  "bytes",
2595
2605
  "http",
2596
2606
  "log",
2597
- "quick-xml",
2607
+ "quick-xml 0.42.0",
2598
2608
  "reqsign-aws-core",
2599
2609
  "reqsign-core",
2600
2610
  "serde",
@@ -2602,20 +2612,19 @@ dependencies = [
2602
2612
 
2603
2613
  [[package]]
2604
2614
  name = "reqsign-core"
2605
- version = "3.3.1"
2615
+ version = "3.3.2"
2606
2616
  source = "registry+https://github.com/rust-lang/crates.io-index"
2607
- checksum = "ff052daffb0599681c50f85c59e7236438976efe991ab864edd9f3b235501a0f"
2617
+ checksum = "85fed85c436b6b920e4b36310f699a77771a91e38ae483df48447bd7d162671c"
2608
2618
  dependencies = [
2609
2619
  "anyhow",
2620
+ "asyncband",
2610
2621
  "base64 0.23.1",
2611
2622
  "bytes",
2612
- "futures",
2613
2623
  "hex",
2614
2624
  "hmac",
2615
2625
  "http",
2616
2626
  "jiff",
2617
2627
  "log",
2618
- "mea",
2619
2628
  "percent-encoding",
2620
2629
  "sha1",
2621
2630
  "sha2",
@@ -2624,9 +2633,9 @@ dependencies = [
2624
2633
 
2625
2634
  [[package]]
2626
2635
  name = "reqsign-file-read-tokio"
2627
- version = "3.0.6"
2636
+ version = "3.0.7"
2628
2637
  source = "registry+https://github.com/rust-lang/crates.io-index"
2629
- checksum = "b3235df90a6bca681aa47dd86f2393d122a6d77042aa8a7c81e218cd45c5bfc0"
2638
+ checksum = "586a8e198057773f9616901fd723a4bc186812b9765bc0f20368661d6169d906"
2630
2639
  dependencies = [
2631
2640
  "anyhow",
2632
2641
  "reqsign-core",
@@ -2947,9 +2956,9 @@ dependencies = [
2947
2956
 
2948
2957
  [[package]]
2949
2958
  name = "serde_spanned"
2950
- version = "1.1.1"
2959
+ version = "1.1.2"
2951
2960
  source = "registry+https://github.com/rust-lang/crates.io-index"
2952
- checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26"
2961
+ checksum = "4e7523beb55eece201a2356bee0bbca0d1ab466c14c07703b2e0ee6d42cb0c2c"
2953
2962
  dependencies = [
2954
2963
  "serde_core",
2955
2964
  ]
@@ -3366,9 +3375,9 @@ dependencies = [
3366
3375
 
3367
3376
  [[package]]
3368
3377
  name = "tokio-util"
3369
- version = "0.7.19"
3378
+ version = "0.7.20"
3370
3379
  source = "registry+https://github.com/rust-lang/crates.io-index"
3371
- checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52"
3380
+ checksum = "e464cf451ba96ebfc6f9b6542f17ee8b8956e33f1e40d9690624e59d7a7f8a4b"
3372
3381
  dependencies = [
3373
3382
  "bytes",
3374
3383
  "futures-core",
@@ -3381,9 +3390,9 @@ dependencies = [
3381
3390
 
3382
3391
  [[package]]
3383
3392
  name = "toml"
3384
- version = "1.1.6+spec-1.1.0"
3393
+ version = "1.1.8+spec-1.1.0"
3385
3394
  source = "registry+https://github.com/rust-lang/crates.io-index"
3386
- checksum = "920602543f0911ab71da12c50d59701da54c196d1a2bf5cb4b75667f137a406a"
3395
+ checksum = "20489e00e4d8741d6be680764cc12e270655e375a20d1011e844a9c3379e678d"
3387
3396
  dependencies = [
3388
3397
  "indexmap",
3389
3398
  "serde_core",
@@ -3396,18 +3405,18 @@ dependencies = [
3396
3405
 
3397
3406
  [[package]]
3398
3407
  name = "toml_datetime"
3399
- version = "1.1.1+spec-1.1.0"
3408
+ version = "1.1.2+spec-1.1.0"
3400
3409
  source = "registry+https://github.com/rust-lang/crates.io-index"
3401
- checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7"
3410
+ checksum = "2b86d767906c6c42421dcba507eb9d203e779497710a47782a224bb871653053"
3402
3411
  dependencies = [
3403
3412
  "serde_core",
3404
3413
  ]
3405
3414
 
3406
3415
  [[package]]
3407
3416
  name = "toml_edit"
3408
- version = "0.25.15+spec-1.1.0"
3417
+ version = "0.25.17+spec-1.1.0"
3409
3418
  source = "registry+https://github.com/rust-lang/crates.io-index"
3410
- checksum = "1340ea94a5856333492c9064b02c778b191dd2c853778d9609debdcdfea3a614"
3419
+ checksum = "e3641d5bbb5349a79e1020a242d251efbc546ad8048d133958323ce9c40a9c9c"
3411
3420
  dependencies = [
3412
3421
  "indexmap",
3413
3422
  "toml_datetime",
@@ -3417,18 +3426,18 @@ dependencies = [
3417
3426
 
3418
3427
  [[package]]
3419
3428
  name = "toml_parser"
3420
- version = "1.1.3+spec-1.1.0"
3429
+ version = "1.1.5+spec-1.1.0"
3421
3430
  source = "registry+https://github.com/rust-lang/crates.io-index"
3422
- checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56"
3431
+ checksum = "baa693a8032d7e1cada7d0041e96126df243179ff061456783ac7f12bda4744c"
3423
3432
  dependencies = [
3424
3433
  "winnow",
3425
3434
  ]
3426
3435
 
3427
3436
  [[package]]
3428
3437
  name = "toml_writer"
3429
- version = "1.1.2+spec-1.1.0"
3438
+ version = "1.1.3+spec-1.1.0"
3430
3439
  source = "registry+https://github.com/rust-lang/crates.io-index"
3431
- checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2"
3440
+ checksum = "06bdbd8cfc056b8d2e2e85f29b56a3bdbecb527cef81eb39e3e7b98af4652770"
3432
3441
 
3433
3442
  [[package]]
3434
3443
  name = "tower"
@@ -3598,9 +3607,9 @@ checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
3598
3607
 
3599
3608
  [[package]]
3600
3609
  name = "unicase"
3601
- version = "2.9.0"
3610
+ version = "2.10.0"
3602
3611
  source = "registry+https://github.com/rust-lang/crates.io-index"
3603
- checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142"
3612
+ checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f"
3604
3613
 
3605
3614
  [[package]]
3606
3615
  name = "unicode-ident"
@@ -3726,9 +3735,9 @@ dependencies = [
3726
3735
 
3727
3736
  [[package]]
3728
3737
  name = "want"
3729
- version = "0.3.1"
3738
+ version = "0.3.2"
3730
3739
  source = "registry+https://github.com/rust-lang/crates.io-index"
3731
- checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
3740
+ checksum = "ec4cdd0dd910afe868b7ef477227d8d538b46b3075031afee8a9f2acb0a2ed0b"
3732
3741
  dependencies = [
3733
3742
  "try-lock",
3734
3743
  ]
@@ -4153,9 +4162,9 @@ dependencies = [
4153
4162
 
4154
4163
  [[package]]
4155
4164
  name = "xxhash-rust"
4156
- version = "0.8.18"
4165
+ version = "0.8.19"
4157
4166
  source = "registry+https://github.com/rust-lang/crates.io-index"
4158
- checksum = "aee1b19627c7c60102ab80d3a9cbe18de90bfe03bfa6c3715447681f0e8c8af6"
4167
+ checksum = "550a2b930b62486a393c52d5c3b84bff264b28aa437ed64694d31e93b1757af7"
4159
4168
 
4160
4169
  [[package]]
4161
4170
  name = "yoke"
@@ -4182,18 +4191,18 @@ dependencies = [
4182
4191
 
4183
4192
  [[package]]
4184
4193
  name = "zerocopy"
4185
- version = "0.8.59"
4194
+ version = "0.8.62"
4186
4195
  source = "registry+https://github.com/rust-lang/crates.io-index"
4187
- checksum = "6df92bf3d9227be3d53173901ddbffac2babc27ae50f397776ffd6dc33f800cb"
4196
+ checksum = "86502bf56ac7c77571a32e2647bb2a15894565e981fb2a48d7bde2d91c965a9d"
4188
4197
  dependencies = [
4189
4198
  "zerocopy-derive",
4190
4199
  ]
4191
4200
 
4192
4201
  [[package]]
4193
4202
  name = "zerocopy-derive"
4194
- version = "0.8.59"
4203
+ version = "0.8.62"
4195
4204
  source = "registry+https://github.com/rust-lang/crates.io-index"
4196
- checksum = "ac4f328cf2f05d084e496c3e9c3f33ed0a183656a16e1fcec4d464d8373aec82"
4205
+ checksum = "5457206954b06561e2608c7e19cf58b1926586d999c246eebe4502f7e2039d1a"
4197
4206
  dependencies = [
4198
4207
  "proc-macro2",
4199
4208
  "quote",
@@ -4223,9 +4232,9 @@ dependencies = [
4223
4232
 
4224
4233
  [[package]]
4225
4234
  name = "zeroize"
4226
- version = "1.9.0"
4235
+ version = "1.9.1"
4227
4236
  source = "registry+https://github.com/rust-lang/crates.io-index"
4228
- checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e"
4237
+ checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879"
4229
4238
  dependencies = [
4230
4239
  "zeroize_derive",
4231
4240
  ]
@@ -1,11 +1,11 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:c521ecc32356e04cfe9a166fa28268f2f087a83ad433544f00ab20701f293372
2
+ # alef:hash:a34ac608a1ef337e4b3d1b85d27bb764e8a045330c163b8b361d396b7d8e923b
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify
5
5
 
6
6
  [package]
7
7
  name = "liter-llm-rb"
8
- version = "2.2.0"
8
+ version = "2.2.3"
9
9
  edition = "2024"
10
10
  license = "MIT"
11
11
  description = "Universal LLM API client with Rust-powered polyglot bindings."
@@ -31,7 +31,7 @@ wasm-http = ["liter-llm/wasm-http"]
31
31
 
32
32
  [dependencies]
33
33
  futures = "0.3"
34
- liter-llm = { version = "2.2.0", features = ["native-http", "full"] }
34
+ liter-llm = { version = "2.2.3", features = ["native-http", "full"] }
35
35
  magnus = "0.9"
36
36
  rb-sys = ">=0.9.130, <0.10"
37
37
  serde = { version = "1", features = ["derive"] }
@@ -1,5 +1,5 @@
1
1
  // This file is auto-generated by alef. DO NOT EDIT.
2
- // alef:hash:a471cf0303320780d0a56e0d907d0c97856c0d95870f41e3b9e70df6bb9db85c
2
+ // alef:hash:3861ed195f3c3e52018feb23f8f7da4fefbc958be2e63235f137618ed6fec98a
3
3
  // Re-generate with: alef generate
4
4
  #![allow(dead_code, unused_imports, unused_variables)]
5
5
  #![allow(
@@ -1404,6 +1404,141 @@ impl CacheConfig {
1404
1404
  }
1405
1405
  }
1406
1406
 
1407
+ #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1408
+ #[serde(default)]
1409
+ #[magnus::wrap(class = "LiterLlm::CatalogInfo")]
1410
+ pub struct CatalogInfo {
1411
+ source: String,
1412
+ source_sha256: String,
1413
+ fetched: String,
1414
+ library_version: String,
1415
+ schema_version: u64,
1416
+ origin: String,
1417
+ }
1418
+
1419
+ unsafe impl IntoValueFromNative for CatalogInfo {}
1420
+
1421
+ impl magnus::TryConvert for CatalogInfo {
1422
+ fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
1423
+ if let Ok(r) = <&CatalogInfo as magnus::TryConvert>::try_convert(val) {
1424
+ return Ok(r.clone());
1425
+ }
1426
+ let json_str: String = if let Ok(s) = <String as magnus::TryConvert>::try_convert(val) {
1427
+ s
1428
+ } else {
1429
+ val.funcall::<_, _, String>("to_json", ()).map_err(|e| {
1430
+ magnus::Error::new(
1431
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
1432
+ format!("no implicit conversion into CatalogInfo: {}", e),
1433
+ )
1434
+ })?
1435
+ };
1436
+ serde_json::from_str::<CatalogInfo>(&json_str).map_err(|e| {
1437
+ magnus::Error::new(
1438
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
1439
+ format!("failed to deserialize CatalogInfo: {}", e),
1440
+ )
1441
+ })
1442
+ }
1443
+ }
1444
+
1445
+ unsafe impl TryConvertOwned for CatalogInfo {}
1446
+
1447
+ impl Default for CatalogInfo {
1448
+ fn default() -> Self {
1449
+ liter_llm::CatalogInfo::default().into()
1450
+ }
1451
+ }
1452
+
1453
+ impl CatalogInfo {
1454
+ fn new(args: &[magnus::Value]) -> Result<Self, magnus::Error> {
1455
+ let ruby = unsafe { magnus::Ruby::get_unchecked() };
1456
+ let args = magnus::scan_args::scan_args::<(), (Option<magnus::RHash>,), (), (), (), ()>(args)?;
1457
+ let (kwargs_opt,) = args.optional;
1458
+ let kwargs = kwargs_opt.unwrap_or_else(|| ruby.hash_new());
1459
+ Ok(Self {
1460
+ source: match kwargs.get(ruby.to_symbol("source")) {
1461
+ Some(v) => String::try_convert(v).map_err(|e| {
1462
+ magnus::Error::new(
1463
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
1464
+ format!("invalid value for `source`: {}", e),
1465
+ )
1466
+ })?,
1467
+ None => Default::default(),
1468
+ },
1469
+ source_sha256: match kwargs.get(ruby.to_symbol("source_sha256")) {
1470
+ Some(v) => String::try_convert(v).map_err(|e| {
1471
+ magnus::Error::new(
1472
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
1473
+ format!("invalid value for `source_sha256`: {}", e),
1474
+ )
1475
+ })?,
1476
+ None => Default::default(),
1477
+ },
1478
+ fetched: match kwargs.get(ruby.to_symbol("fetched")) {
1479
+ Some(v) => String::try_convert(v).map_err(|e| {
1480
+ magnus::Error::new(
1481
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
1482
+ format!("invalid value for `fetched`: {}", e),
1483
+ )
1484
+ })?,
1485
+ None => Default::default(),
1486
+ },
1487
+ library_version: match kwargs.get(ruby.to_symbol("library_version")) {
1488
+ Some(v) => String::try_convert(v).map_err(|e| {
1489
+ magnus::Error::new(
1490
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
1491
+ format!("invalid value for `library_version`: {}", e),
1492
+ )
1493
+ })?,
1494
+ None => Default::default(),
1495
+ },
1496
+ schema_version: match kwargs.get(ruby.to_symbol("schema_version")) {
1497
+ Some(v) => u64::try_convert(v).map_err(|e| {
1498
+ magnus::Error::new(
1499
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
1500
+ format!("invalid value for `schema_version`: {}", e),
1501
+ )
1502
+ })?,
1503
+ None => Default::default(),
1504
+ },
1505
+ origin: match kwargs.get(ruby.to_symbol("origin")) {
1506
+ Some(v) => String::try_convert(v).map_err(|e| {
1507
+ magnus::Error::new(
1508
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
1509
+ format!("invalid value for `origin`: {}", e),
1510
+ )
1511
+ })?,
1512
+ None => Default::default(),
1513
+ },
1514
+ })
1515
+ }
1516
+
1517
+ fn source(&self) -> String {
1518
+ self.source.clone()
1519
+ }
1520
+
1521
+ fn source_sha256(&self) -> String {
1522
+ self.source_sha256.clone()
1523
+ }
1524
+
1525
+ fn fetched(&self) -> String {
1526
+ self.fetched.clone()
1527
+ }
1528
+
1529
+ fn library_version(&self) -> String {
1530
+ self.library_version.clone()
1531
+ }
1532
+
1533
+ fn schema_version(&self) -> u64 {
1534
+ self.schema_version
1535
+ }
1536
+
1537
+ fn origin(&self) -> String {
1538
+ self.origin.clone()
1539
+ }
1540
+ }
1541
+
1407
1542
  #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1408
1543
  #[serde(default)]
1409
1544
  #[magnus::wrap(class = "LiterLlm::CatalogRefreshConfig")]
@@ -2538,6 +2673,147 @@ impl Choice {
2538
2673
  }
2539
2674
  }
2540
2675
 
2676
+ #[cfg(any(feature = "native-http", feature = "wasm-http"))]
2677
+ #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2678
+ #[serde(default)]
2679
+ #[magnus::wrap(class = "LiterLlm::ClientOptions")]
2680
+ pub struct ClientOptions {
2681
+ api_key: String,
2682
+ base_url: Option<String>,
2683
+ timeout_secs: Option<u64>,
2684
+ max_retries: Option<u32>,
2685
+ max_response_bytes: Option<u64>,
2686
+ model_hint: Option<String>,
2687
+ }
2688
+
2689
+ #[cfg(any(feature = "native-http", feature = "wasm-http"))]
2690
+ unsafe impl IntoValueFromNative for ClientOptions {}
2691
+
2692
+ #[cfg(any(feature = "native-http", feature = "wasm-http"))]
2693
+ impl magnus::TryConvert for ClientOptions {
2694
+ fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
2695
+ if let Ok(r) = <&ClientOptions as magnus::TryConvert>::try_convert(val) {
2696
+ return Ok(r.clone());
2697
+ }
2698
+ let json_str: String = if let Ok(s) = <String as magnus::TryConvert>::try_convert(val) {
2699
+ s
2700
+ } else {
2701
+ val.funcall::<_, _, String>("to_json", ()).map_err(|e| {
2702
+ magnus::Error::new(
2703
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
2704
+ format!("no implicit conversion into ClientOptions: {}", e),
2705
+ )
2706
+ })?
2707
+ };
2708
+ serde_json::from_str::<ClientOptions>(&json_str).map_err(|e| {
2709
+ magnus::Error::new(
2710
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
2711
+ format!("failed to deserialize ClientOptions: {}", e),
2712
+ )
2713
+ })
2714
+ }
2715
+ }
2716
+
2717
+ #[cfg(any(feature = "native-http", feature = "wasm-http"))]
2718
+ unsafe impl TryConvertOwned for ClientOptions {}
2719
+
2720
+ #[cfg(any(feature = "native-http", feature = "wasm-http"))]
2721
+ impl Default for ClientOptions {
2722
+ fn default() -> Self {
2723
+ liter_llm::ClientOptions::default().into()
2724
+ }
2725
+ }
2726
+
2727
+ #[cfg(any(feature = "native-http", feature = "wasm-http"))]
2728
+ impl ClientOptions {
2729
+ fn new(args: &[magnus::Value]) -> Result<Self, magnus::Error> {
2730
+ let ruby = unsafe { magnus::Ruby::get_unchecked() };
2731
+ let args = magnus::scan_args::scan_args::<(), (Option<magnus::RHash>,), (), (), (), ()>(args)?;
2732
+ let (kwargs_opt,) = args.optional;
2733
+ let kwargs = kwargs_opt.unwrap_or_else(|| ruby.hash_new());
2734
+ Ok(Self {
2735
+ api_key: match kwargs.get(ruby.to_symbol("api_key")) {
2736
+ Some(v) => String::try_convert(v).map_err(|e| {
2737
+ magnus::Error::new(
2738
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
2739
+ format!("invalid value for `api_key`: {}", e),
2740
+ )
2741
+ })?,
2742
+ None => Default::default(),
2743
+ },
2744
+ base_url: match kwargs.get(ruby.to_symbol("base_url")).filter(|v| !v.is_nil()) {
2745
+ Some(v) => Some(String::try_convert(v).map_err(|e| {
2746
+ magnus::Error::new(
2747
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
2748
+ format!("invalid value for `base_url`: {}", e),
2749
+ )
2750
+ })?),
2751
+ None => None,
2752
+ },
2753
+ timeout_secs: match kwargs.get(ruby.to_symbol("timeout_secs")).filter(|v| !v.is_nil()) {
2754
+ Some(v) => Some(u64::try_convert(v).map_err(|e| {
2755
+ magnus::Error::new(
2756
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
2757
+ format!("invalid value for `timeout_secs`: {}", e),
2758
+ )
2759
+ })?),
2760
+ None => None,
2761
+ },
2762
+ max_retries: match kwargs.get(ruby.to_symbol("max_retries")).filter(|v| !v.is_nil()) {
2763
+ Some(v) => Some(u32::try_convert(v).map_err(|e| {
2764
+ magnus::Error::new(
2765
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
2766
+ format!("invalid value for `max_retries`: {}", e),
2767
+ )
2768
+ })?),
2769
+ None => None,
2770
+ },
2771
+ max_response_bytes: match kwargs.get(ruby.to_symbol("max_response_bytes")).filter(|v| !v.is_nil()) {
2772
+ Some(v) => Some(u64::try_convert(v).map_err(|e| {
2773
+ magnus::Error::new(
2774
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
2775
+ format!("invalid value for `max_response_bytes`: {}", e),
2776
+ )
2777
+ })?),
2778
+ None => None,
2779
+ },
2780
+ model_hint: match kwargs.get(ruby.to_symbol("model_hint")).filter(|v| !v.is_nil()) {
2781
+ Some(v) => Some(String::try_convert(v).map_err(|e| {
2782
+ magnus::Error::new(
2783
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
2784
+ format!("invalid value for `model_hint`: {}", e),
2785
+ )
2786
+ })?),
2787
+ None => None,
2788
+ },
2789
+ })
2790
+ }
2791
+
2792
+ fn api_key(&self) -> String {
2793
+ self.api_key.clone()
2794
+ }
2795
+
2796
+ fn base_url(&self) -> Option<String> {
2797
+ self.base_url.clone()
2798
+ }
2799
+
2800
+ fn timeout_secs(&self) -> Option<u64> {
2801
+ self.timeout_secs
2802
+ }
2803
+
2804
+ fn max_retries(&self) -> Option<u32> {
2805
+ self.max_retries
2806
+ }
2807
+
2808
+ fn max_response_bytes(&self) -> Option<u64> {
2809
+ self.max_response_bytes
2810
+ }
2811
+
2812
+ fn model_hint(&self) -> Option<String> {
2813
+ self.model_hint.clone()
2814
+ }
2815
+ }
2816
+
2541
2817
  #[derive(Clone, Debug, serde::Serialize)]
2542
2818
  #[serde(default)]
2543
2819
  #[magnus::wrap(class = "LiterLlm::CompletionTokensDetails")]
@@ -6986,6 +7262,9 @@ impl LlmRateLimitConfig {
6986
7262
  #[serde(default)]
6987
7263
  #[magnus::wrap(class = "LiterLlm::ModelInfo")]
6988
7264
  pub struct ModelInfo {
7265
+ matched_key: String,
7266
+ exact: bool,
7267
+ price_known: bool,
6989
7268
  input_cost_per_token: f64,
6990
7269
  output_cost_per_token: f64,
6991
7270
  cache_read_input_token_cost: Option<f64>,
@@ -7048,6 +7327,33 @@ impl ModelInfo {
7048
7327
  let (kwargs_opt,) = args.optional;
7049
7328
  let kwargs = kwargs_opt.unwrap_or_else(|| ruby.hash_new());
7050
7329
  Ok(Self {
7330
+ matched_key: match kwargs.get(ruby.to_symbol("matched_key")) {
7331
+ Some(v) => String::try_convert(v).map_err(|e| {
7332
+ magnus::Error::new(
7333
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
7334
+ format!("invalid value for `matched_key`: {}", e),
7335
+ )
7336
+ })?,
7337
+ None => Default::default(),
7338
+ },
7339
+ exact: match kwargs.get(ruby.to_symbol("exact")) {
7340
+ Some(v) => bool::try_convert(v).map_err(|e| {
7341
+ magnus::Error::new(
7342
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
7343
+ format!("invalid value for `exact`: {}", e),
7344
+ )
7345
+ })?,
7346
+ None => Default::default(),
7347
+ },
7348
+ price_known: match kwargs.get(ruby.to_symbol("price_known")) {
7349
+ Some(v) => bool::try_convert(v).map_err(|e| {
7350
+ magnus::Error::new(
7351
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
7352
+ format!("invalid value for `price_known`: {}", e),
7353
+ )
7354
+ })?,
7355
+ None => Default::default(),
7356
+ },
7051
7357
  input_cost_per_token: match kwargs.get(ruby.to_symbol("input_cost_per_token")) {
7052
7358
  Some(v) => f64::try_convert(v).map_err(|e| {
7053
7359
  magnus::Error::new(
@@ -7252,6 +7558,18 @@ impl ModelInfo {
7252
7558
  })
7253
7559
  }
7254
7560
 
7561
+ fn matched_key(&self) -> String {
7562
+ self.matched_key.clone()
7563
+ }
7564
+
7565
+ fn exact(&self) -> bool {
7566
+ self.exact
7567
+ }
7568
+
7569
+ fn price_known(&self) -> bool {
7570
+ self.price_known
7571
+ }
7572
+
7255
7573
  fn input_cost_per_token(&self) -> f64 {
7256
7574
  self.input_cost_per_token
7257
7575
  }
@@ -8935,6 +9253,7 @@ impl PageDimensions {
8935
9253
  #[magnus::wrap(class = "LiterLlm::PromptTokensDetails")]
8936
9254
  pub struct PromptTokensDetails {
8937
9255
  cached_tokens: u64,
9256
+ cache_creation_tokens: u64,
8938
9257
  audio_tokens: u64,
8939
9258
  }
8940
9259
 
@@ -8996,6 +9315,15 @@ impl PromptTokensDetails {
8996
9315
  })?,
8997
9316
  None => Default::default(),
8998
9317
  },
9318
+ cache_creation_tokens: match kwargs.get(ruby.to_symbol("cache_creation_tokens")) {
9319
+ Some(v) => u64::try_convert(v).map_err(|e| {
9320
+ magnus::Error::new(
9321
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
9322
+ format!("invalid value for `cache_creation_tokens`: {}", e),
9323
+ )
9324
+ })?,
9325
+ None => Default::default(),
9326
+ },
8999
9327
  audio_tokens: match kwargs.get(ruby.to_symbol("audio_tokens")) {
9000
9328
  Some(v) => u64::try_convert(v).map_err(|e| {
9001
9329
  magnus::Error::new(
@@ -9012,6 +9340,10 @@ impl PromptTokensDetails {
9012
9340
  self.cached_tokens
9013
9341
  }
9014
9342
 
9343
+ fn cache_creation_tokens(&self) -> u64 {
9344
+ self.cache_creation_tokens
9345
+ }
9346
+
9015
9347
  fn audio_tokens(&self) -> u64 {
9016
9348
  self.audio_tokens
9017
9349
  }
@@ -13863,6 +14195,10 @@ fn capabilities(provider_name: String) -> ProviderCapabilities {
13863
14195
  liter_llm::provider::capabilities(&provider_name).into()
13864
14196
  }
13865
14197
 
14198
+ fn catalog_info() -> Option<CatalogInfo> {
14199
+ liter_llm::catalog_info().map(Into::into)
14200
+ }
14201
+
13866
14202
  fn check_bound(context: String, current_len: usize, incoming: usize, limit: usize) -> Result<(), Error> {
13867
14203
  let result = liter_llm::util::bounds::check_bound(&context, current_len, incoming, limit).map_err(|e| {
13868
14204
  magnus::Error::new(
@@ -13894,6 +14230,22 @@ fn completion_cost_with_cache(
13894
14230
  liter_llm::completion_cost_with_cache(&model, prompt_tokens, cached_tokens, completion_tokens)
13895
14231
  }
13896
14232
 
14233
+ fn completion_cost_with_cache_details(
14234
+ model: String,
14235
+ prompt_tokens: u64,
14236
+ cached_tokens: u64,
14237
+ cache_creation_tokens: u64,
14238
+ completion_tokens: u64,
14239
+ ) -> Option<f64> {
14240
+ liter_llm::completion_cost_with_cache_details(
14241
+ &model,
14242
+ prompt_tokens,
14243
+ cached_tokens,
14244
+ cache_creation_tokens,
14245
+ completion_tokens,
14246
+ )
14247
+ }
14248
+
13897
14249
  fn complex_provider_names() -> Result<Vec<String>, Error> {
13898
14250
  let result = liter_llm::provider::complex_provider_names().map_err(|e| {
13899
14251
  magnus::Error::new(
@@ -13997,6 +14349,31 @@ fn create_client_from_json(json: String) -> Result<DefaultClient, Error> {
13997
14349
  })
13998
14350
  }
13999
14351
 
14352
+ #[cfg(feature = "native-http")]
14353
+ fn create_client_with_options(args: &[magnus::Value]) -> Result<DefaultClient, Error> {
14354
+ let args = magnus::scan_args::scan_args::<(), (Option<magnus::Value>,), (), (), (), ()>(args)?;
14355
+ let (options,) = args.optional;
14356
+
14357
+ let options: liter_llm::ClientOptions = match options {
14358
+ Some(_v) if !_v.is_nil() => {
14359
+ let binding_val: ClientOptions = ClientOptions::try_convert(_v).map_err(|e| {
14360
+ magnus::Error::new(unsafe { Ruby::get_unchecked() }.exception_type_error(), e.to_string())
14361
+ })?;
14362
+ binding_val.into()
14363
+ }
14364
+ _ => Default::default(),
14365
+ };
14366
+ let result = liter_llm::create_client_with_options(options.into()).map_err(|e| {
14367
+ magnus::Error::new(
14368
+ unsafe { Ruby::get_unchecked() }.exception_runtime_error(),
14369
+ e.to_string(),
14370
+ )
14371
+ })?;
14372
+ Ok(DefaultClient {
14373
+ inner: Arc::new(result),
14374
+ })
14375
+ }
14376
+
14000
14377
  fn decode_data_url(url: String) -> Option<DecodedDataUrl> {
14001
14378
  liter_llm::image::decode_data_url(&url).map(Into::into)
14002
14379
  }
@@ -14026,6 +14403,10 @@ fn ensure_crypto_provider() -> () {
14026
14403
  liter_llm::ensure_crypto_provider()
14027
14404
  }
14028
14405
 
14406
+ fn exact_model_info(model: String) -> Option<ModelInfo> {
14407
+ liter_llm::exact_model_info(&model).map(Into::into)
14408
+ }
14409
+
14029
14410
  fn install_catalog_overlay_from_str(catalog_json: String) -> Result<(), Error> {
14030
14411
  let result = liter_llm::install_catalog_overlay_from_str(&catalog_json).map_err(|e| {
14031
14412
  magnus::Error::new(
@@ -14398,6 +14779,34 @@ impl From<liter_llm::CacheConfig> for CacheConfig {
14398
14779
  }
14399
14780
  }
14400
14781
 
14782
+ #[allow(clippy::needless_update)]
14783
+ impl From<CatalogInfo> for liter_llm::CatalogInfo {
14784
+ fn from(val: CatalogInfo) -> Self {
14785
+ Self {
14786
+ source: val.source,
14787
+ source_sha256: val.source_sha256,
14788
+ fetched: val.fetched,
14789
+ library_version: val.library_version,
14790
+ schema_version: val.schema_version,
14791
+ origin: val.origin,
14792
+ ..Default::default()
14793
+ }
14794
+ }
14795
+ }
14796
+
14797
+ impl From<liter_llm::CatalogInfo> for CatalogInfo {
14798
+ fn from(val: liter_llm::CatalogInfo) -> Self {
14799
+ Self {
14800
+ source: val.source.to_string(),
14801
+ source_sha256: val.source_sha256.to_string(),
14802
+ fetched: val.fetched.to_string(),
14803
+ library_version: val.library_version.to_string(),
14804
+ schema_version: val.schema_version,
14805
+ origin: val.origin.to_string(),
14806
+ }
14807
+ }
14808
+ }
14809
+
14401
14810
  #[allow(clippy::needless_update)]
14402
14811
  impl From<CatalogRefreshConfig> for liter_llm::CatalogRefreshConfig {
14403
14812
  fn from(val: CatalogRefreshConfig) -> Self {
@@ -14622,6 +15031,37 @@ impl From<liter_llm::types::Choice> for Choice {
14622
15031
  }
14623
15032
  }
14624
15033
 
15034
+ #[cfg(any(feature = "native-http", feature = "wasm-http"))]
15035
+ #[allow(clippy::needless_update)]
15036
+ impl From<ClientOptions> for liter_llm::ClientOptions {
15037
+ fn from(val: ClientOptions) -> Self {
15038
+ Self {
15039
+ api_key: val.api_key,
15040
+ base_url: val.base_url,
15041
+ timeout_secs: val.timeout_secs,
15042
+ max_retries: val.max_retries,
15043
+ max_response_bytes: val.max_response_bytes,
15044
+ model_hint: val.model_hint,
15045
+ ..Default::default()
15046
+ }
15047
+ }
15048
+ }
15049
+
15050
+ #[cfg(any(feature = "native-http", feature = "wasm-http"))]
15051
+ #[allow(clippy::redundant_closure)]
15052
+ impl From<liter_llm::ClientOptions> for ClientOptions {
15053
+ fn from(val: liter_llm::ClientOptions) -> Self {
15054
+ Self {
15055
+ api_key: val.api_key.to_string(),
15056
+ base_url: val.base_url.map(|v| v.to_string()),
15057
+ timeout_secs: val.timeout_secs,
15058
+ max_retries: val.max_retries,
15059
+ max_response_bytes: val.max_response_bytes,
15060
+ model_hint: val.model_hint.map(|v| v.to_string()),
15061
+ }
15062
+ }
15063
+ }
15064
+
14625
15065
  #[allow(clippy::needless_update)]
14626
15066
  impl From<CompletionTokensDetails> for liter_llm::types::CompletionTokensDetails {
14627
15067
  fn from(val: CompletionTokensDetails) -> Self {
@@ -15400,6 +15840,9 @@ impl From<liter_llm::client::LlmRateLimitConfig> for LlmRateLimitConfig {
15400
15840
  impl From<ModelInfo> for liter_llm::ModelInfo {
15401
15841
  fn from(val: ModelInfo) -> Self {
15402
15842
  Self {
15843
+ matched_key: val.matched_key,
15844
+ exact: val.exact,
15845
+ price_known: val.price_known,
15403
15846
  input_cost_per_token: val.input_cost_per_token,
15404
15847
  output_cost_per_token: val.output_cost_per_token,
15405
15848
  cache_read_input_token_cost: val.cache_read_input_token_cost,
@@ -15428,6 +15871,9 @@ impl From<ModelInfo> for liter_llm::ModelInfo {
15428
15871
  impl From<liter_llm::ModelInfo> for ModelInfo {
15429
15872
  fn from(val: liter_llm::ModelInfo) -> Self {
15430
15873
  Self {
15874
+ matched_key: val.matched_key.to_string(),
15875
+ exact: val.exact,
15876
+ price_known: val.price_known,
15431
15877
  input_cost_per_token: val.input_cost_per_token,
15432
15878
  output_cost_per_token: val.output_cost_per_token,
15433
15879
  cache_read_input_token_cost: val.cache_read_input_token_cost,
@@ -15785,6 +16231,7 @@ impl From<PromptTokensDetails> for liter_llm::types::PromptTokensDetails {
15785
16231
  fn from(val: PromptTokensDetails) -> Self {
15786
16232
  Self {
15787
16233
  cached_tokens: val.cached_tokens,
16234
+ cache_creation_tokens: val.cache_creation_tokens,
15788
16235
  audio_tokens: val.audio_tokens,
15789
16236
  ..Default::default()
15790
16237
  }
@@ -15795,6 +16242,7 @@ impl From<liter_llm::types::PromptTokensDetails> for PromptTokensDetails {
15795
16242
  fn from(val: liter_llm::types::PromptTokensDetails) -> Self {
15796
16243
  Self {
15797
16244
  cached_tokens: val.cached_tokens,
16245
+ cache_creation_tokens: val.cache_creation_tokens,
15798
16246
  audio_tokens: val.audio_tokens,
15799
16247
  }
15800
16248
  }
@@ -17423,6 +17871,22 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
17423
17871
  #[cfg(feature = "tower")]
17424
17872
  class.define_method("backend", method!(CacheConfig::backend, 0))?;
17425
17873
 
17874
+ let class = module.define_class("CatalogInfo", ruby.class_object())?;
17875
+
17876
+ class.define_singleton_method("new", function!(CatalogInfo::new, -1))?;
17877
+
17878
+ class.define_method("source", method!(CatalogInfo::source, 0))?;
17879
+
17880
+ class.define_method("source_sha256", method!(CatalogInfo::source_sha256, 0))?;
17881
+
17882
+ class.define_method("fetched", method!(CatalogInfo::fetched, 0))?;
17883
+
17884
+ class.define_method("library_version", method!(CatalogInfo::library_version, 0))?;
17885
+
17886
+ class.define_method("schema_version", method!(CatalogInfo::schema_version, 0))?;
17887
+
17888
+ class.define_method("origin", method!(CatalogInfo::origin, 0))?;
17889
+
17426
17890
  let class = module.define_class("CatalogRefreshConfig", ruby.class_object())?;
17427
17891
 
17428
17892
  class.define_singleton_method("new", function!(CatalogRefreshConfig::new, -1))?;
@@ -17577,6 +18041,29 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
17577
18041
 
17578
18042
  class.define_method("logprobs", method!(Choice::logprobs, 0))?;
17579
18043
 
18044
+ let class = module.define_class("ClientOptions", ruby.class_object())?;
18045
+
18046
+ #[cfg(any(feature = "native-http", feature = "wasm-http"))]
18047
+ class.define_singleton_method("new", function!(ClientOptions::new, -1))?;
18048
+
18049
+ #[cfg(any(feature = "native-http", feature = "wasm-http"))]
18050
+ class.define_method("api_key", method!(ClientOptions::api_key, 0))?;
18051
+
18052
+ #[cfg(any(feature = "native-http", feature = "wasm-http"))]
18053
+ class.define_method("base_url", method!(ClientOptions::base_url, 0))?;
18054
+
18055
+ #[cfg(any(feature = "native-http", feature = "wasm-http"))]
18056
+ class.define_method("timeout_secs", method!(ClientOptions::timeout_secs, 0))?;
18057
+
18058
+ #[cfg(any(feature = "native-http", feature = "wasm-http"))]
18059
+ class.define_method("max_retries", method!(ClientOptions::max_retries, 0))?;
18060
+
18061
+ #[cfg(any(feature = "native-http", feature = "wasm-http"))]
18062
+ class.define_method("max_response_bytes", method!(ClientOptions::max_response_bytes, 0))?;
18063
+
18064
+ #[cfg(any(feature = "native-http", feature = "wasm-http"))]
18065
+ class.define_method("model_hint", method!(ClientOptions::model_hint, 0))?;
18066
+
17580
18067
  let class = module.define_class("CompletionTokensDetails", ruby.class_object())?;
17581
18068
 
17582
18069
  class.define_singleton_method("new", function!(CompletionTokensDetails::new, -1))?;
@@ -18082,6 +18569,12 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
18082
18569
 
18083
18570
  class.define_singleton_method("new", function!(ModelInfo::new, -1))?;
18084
18571
 
18572
+ class.define_method("matched_key", method!(ModelInfo::matched_key, 0))?;
18573
+
18574
+ class.define_method("exact", method!(ModelInfo::exact, 0))?;
18575
+
18576
+ class.define_method("price_known", method!(ModelInfo::price_known, 0))?;
18577
+
18085
18578
  class.define_method("input_cost_per_token", method!(ModelInfo::input_cost_per_token, 0))?;
18086
18579
 
18087
18580
  class.define_method("output_cost_per_token", method!(ModelInfo::output_cost_per_token, 0))?;
@@ -18356,6 +18849,11 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
18356
18849
 
18357
18850
  class.define_method("cached_tokens", method!(PromptTokensDetails::cached_tokens, 0))?;
18358
18851
 
18852
+ class.define_method(
18853
+ "cache_creation_tokens",
18854
+ method!(PromptTokensDetails::cache_creation_tokens, 0),
18855
+ )?;
18856
+
18359
18857
  class.define_method("audio_tokens", method!(PromptTokensDetails::audio_tokens, 0))?;
18360
18858
 
18361
18859
  let class = module.define_class("ProviderCapabilities", ruby.class_object())?;
@@ -18714,6 +19212,8 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
18714
19212
 
18715
19213
  module.define_module_function("capabilities", function!(capabilities, 1))?;
18716
19214
 
19215
+ module.define_module_function("catalog_info", function!(catalog_info, 0))?;
19216
+
18717
19217
  module.define_module_function("check_bound", function!(check_bound, 4))?;
18718
19218
 
18719
19219
  module.define_module_function("clear", function!(clear, 0))?;
@@ -18724,6 +19224,11 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
18724
19224
 
18725
19225
  module.define_module_function("completion_cost_with_cache", function!(completion_cost_with_cache, 4))?;
18726
19226
 
19227
+ module.define_module_function(
19228
+ "completion_cost_with_cache_details",
19229
+ function!(completion_cost_with_cache_details, 5),
19230
+ )?;
19231
+
18727
19232
  module.define_module_function("complex_provider_names", function!(complex_provider_names, 0))?;
18728
19233
 
18729
19234
  #[cfg(feature = "tokenizer")]
@@ -18738,6 +19243,9 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
18738
19243
  #[cfg(any(feature = "native-http", feature = "wasm-http"))]
18739
19244
  module.define_module_function("create_client_from_json", function!(create_client_from_json, 1))?;
18740
19245
 
19246
+ #[cfg(feature = "native-http")]
19247
+ module.define_module_function("create_client_with_options", function!(create_client_with_options, -1))?;
19248
+
18741
19249
  module.define_module_function("decode_data_url", function!(decode_data_url, 1))?;
18742
19250
 
18743
19251
  module.define_module_function("encode_data_url", function!(encode_data_url, -1))?;
@@ -18748,6 +19256,8 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
18748
19256
  ))]
18749
19257
  module.define_module_function("ensure_crypto_provider", function!(ensure_crypto_provider, 0))?;
18750
19258
 
19259
+ module.define_module_function("exact_model_info", function!(exact_model_info, 1))?;
19260
+
18751
19261
  module.define_module_function(
18752
19262
  "install_catalog_overlay_from_str",
18753
19263
  function!(install_catalog_overlay_from_str, 1),
@@ -1,10 +1,10 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:88d843936a293d3dbc8d7b28247e23b849ade6bdaec311f512475702e7f6d5d3
2
+ # alef:hash:d820b0eb3dcb8f85bafc275011fcc83d644d7df0454fe1d9863c79edf59a88c4
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify
5
5
  # frozen_string_literal: true
6
6
 
7
7
  module LiterLlm
8
8
  ## The version string for this package.
9
- VERSION = "2.2.0"
9
+ VERSION = "2.2.3"
10
10
  end
data/sig/types.rbs CHANGED
@@ -1,5 +1,5 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:d586cd0ed89b7c23a36a35404031b0152d6e4bb331734e021b41b776a7a22706
2
+ # alef:hash:424dd8b9d3e3891415d6de9d838e00ab814f2e2c14a31d9dca8f567fa8901e80
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify
5
5
 
@@ -109,6 +109,17 @@ module LiterLlm
109
109
  def initialize: (?max_entries: Integer, ?ttl: Integer, ?backend: CacheBackend) -> void
110
110
  end
111
111
 
112
+ class CatalogInfo
113
+ attr_reader source: String
114
+ attr_reader source_sha256: String
115
+ attr_reader fetched: String
116
+ attr_reader library_version: String
117
+ attr_reader schema_version: Integer
118
+ attr_reader origin: String
119
+
120
+ def initialize: (?source: String, ?source_sha256: String, ?fetched: String, ?library_version: String, ?schema_version: Integer, ?origin: String) -> void
121
+ end
122
+
112
123
  class CatalogRefreshConfig
113
124
  attr_reader enabled: bool
114
125
  attr_reader source_url: String
@@ -195,6 +206,17 @@ module LiterLlm
195
206
  def initialize: (?index: Integer, ?message: AssistantMessage, ?finish_reason: enum_FinishReason, ?logprobs: String) -> void
196
207
  end
197
208
 
209
+ class ClientOptions
210
+ attr_reader api_key: String
211
+ attr_reader base_url: String?
212
+ attr_reader timeout_secs: Integer?
213
+ attr_reader max_retries: Integer?
214
+ attr_reader max_response_bytes: Integer?
215
+ attr_reader model_hint: String?
216
+
217
+ def initialize: (?api_key: String, ?base_url: String, ?timeout_secs: Integer, ?max_retries: Integer, ?max_response_bytes: Integer, ?model_hint: String) -> void
218
+ end
219
+
198
220
  class CompletionTokensDetails
199
221
  attr_reader reasoning_tokens: Integer
200
222
 
@@ -520,6 +542,9 @@ module LiterLlm
520
542
  end
521
543
 
522
544
  class ModelInfo
545
+ attr_reader matched_key: String
546
+ attr_reader exact: bool
547
+ attr_reader price_known: bool
523
548
  attr_reader input_cost_per_token: Float
524
549
  attr_reader output_cost_per_token: Float
525
550
  attr_reader cache_read_input_token_cost: Float?
@@ -540,7 +565,7 @@ module LiterLlm
540
565
  attr_reader supports_prompt_caching: bool?
541
566
  attr_reader tiers: Array[ModelTier]
542
567
 
543
- def initialize: (?input_cost_per_token: Float, ?output_cost_per_token: Float, ?cache_read_input_token_cost: Float, ?cache_creation_input_token_cost: Float, ?input_cost_per_audio_token: Float, ?output_cost_per_audio_token: Float, ?output_cost_per_reasoning_token: Float, ?max_tokens: Integer, ?max_input_tokens: Integer, ?max_output_tokens: Integer, ?mode: String, ?supports_vision: bool, ?supports_function_calling: bool, ?supports_reasoning: bool, ?supports_structured_output: bool, ?supports_audio_input: bool, ?supports_audio_output: bool, ?supports_prompt_caching: bool, ?tiers: Array[ModelTier]) -> void
568
+ def initialize: (?matched_key: String, ?exact: bool, ?price_known: bool, ?input_cost_per_token: Float, ?output_cost_per_token: Float, ?cache_read_input_token_cost: Float, ?cache_creation_input_token_cost: Float, ?input_cost_per_audio_token: Float, ?output_cost_per_audio_token: Float, ?output_cost_per_reasoning_token: Float, ?max_tokens: Integer, ?max_input_tokens: Integer, ?max_output_tokens: Integer, ?mode: String, ?supports_vision: bool, ?supports_function_calling: bool, ?supports_reasoning: bool, ?supports_structured_output: bool, ?supports_audio_input: bool, ?supports_audio_output: bool, ?supports_prompt_caching: bool, ?tiers: Array[ModelTier]) -> void
544
569
  end
545
570
 
546
571
  class ModelObject
@@ -669,9 +694,10 @@ module LiterLlm
669
694
 
670
695
  class PromptTokensDetails
671
696
  attr_reader cached_tokens: Integer
697
+ attr_reader cache_creation_tokens: Integer
672
698
  attr_reader audio_tokens: Integer
673
699
 
674
- def initialize: (?cached_tokens: Integer, ?audio_tokens: Integer) -> void
700
+ def initialize: (?cached_tokens: Integer, ?cache_creation_tokens: Integer, ?audio_tokens: Integer) -> void
675
701
  end
676
702
 
677
703
  class ProviderCapabilities
@@ -1008,6 +1034,8 @@ module LiterLlm
1008
1034
 
1009
1035
  def self.capabilities: (String provider_name) -> ProviderCapabilities
1010
1036
 
1037
+ def self.catalog_info: () -> CatalogInfo?
1038
+
1011
1039
  def self.check_bound: (String context, Integer current_len, Integer incoming, Integer limit) -> void
1012
1040
 
1013
1041
  def self.clear: () -> void
@@ -1018,6 +1046,8 @@ module LiterLlm
1018
1046
 
1019
1047
  def self.completion_cost_with_cache: (String model, Integer prompt_tokens, Integer cached_tokens, Integer completion_tokens) -> Float?
1020
1048
 
1049
+ def self.completion_cost_with_cache_details: (String model, Integer prompt_tokens, Integer cached_tokens, Integer cache_creation_tokens, Integer completion_tokens) -> Float?
1050
+
1021
1051
  def self.complex_provider_names: () -> Array[String]
1022
1052
 
1023
1053
  def self.count_request_tokens: (String model, ChatCompletionRequest req) -> Integer
@@ -1028,12 +1058,16 @@ module LiterLlm
1028
1058
 
1029
1059
  def self.create_client_from_json: (String json) -> DefaultClient
1030
1060
 
1061
+ def self.create_client_with_options: (ClientOptions options) -> DefaultClient
1062
+
1031
1063
  def self.decode_data_url: (String url) -> DecodedDataUrl?
1032
1064
 
1033
1065
  def self.encode_data_url: (String bytes, ?String mime) -> String
1034
1066
 
1035
1067
  def self.ensure_crypto_provider: () -> void
1036
1068
 
1069
+ def self.exact_model_info: (String model) -> ModelInfo?
1070
+
1037
1071
  def self.install_catalog_overlay_from_str: (String catalog_json) -> void
1038
1072
 
1039
1073
  def self.model_info: (String model) -> ModelInfo?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liter_llm
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Na'aman Hirschfeld
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-08 00:00:00.000000000 Z
11
+ date: 2026-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb_sys