Skip to main content

max / makenotwork

kberg: stop dragging aws-lc-rs into every consumer `reqwest = { features = ["json"] }` kept the default feature set, and reqwest 0.13's `default-tls` resolves to `rustls`, which is a hard alias for `__rustls-aws-lc-rs` with no ring counterpart. Cargo unifies features across the graph, so that one line put a C crypto backend into GoingsOn, Spaghetti, buckets_of_money and tm-mcp — none of which asked for it, and buckets_of_money is where it was found. `rustls-no-provider` removes it. TLS is kept rather than dropped: Ollama is loopback by default, but `with_base_url` is public and an https endpoint is a consumer's call to make. The provider then has to be named, so `OllamaProvider::new` installs ring and the server tests do the same through one helper. Without it reqwest panics at client construction rather than choosing.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-08-08 18:14 UTC
Signed with PGP, not checked
Commit: 5b6ff0ba76b5851c990daf1d2dee357ef4577488
Parent: 80cfdc1
4 files changed, +61 insertions, -290 deletions
@@ -28,29 +28,6 @@
28 28 source = "registry+https://github.com/rust-lang/crates.io-index"
29 29 checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
30 30
31 - [[package]]
32 - name = "aws-lc-rs"
33 - version = "1.17.3"
34 - source = "registry+https://github.com/rust-lang/crates.io-index"
35 - checksum = "00bdb5da18dac48ca2cc7cd4a98e533e8635a58e2361d13a1a4ee3888e0d72f1"
36 - dependencies = [
37 - "aws-lc-sys",
38 - "zeroize",
39 - ]
40 -
41 - [[package]]
42 - name = "aws-lc-sys"
43 - version = "0.43.0"
44 - source = "registry+https://github.com/rust-lang/crates.io-index"
45 - checksum = "43103168cc76fe62678a375e722fc9cb3a0146159ac5828bc4f0dfd755c2224c"
46 - dependencies = [
47 - "cc",
48 - "cmake",
49 - "dunce",
50 - "fs_extra",
51 - "pkg-config",
52 - ]
53 -
54 31 [[package]]
55 32 name = "axum"
56 33 version = "0.8.9"
@@ -134,8 +111,6 @@
134 111 checksum = "f5d6cac793997bd970000024b2934968efe83b382de4fdcf4fcb46b6ee4ad996"
135 112 dependencies = [
136 113 "find-msvc-tools",
137 - "jobserver",
138 - "libc",
139 114 "shlex",
140 115 ]
141 116
@@ -145,32 +120,6 @@
145 120 source = "registry+https://github.com/rust-lang/crates.io-index"
146 121 checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
147 122
148 - [[package]]
149 - name = "cfg_aliases"
150 - version = "0.2.2"
151 - source = "registry+https://github.com/rust-lang/crates.io-index"
152 - checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527"
153 -
154 - [[package]]
155 - name = "chacha20"
156 - version = "0.10.1"
157 - source = "registry+https://github.com/rust-lang/crates.io-index"
158 - checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81"
159 - dependencies = [
160 - "cfg-if",
161 - "cpufeatures",
162 - "rand_core",
163 - ]
164 -
165 - [[package]]
166 - name = "cmake"
167 - version = "0.1.58"
168 - source = "registry+https://github.com/rust-lang/crates.io-index"
169 - checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678"
170 - dependencies = [
171 - "cc",
172 - ]
173 -
174 123 [[package]]
175 124 name = "combine"
176 125 version = "4.6.7"
@@ -181,16 +130,6 @@
181 130 "memchr",
182 131 ]
183 132
184 - [[package]]
185 - name = "core-foundation"
186 - version = "0.9.4"
187 - source = "registry+https://github.com/rust-lang/crates.io-index"
188 - checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
189 - dependencies = [
190 - "core-foundation-sys",
191 - "libc",
192 - ]
193 -
194 133 [[package]]
195 134 name = "core-foundation"
196 135 version = "0.10.1"
@@ -207,15 +146,6 @@
207 146 source = "registry+https://github.com/rust-lang/crates.io-index"
208 147 checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
209 148
210 - [[package]]
211 - name = "cpufeatures"
212 - version = "0.3.0"
213 - source = "registry+https://github.com/rust-lang/crates.io-index"
214 - checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201"
215 - dependencies = [
216 - "libc",
217 - ]
218 -
219 149 [[package]]
220 150 name = "displaydoc"
221 151 version = "0.2.6"
@@ -227,12 +157,6 @@
227 157 "syn",
228 158 ]
229 159
230 - [[package]]
231 - name = "dunce"
232 - version = "1.0.5"
233 - source = "registry+https://github.com/rust-lang/crates.io-index"
234 - checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
235 -
236 160 [[package]]
237 161 name = "encoding_rs"
238 162 version = "0.8.35"
@@ -269,12 +193,6 @@
269 193 "percent-encoding",
270 194 ]
271 195
272 - [[package]]
273 - name = "fs_extra"
274 - version = "1.3.0"
275 - source = "registry+https://github.com/rust-lang/crates.io-index"
276 - checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
277 -
278 196 [[package]]
279 197 name = "futures-channel"
280 198 version = "0.3.32"
@@ -321,10 +239,8 @@
321 239 checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
322 240 dependencies = [
323 241 "cfg-if",
324 - "js-sys",
325 242 "libc",
326 243 "wasi",
327 - "wasm-bindgen",
328 244 ]
329 245
330 246 [[package]]
@@ -334,11 +250,8 @@
334 250 checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
335 251 dependencies = [
336 252 "cfg-if",
337 - "js-sys",
338 253 "libc",
339 254 "r-efi",
340 - "rand_core",
341 - "wasm-bindgen",
342 255 ]
343 256
344 257 [[package]]
@@ -466,11 +379,9 @@
466 379 "percent-encoding",
467 380 "pin-project-lite",
468 381 "socket2",
469 - "system-configuration",
470 382 "tokio",
471 383 "tower-service",
472 384 "tracing",
473 - "windows-registry",
474 385 ]
475 386
476 387 [[package]]
@@ -647,16 +558,6 @@
647 558 "syn",
648 559 ]
649 560
650 - [[package]]
651 - name = "jobserver"
652 - version = "0.1.35"
653 - source = "registry+https://github.com/rust-lang/crates.io-index"
654 - checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3"
655 - dependencies = [
656 - "getrandom 0.4.3",
657 - "libc",
658 - ]
659 -
660 561 [[package]]
661 562 name = "js-sys"
662 563 version = "0.3.103"
@@ -675,6 +576,7 @@
675 576 "async-trait",
676 577 "axum",
677 578 "reqwest",
579 + "rustls",
678 580 "serde",
679 581 "serde_json",
680 582 "thiserror",
@@ -709,12 +611,6 @@
709 611 source = "registry+https://github.com/rust-lang/crates.io-index"
710 612 checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad"
711 613
712 - [[package]]
713 - name = "lru-slab"
714 - version = "0.1.2"
715 - source = "registry+https://github.com/rust-lang/crates.io-index"
716 - checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154"
717 -
718 614 [[package]]
719 615 name = "matchers"
720 616 version = "0.2.0"
@@ -786,12 +682,6 @@
786 682 source = "registry+https://github.com/rust-lang/crates.io-index"
787 683 checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
788 684
789 - [[package]]
790 - name = "pkg-config"
791 - version = "0.3.33"
792 - source = "registry+https://github.com/rust-lang/crates.io-index"
793 - checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e"
794 -
795 685 [[package]]
796 686 name = "potential_utf"
797 687 version = "0.1.5"
@@ -810,63 +700,6 @@
810 700 "unicode-ident",
811 701 ]
812 702
813 - [[package]]
814 - name = "quinn"
815 - version = "0.11.11"
816 - source = "registry+https://github.com/rust-lang/crates.io-index"
817 - checksum = "0c1a41e437b6bbd489372cd4971de128e85c855f56c57f283d20ff016cf7c0a8"
818 - dependencies = [
819 - "bytes",
820 - "cfg_aliases",
821 - "pin-project-lite",
822 - "quinn-proto",
823 - "quinn-udp",
824 - "rustc-hash",
825 - "rustls",
826 - "socket2",
827 - "thiserror",
828 - "tokio",
829 - "tracing",
830 - "web-time",
831 - ]
832 -
833 - [[package]]
834 - name = "quinn-proto"
835 - version = "0.11.16"
836 - source = "registry+https://github.com/rust-lang/crates.io-index"
837 - checksum = "2f4bfc015262b9df63c8845072ce59068853ff5872180c2ce2f13038b970e560"
838 - dependencies = [
839 - "aws-lc-rs",
840 - "bytes",
841 - "getrandom 0.4.3",
842 - "lru-slab",
843 - "rand",
844 - "rand_pcg",
845 - "ring",
846 - "rustc-hash",
847 - "rustls",
848 - "rustls-pki-types",
849 - "slab",
850 - "thiserror",
851 - "tinyvec",
852 - "tracing",
853 - "web-time",
854 - ]
855 -
856 - [[package]]
857 - name = "quinn-udp"
858 - version = "0.5.15"
859 - source = "registry+https://github.com/rust-lang/crates.io-index"
860 - checksum = "35a133f956daabe89a61a685c2649f13d82d5aa4bd5d12d1277e1072a21c0694"
861 - dependencies = [
862 - "cfg_aliases",
863 - "libc",
864 - "once_cell",
865 - "socket2",
866 - "tracing",
867 - "windows-sys 0.61.2",
868 - ]
869 -
870 703 [[package]]
871 704 name = "quote"
872 705 version = "1.0.46"
@@ -882,32 +715,6 @@
882 715 source = "registry+https://github.com/rust-lang/crates.io-index"
883 716 checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
884 717
885 - [[package]]
886 - name = "rand"
887 - version = "0.10.2"
888 - source = "registry+https://github.com/rust-lang/crates.io-index"
889 - checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80"
890 - dependencies = [
891 - "chacha20",
892 - "getrandom 0.4.3",
893 - "rand_core",
894 - ]
895 -
896 - [[package]]
897 - name = "rand_core"
898 - version = "0.10.1"
899 - source = "registry+https://github.com/rust-lang/crates.io-index"
900 - checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69"
901 -
902 - [[package]]
903 - name = "rand_pcg"
904 - version = "0.10.2"
905 - source = "registry+https://github.com/rust-lang/crates.io-index"
906 - checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a"
907 - dependencies = [
908 - "rand_core",
909 - ]
910 -
911 718 [[package]]
912 719 name = "regex-automata"
913 720 version = "0.4.14"
@@ -947,7 +754,6 @@
947 754 "mime",
948 755 "percent-encoding",
949 756 "pin-project-lite",
950 - "quinn",
951 757 "rustls",
952 758 "rustls-pki-types",
953 759 "rustls-platform-verifier",
@@ -979,12 +785,6 @@
979 785 "windows-sys 0.52.0",
980 786 ]
981 787
982 - [[package]]
983 - name = "rustc-hash"
984 - version = "2.1.3"
985 - source = "registry+https://github.com/rust-lang/crates.io-index"
986 - checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
987 -
988 788 [[package]]
989 789 name = "rustc_version"
990 790 version = "0.4.1"
@@ -1000,8 +800,8 @@
1000 800 source = "registry+https://github.com/rust-lang/crates.io-index"
1001 801 checksum = "6b92b125634d9b795e7beca796cc790df15a7fb38323bf3196fda83292d06b1f"
1002 802 dependencies = [
1003 - "aws-lc-rs",
1004 803 "once_cell",
804 + "ring",
1005 805 "rustls-pki-types",
1006 806 "rustls-webpki",
1007 807 "subtle",
@@ -1026,7 +826,6 @@
1026 826 source = "registry+https://github.com/rust-lang/crates.io-index"
1027 827 checksum = "764899a24af3980067ee14bc143654f297b22eaebfe3c7b6b211920a5a59b046"
1028 828 dependencies = [
1029 - "web-time",
1030 829 "zeroize",
1031 830 ]
1032 831
@@ -1036,7 +835,7 @@
1036 835 source = "registry+https://github.com/rust-lang/crates.io-index"
1037 836 checksum = "26d1e2536ce4f35f4846aa13bff16bd0ff40157cdb14cc056c7b14ba41233ba0"
1038 837 dependencies = [
1039 - "core-foundation 0.10.1",
838 + "core-foundation",
1040 839 "core-foundation-sys",
1041 840 "jni",
1042 841 "log",
@@ -1063,7 +862,6 @@
1063 862 source = "registry+https://github.com/rust-lang/crates.io-index"
1064 863 checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e"
1065 864 dependencies = [
1066 - "aws-lc-rs",
1067 865 "ring",
1068 866 "rustls-pki-types",
1069 867 "untrusted",
@@ -1106,7 +904,7 @@
1106 904 checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d"
1107 905 dependencies = [
1108 906 "bitflags",
1109 - "core-foundation 0.10.1",
907 + "core-foundation",
1110 908 "core-foundation-sys",
1111 909 "libc",
1112 910 "security-framework-sys",
@@ -1290,27 +1088,6 @@
1290 1088 "syn",
1291 1089 ]
1292 1090
1293 - [[package]]
1294 - name = "system-configuration"
1295 - version = "0.7.0"
1296 - source = "registry+https://github.com/rust-lang/crates.io-index"
1297 - checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b"
1298 - dependencies = [
1299 - "bitflags",
1300 - "core-foundation 0.9.4",
1301 - "system-configuration-sys",
1302 - ]
1303 -
1304 - [[package]]
1305 - name = "system-configuration-sys"
1306 - version = "0.6.0"
1307 - source = "registry+https://github.com/rust-lang/crates.io-index"
1308 - checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4"
1309 - dependencies = [
1310 - "core-foundation-sys",
1311 - "libc",
1312 - ]
1313 -
1314 1091 [[package]]
1315 1092 name = "thiserror"
1316 1093 version = "2.0.18"
@@ -1350,21 +1127,6 @@
1350 1127 "zerovec",
1351 1128 ]
1352 1129
1353 - [[package]]
1354 - name = "tinyvec"
1355 - version = "1.12.0"
1356 - source = "registry+https://github.com/rust-lang/crates.io-index"
1357 - checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f"
1358 - dependencies = [
1359 - "tinyvec_macros",
1360 - ]
1361 -
1362 - [[package]]
1363 - name = "tinyvec_macros"
1364 - version = "0.1.1"
1365 - source = "registry+https://github.com/rust-lang/crates.io-index"
1366 - checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
1367 -
1368 1130 [[package]]
1369 1131 name = "tokio"
1370 1132 version = "1.52.3"
@@ -1678,16 +1440,6 @@
1678 1440 "wasm-bindgen",
1679 1441 ]
1680 1442
1681 - [[package]]
1682 - name = "web-time"
1683 - version = "1.1.0"
1684 - source = "registry+https://github.com/rust-lang/crates.io-index"
1685 - checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb"
1686 - dependencies = [
1687 - "js-sys",
1688 - "wasm-bindgen",
1689 - ]
1690 -
1691 1443 [[package]]
1692 1444 name = "webpki-root-certs"
1693 1445 version = "1.0.9"
@@ -1712,35 +1464,6 @@
1712 1464 source = "registry+https://github.com/rust-lang/crates.io-index"
1713 1465 checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
1714 1466
1715 - [[package]]
1716 - name = "windows-registry"
1717 - version = "0.6.1"
1718 - source = "registry+https://github.com/rust-lang/crates.io-index"
1719 - checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720"
1720 - dependencies = [
1721 - "windows-link",
1722 - "windows-result",
1723 - "windows-strings",
1724 - ]
1725 -
1726 - [[package]]
1727 - name = "windows-result"
1728 - version = "0.4.1"
1729 - source = "registry+https://github.com/rust-lang/crates.io-index"
1730 - checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"
1731 - dependencies = [
1732 - "windows-link",
1733 - ]
1734 -
1735 - [[package]]
1736 - name = "windows-strings"
1737 - version = "0.5.1"
1738 - source = "registry+https://github.com/rust-lang/crates.io-index"
1739 - checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"
1740 - dependencies = [
1741 - "windows-link",
1742 - ]
1743 -
1744 1467 [[package]]
1745 1468 name = "windows-sys"
1746 1469 version = "0.52.0"
@@ -1917,3 +1640,23 @@
1917 1640 version = "1.0.21"
1918 1641 source = "registry+https://github.com/rust-lang/crates.io-index"
1919 1642 checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
1643 +
1644 + [[patch.unused]]
1645 + name = "docengine"
1646 + version = "0.4.0"
1647 +
1648 + [[patch.unused]]
1649 + name = "painhours"
1650 + version = "0.1.0"
1651 +
1652 + [[patch.unused]]
1653 + name = "tagtree"
1654 + version = "0.4.0"
1655 +
1656 + [[patch.unused]]
1657 + name = "synckit-client"
1658 + version = "0.8.0"
1659 +
1660 + [[patch.unused]]
1661 + name = "synckit-config"
1662 + version = "0.2.0"
@@ -11,7 +11,7 @@
11 11 [features]
12 12 default = ["server", "ollama"]
13 13 server = ["dep:axum", "dep:tokio", "dep:tokio-stream"]
14 - ollama = ["dep:reqwest", "dep:tokio"]
14 + ollama = ["dep:reqwest", "dep:rustls", "dep:tokio"]
15 15
16 16 [dependencies]
17 17 serde = { version = "1", features = ["derive"] }
@@ -23,7 +23,18 @@
23 23
24 24 axum = { version = "0.8", optional = true }
25 25
26 - reqwest = { version = "0.13", optional = true, features = ["json"] }
26 + # `rustls-no-provider`, not the default feature set: reqwest 0.13's
27 + # `default-tls` resolves to `rustls`, which is a hard alias for
28 + # `__rustls-aws-lc-rs` with no ring counterpart. Cargo unifies features
29 + # across the graph, so this one line was putting a C crypto backend into
30 + # every consumer of this crate — GoingsOn, Spaghetti, buckets_of_money and
31 + # tm-mcp. The provider is named in `OllamaProvider::new` instead.
32 + #
33 + # TLS is kept rather than dropped: Ollama is loopback by default, but
34 + # `with_base_url` is public and an https endpoint is a consumer's to choose.
35 + reqwest = { version = "0.13", optional = true, default-features = false, features = ["json", "charset", "http2", "rustls-no-provider"] }
36 + # Direct only so `OllamaProvider::new` can name a provider.
37 + rustls = { version = "0.23", optional = true, default-features = false, features = ["ring"] }
27 38
28 39 tokio = { version = "1", optional = true, features = ["rt-multi-thread", "macros", "net", "sync", "time", "io-std", "io-util"] }
29 40 tokio-stream = { version = "0.1", optional = true, features = ["sync"] }
@@ -31,7 +42,9 @@
31 42 [dev-dependencies]
32 43 tokio = { version = "1", features = ["rt-multi-thread", "macros", "net", "sync", "time"] }
33 44 tracing-subscriber = { version = "0.3", features = ["env-filter"] }
34 - reqwest = { version = "0.13", features = ["json"] }
45 + reqwest = { version = "0.13", default-features = false, features = ["json", "charset", "http2", "rustls-no-provider"] }
46 + # The test helper names a provider, same as `OllamaProvider::new` does.
47 + rustls = { version = "0.23", default-features = false, features = ["ring"] }
35 48
36 49 [lints.rust]
37 50 unused = "warn"
@@ -60,6 +60,14 @@
60 60 }
61 61 }
62 62
63 + /// reqwest is declared `rustls-no-provider` (see the manifest: the default
64 + /// feature set welds aws-lc-rs in), so a client cannot be built until a
65 + /// provider is installed. Idempotent, so every test calls it.
66 + fn client() -> reqwest::Client {
67 + let _ = rustls::crypto::ring::default_provider().install_default();
68 + reqwest::Client::new()
69 + }
70 +
63 71 fn registry() -> ToolRegistry {
64 72 let mut r = ToolRegistry::new();
65 73 r.register(Ping);
@@ -172,7 +180,7 @@
172 180 .await
173 181 .unwrap();
174 182 let url = bound.url();
175 - let client = reqwest::Client::new();
183 + let client = client();
176 184
177 185 // initialize
178 186 let init = rpc(&client, &url, "initialize", Value::Null).await;
@@ -243,7 +251,7 @@
243 251 .await
244 252 .unwrap();
245 253 let url = bound.url();
246 - let client = reqwest::Client::new();
254 + let client = client();
247 255
248 256 let save = rpc(
249 257 &client,
@@ -283,7 +291,7 @@
283 291 .await
284 292 .unwrap();
285 293 let url = bound.url();
286 - let client = reqwest::Client::new();
294 + let client = client();
287 295
288 296 // initialize advertises the resources capability with subscribe support.
289 297 let init = rpc(&client, &url, "initialize", Value::Null).await;
@@ -333,7 +341,7 @@
333 341 .await
334 342 .unwrap();
335 343 let url = bound.url();
336 - let client = reqwest::Client::new();
344 + let client = client();
337 345
338 346 let list = rpc(&client, &url, "tools/list", Value::Null).await;
339 347 let names: HashSet<String> = list["result"]["tools"]
@@ -366,7 +374,7 @@
366 374 .await
367 375 .unwrap();
368 376 let url = bound.url();
369 - let client = reqwest::Client::new();
377 + let client = client();
370 378
371 379 let session = open_session(&client, &url).await;
372 380
@@ -421,7 +429,7 @@
421 429 .await
422 430 .unwrap();
423 431 let url = bound.url();
424 - let client = reqwest::Client::new();
432 + let client = client();
425 433
426 434 let session = open_session(&client, &url).await;
427 435 let mut sse = client
@@ -22,6 +22,13 @@
22 22
23 23 impl OllamaProvider {
24 24 pub fn new(model: impl Into<String>) -> Self {
25 + // reqwest is declared `rustls-no-provider` so this crate does not drag
26 + // a C crypto backend into every consumer, which means the provider is
27 + // ours to name and `Client::new()` panics without it. `install_default`
28 + // returns `Err` only when one is already installed, which is the state
29 + // we want, so the result is dropped and the call is safe to repeat.
30 + let _ = rustls::crypto::ring::default_provider().install_default();
31 +
25 32 Self {
26 33 client: reqwest::Client::new(),
27 34 base_url: DEFAULT_OLLAMA_URL.to_string(),