@bendyline/gezel-inference 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (297) hide show
  1. package/dist/catalog/chat-models/de/deepseek-v4.1-flash-552b-q2/manifest.json +120 -0
  2. package/dist/catalog/chat-models/de/deepseek-v4.1-flash-552b-q2/versions/1.0.0/manifest.json +21 -0
  3. package/dist/catalog/chat-models/gl/glm-5.3-flash-320b-q2/manifest.json +6 -5
  4. package/dist/catalog/chat-models/gl/glm-5.3-flash-320b-q2/versions/1.0.2/manifest.json +27 -0
  5. package/dist/catalog/chat-models/gl/glm-5.3-flash-320b-q2/versions/1.0.3/manifest.json +27 -0
  6. package/dist/catalog/chat-models/index.json +1 -1
  7. package/dist/catalog/chat-models/na/nanbeige4.2-3b-q4/manifest.json +1 -1
  8. package/dist/catalog/chat-models/ne/nemotron3.5-bolt-74b-iq2/manifest.json +157 -0
  9. package/dist/catalog/chat-models/ne/nemotron3.5-bolt-74b-iq2/versions/1.0.0/manifest.json +30 -0
  10. package/dist/catalog/chat-models/ne/nemotron3.5-bolt-e4b-q4/manifest.json +142 -0
  11. package/dist/catalog/chat-models/ne/nemotron3.5-bolt-e4b-q4/versions/1.0.0/manifest.json +14 -0
  12. package/dist/catalog/chat-models/ne/nemotron3.5-bolt-e4b-q4/versions/1.0.1/manifest.json +14 -0
  13. package/dist/catalog/chat-models/ne/nemotron3.5-super-vl-120b-nvfp4/manifest.json +156 -0
  14. package/dist/catalog/chat-models/ne/nemotron3.5-super-vl-120b-nvfp4/versions/1.0.0/manifest.json +28 -0
  15. package/dist/catalog/chat-models/raw-index.json +1 -1
  16. package/dist/catalog/image-models/an/animagine-xl-4/manifest.json +40 -0
  17. package/dist/catalog/image-models/an/animagine-xl-4/versions/4.0.0/manifest.json +10 -0
  18. package/dist/catalog/image-models/an/animagine-xl-4/versions/4.0.1/manifest.json +16 -0
  19. package/dist/catalog/image-models/fl/flux-2-klein-4b-q4/manifest.json +44 -0
  20. package/dist/catalog/image-models/fl/flux-2-klein-4b-q4/versions/1.0.0/manifest.json +23 -0
  21. package/dist/catalog/image-models/fl/flux-2-klein-4b-q4/versions/1.0.1/manifest.json +29 -0
  22. package/dist/catalog/image-models/index.json +1 -0
  23. package/dist/catalog/image-models/ir/iris-3b-f32/manifest.json +41 -0
  24. package/dist/catalog/image-models/ir/iris-3b-f32/versions/1.0.0/manifest.json +19 -0
  25. package/dist/catalog/image-models/ir/iris-3b-f32/versions/1.0.1/manifest.json +25 -0
  26. package/dist/catalog/image-models/ir/iris-3b-f32/versions/1.0.2/manifest.json +25 -0
  27. package/dist/catalog/image-models/kr/krea-2-turbo-q4/manifest.json +42 -0
  28. package/dist/catalog/image-models/kr/krea-2-turbo-q4/versions/1.0.0/manifest.json +23 -0
  29. package/dist/catalog/image-models/kr/krea-2-turbo-q4/versions/1.0.1/manifest.json +29 -0
  30. package/dist/catalog/image-models/kr/krea-2-turbo-q6/manifest.json +42 -0
  31. package/dist/catalog/image-models/kr/krea-2-turbo-q6/versions/1.0.0/manifest.json +23 -0
  32. package/dist/catalog/image-models/kr/krea-2-turbo-q6/versions/1.0.1/manifest.json +29 -0
  33. package/dist/catalog/image-models/kr/krea-2-turbo-q8/manifest.json +42 -0
  34. package/dist/catalog/image-models/kr/krea-2-turbo-q8/versions/1.0.0/manifest.json +23 -0
  35. package/dist/catalog/image-models/kr/krea-2-turbo-q8/versions/1.0.1/manifest.json +29 -0
  36. package/dist/catalog/image-models/mi/ming-image-0.1-design-bf16/manifest.json +41 -0
  37. package/dist/catalog/image-models/mi/ming-image-0.1-design-bf16/versions/1.0.0/manifest.json +31 -0
  38. package/dist/catalog/image-models/mi/ming-image-0.1-design-bf16/versions/1.0.1/manifest.json +50 -0
  39. package/dist/catalog/image-models/mi/ming-image-0.1-design-bf16/versions/1.0.2/manifest.json +50 -0
  40. package/dist/catalog/image-models/mo/moss-image-sft-q4/manifest.json +40 -0
  41. package/dist/catalog/image-models/mo/moss-image-sft-q4/versions/1.0.0/manifest.json +37 -0
  42. package/dist/catalog/image-models/mo/moss-image-sft-q4/versions/1.0.1/manifest.json +37 -0
  43. package/dist/catalog/image-models/raw-index.json +1 -0
  44. package/dist/catalog/image-models/sd/sd-1.5/manifest.json +40 -0
  45. package/dist/catalog/image-models/sd/sd-1.5/versions/1.0.0/manifest.json +10 -0
  46. package/dist/catalog/image-models/sd/sd-1.5/versions/1.0.1/manifest.json +16 -0
  47. package/dist/catalog/image-models/sd/sd-turbo/manifest.json +40 -0
  48. package/dist/catalog/image-models/sd/sd-turbo/versions/1.0.0/manifest.json +10 -0
  49. package/dist/catalog/image-models/sd/sd-turbo/versions/1.0.1/manifest.json +16 -0
  50. package/dist/catalog/image-models/sd/sdxl-base-1.0/manifest.json +39 -0
  51. package/dist/catalog/image-models/sd/sdxl-base-1.0/versions/1.0.0/manifest.json +10 -0
  52. package/dist/catalog/image-models/sd/sdxl-base-1.0/versions/1.0.1/manifest.json +16 -0
  53. package/dist/catalog/image-models/sd/sdxl-lightning-4step/manifest.json +40 -0
  54. package/dist/catalog/image-models/sd/sdxl-lightning-4step/versions/1.0.0/manifest.json +10 -0
  55. package/dist/catalog/image-models/sd/sdxl-lightning-4step/versions/1.0.1/manifest.json +16 -0
  56. package/dist/catalog/image-models/sd/sdxl-turbo/manifest.json +41 -0
  57. package/dist/catalog/image-models/sd/sdxl-turbo/versions/1.0.0/manifest.json +10 -0
  58. package/dist/catalog/image-models/sd/sdxl-turbo/versions/1.0.1/manifest.json +16 -0
  59. package/dist/catalog/knowledge-catalogs/be/bendyline-how-to-books/keywords.json +56 -0
  60. package/dist/catalog/knowledge-catalogs/ca/caselaw-alaska-part-0001/keywords.json +12 -0
  61. package/dist/catalog/knowledge-catalogs/ca/caselaw-nevada-part-0001/keywords.json +13 -0
  62. package/dist/catalog/knowledge-catalogs/ca/caselaw-us-300-399-part-0001/keywords.json +14 -0
  63. package/dist/catalog/knowledge-catalogs/ca/caselaw-us-347-349/keywords.json +17 -0
  64. package/dist/catalog/knowledge-catalogs/ca/caselaw-utah-part-0001/keywords.json +12 -0
  65. package/dist/catalog/knowledge-catalogs/ca/caselaw-utah-part-0002/keywords.json +12 -0
  66. package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0001/keywords.json +12 -0
  67. package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0002/keywords.json +12 -0
  68. package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0003/keywords.json +12 -0
  69. package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0004/keywords.json +12 -0
  70. package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0005/keywords.json +12 -0
  71. package/dist/catalog/knowledge-catalogs/ca/caselaw-wyoming-part-0001/keywords.json +12 -0
  72. package/dist/catalog/knowledge-catalogs/index.json +1 -1
  73. package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-aspnet-core-en/keywords.json +21 -0
  74. package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-ai-platform-en/keywords.json +27 -0
  75. package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-apps-compute-en/keywords.json +23 -0
  76. package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-data-aiot-en/keywords.json +26 -0
  77. package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-management-hybrid-en/keywords.json +28 -0
  78. package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-network-security-en/keywords.json +29 -0
  79. package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-dotnet-en/keywords.json +21 -0
  80. package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-entity-framework-en/keywords.json +14 -0
  81. package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-microsoft-365-en/keywords.json +20 -0
  82. package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-powershell-en/keywords.json +24 -0
  83. package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-sql-server-en/keywords.json +27 -0
  84. package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-windows-apps-en/keywords.json +18 -0
  85. package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-windows-server-en/keywords.json +28 -0
  86. package/dist/catalog/knowledge-catalogs/raw-index.json +1 -1
  87. package/dist/catalog/knowledge-catalogs/re/regional-american-south/keywords.json +1700 -0
  88. package/dist/catalog/knowledge-catalogs/re/regional-american-south/versions/2026.10.5/manifest.json +133 -0
  89. package/dist/catalog/knowledge-catalogs/re/regional-andes-amazon/keywords.json +750 -0
  90. package/dist/catalog/knowledge-catalogs/re/regional-andes-amazon/versions/2026.10.5/manifest.json +133 -0
  91. package/dist/catalog/knowledge-catalogs/re/regional-australia-nz/keywords.json +1281 -0
  92. package/dist/catalog/knowledge-catalogs/re/regional-australia-nz/versions/2026.10.5/manifest.json +133 -0
  93. package/dist/catalog/knowledge-catalogs/re/regional-brazil/keywords.json +1125 -0
  94. package/dist/catalog/knowledge-catalogs/re/regional-brazil/versions/2026.10.5/manifest.json +133 -0
  95. package/dist/catalog/knowledge-catalogs/re/regional-britain-ireland/keywords.json +3287 -0
  96. package/dist/catalog/knowledge-catalogs/re/regional-britain-ireland/versions/2026.10.5/manifest.json +133 -0
  97. package/dist/catalog/knowledge-catalogs/re/regional-california-southwest/keywords.json +1835 -0
  98. package/dist/catalog/knowledge-catalogs/re/regional-california-southwest/versions/2026.10.5/manifest.json +133 -0
  99. package/dist/catalog/knowledge-catalogs/re/regional-canada-alaska/keywords.json +1184 -0
  100. package/dist/catalog/knowledge-catalogs/re/regional-canada-alaska/versions/2026.10.5/manifest.json +133 -0
  101. package/dist/catalog/knowledge-catalogs/re/regional-central-eastern-europe/keywords.json +1503 -0
  102. package/dist/catalog/knowledge-catalogs/re/regional-central-eastern-europe/versions/2026.10.5/manifest.json +133 -0
  103. package/dist/catalog/knowledge-catalogs/re/regional-east-asia/keywords.json +2836 -0
  104. package/dist/catalog/knowledge-catalogs/re/regional-east-asia/versions/2026.10.5/manifest.json +133 -0
  105. package/dist/catalog/knowledge-catalogs/re/regional-east-southern-africa/keywords.json +813 -0
  106. package/dist/catalog/knowledge-catalogs/re/regional-east-southern-africa/versions/2026.10.5/manifest.json +133 -0
  107. package/dist/catalog/knowledge-catalogs/re/regional-mediterranean/keywords.json +2082 -0
  108. package/dist/catalog/knowledge-catalogs/re/regional-mediterranean/versions/2026.10.5/manifest.json +133 -0
  109. package/dist/catalog/knowledge-catalogs/re/regional-mexico-central-america/keywords.json +1481 -0
  110. package/dist/catalog/knowledge-catalogs/re/regional-mexico-central-america/versions/2026.10.5/manifest.json +133 -0
  111. package/dist/catalog/knowledge-catalogs/re/regional-middle-east/keywords.json +1272 -0
  112. package/dist/catalog/knowledge-catalogs/re/regional-middle-east/versions/2026.10.5/manifest.json +133 -0
  113. package/dist/catalog/knowledge-catalogs/re/regional-midwest/keywords.json +758 -0
  114. package/dist/catalog/knowledge-catalogs/re/regional-midwest/versions/2026.10.5/manifest.json +133 -0
  115. package/dist/catalog/knowledge-catalogs/re/regional-north-africa/keywords.json +896 -0
  116. package/dist/catalog/knowledge-catalogs/re/regional-north-africa/versions/2026.10.5/manifest.json +133 -0
  117. package/dist/catalog/knowledge-catalogs/re/regional-northeast/keywords.json +1281 -0
  118. package/dist/catalog/knowledge-catalogs/re/regional-northeast/versions/2026.10.5/manifest.json +133 -0
  119. package/dist/catalog/knowledge-catalogs/re/regional-northern-eurasia/keywords.json +346 -0
  120. package/dist/catalog/knowledge-catalogs/re/regional-northern-eurasia/versions/2026.10.5/manifest.json +133 -0
  121. package/dist/catalog/knowledge-catalogs/re/regional-northern-europe/keywords.json +2688 -0
  122. package/dist/catalog/knowledge-catalogs/re/regional-northern-europe/versions/2026.10.5/manifest.json +133 -0
  123. package/dist/catalog/knowledge-catalogs/re/regional-pacific-islands/keywords.json +973 -0
  124. package/dist/catalog/knowledge-catalogs/re/regional-pacific-islands/versions/2026.10.5/manifest.json +133 -0
  125. package/dist/catalog/knowledge-catalogs/re/regional-pacific-northwest/keywords.json +937 -0
  126. package/dist/catalog/knowledge-catalogs/re/regional-pacific-northwest/versions/2026.10.5/manifest.json +133 -0
  127. package/dist/catalog/knowledge-catalogs/re/regional-rockies-plains/keywords.json +608 -0
  128. package/dist/catalog/knowledge-catalogs/re/regional-rockies-plains/versions/2026.10.5/manifest.json +133 -0
  129. package/dist/catalog/knowledge-catalogs/re/regional-south-asia/keywords.json +633 -0
  130. package/dist/catalog/knowledge-catalogs/re/regional-south-asia/versions/2026.10.5/manifest.json +133 -0
  131. package/dist/catalog/knowledge-catalogs/re/regional-southeast-asia/keywords.json +2697 -0
  132. package/dist/catalog/knowledge-catalogs/re/regional-southeast-asia/versions/2026.10.5/manifest.json +133 -0
  133. package/dist/catalog/knowledge-catalogs/re/regional-southern-cone/keywords.json +606 -0
  134. package/dist/catalog/knowledge-catalogs/re/regional-southern-cone/versions/2026.10.5/manifest.json +133 -0
  135. package/dist/catalog/knowledge-catalogs/re/regional-west-central-africa/keywords.json +564 -0
  136. package/dist/catalog/knowledge-catalogs/re/regional-west-central-africa/versions/2026.10.5/manifest.json +133 -0
  137. package/dist/catalog/knowledge-catalogs/re/regional-western-europe/keywords.json +3247 -0
  138. package/dist/catalog/knowledge-catalogs/re/regional-western-europe-east/manifest.json +47 -0
  139. package/dist/catalog/knowledge-catalogs/re/regional-western-europe-east/versions/2026.10.5/manifest.json +133 -0
  140. package/dist/catalog/knowledge-catalogs/re/regional-western-europe-west/manifest.json +47 -0
  141. package/dist/catalog/knowledge-catalogs/re/regional-western-europe-west/versions/2026.10.5/manifest.json +133 -0
  142. package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/keywords.json +5437 -0
  143. package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/manifest.json +1 -1
  144. package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/versions/2026.10.1/manifest.json +181 -0
  145. package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/keywords.json +4009 -0
  146. package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/manifest.json +1 -1
  147. package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/versions/2026.10.1/manifest.json +181 -0
  148. package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/keywords.json +4009 -0
  149. package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/manifest.json +1 -1
  150. package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/versions/2026.10.1/manifest.json +217 -0
  151. package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/keywords.json +5583 -0
  152. package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/manifest.json +1 -1
  153. package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/versions/2026.10.1/manifest.json +197 -0
  154. package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/keywords.json +6386 -0
  155. package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/manifest.json +2 -2
  156. package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/versions/2026.10.1/manifest.json +197 -0
  157. package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/keywords.json +4009 -0
  158. package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/manifest.json +1 -1
  159. package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/versions/2026.10.1/manifest.json +185 -0
  160. package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/keywords.json +5672 -0
  161. package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/manifest.json +1 -1
  162. package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/versions/2026.10.1/manifest.json +137 -0
  163. package/dist/catalog/knowledge-catalogs/wi/wikipedia-geography/manifest.json +68 -0
  164. package/dist/catalog/knowledge-catalogs/wi/wikipedia-geography/versions/2026.10.1/manifest.json +217 -0
  165. package/dist/catalog/knowledge-catalogs/wi/wikipedia-history/manifest.json +68 -0
  166. package/dist/catalog/knowledge-catalogs/wi/wikipedia-history/versions/2026.10.1/manifest.json +217 -0
  167. package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/keywords.json +4009 -0
  168. package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/manifest.json +1 -1
  169. package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/versions/2026.10.1/manifest.json +141 -0
  170. package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/keywords.json +4009 -0
  171. package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/manifest.json +1 -1
  172. package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/versions/2026.10.1/manifest.json +185 -0
  173. package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/keywords.json +5719 -0
  174. package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/manifest.json +1 -1
  175. package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/versions/2026.10.1/manifest.json +193 -0
  176. package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/keywords.json +4009 -0
  177. package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/manifest.json +1 -1
  178. package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/versions/2026.10.1/manifest.json +189 -0
  179. package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/keywords.json +16009 -0
  180. package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/manifest.json +1 -1
  181. package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/versions/2026.10.1/manifest.json +185 -0
  182. package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/keywords.json +5843 -0
  183. package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/manifest.json +1 -1
  184. package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/versions/2026.10.1/manifest.json +189 -0
  185. package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/keywords.json +6264 -0
  186. package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/manifest.json +1 -1
  187. package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/versions/2026.10.1/manifest.json +197 -0
  188. package/dist/catalog/knowledge-catalogs/wi/wikipedia-people-arts/manifest.json +66 -0
  189. package/dist/catalog/knowledge-catalogs/wi/wikipedia-people-arts/versions/2026.10.1/manifest.json +209 -0
  190. package/dist/catalog/knowledge-catalogs/wi/wikipedia-people-business/manifest.json +61 -0
  191. package/dist/catalog/knowledge-catalogs/wi/wikipedia-people-business/versions/2026.10.1/manifest.json +189 -0
  192. package/dist/catalog/knowledge-catalogs/wi/wikipedia-people-entertainment/manifest.json +64 -0
  193. package/dist/catalog/knowledge-catalogs/wi/wikipedia-people-entertainment/versions/2026.10.1/manifest.json +201 -0
  194. package/dist/catalog/knowledge-catalogs/wi/wikipedia-people-military/manifest.json +60 -0
  195. package/dist/catalog/knowledge-catalogs/wi/wikipedia-people-military/versions/2026.10.1/manifest.json +185 -0
  196. package/dist/catalog/knowledge-catalogs/wi/wikipedia-people-other/manifest.json +55 -0
  197. package/dist/catalog/knowledge-catalogs/wi/wikipedia-people-other/versions/2026.10.1/manifest.json +165 -0
  198. package/dist/catalog/knowledge-catalogs/wi/wikipedia-people-politics/manifest.json +63 -0
  199. package/dist/catalog/knowledge-catalogs/wi/wikipedia-people-politics/versions/2026.10.1/manifest.json +197 -0
  200. package/dist/catalog/knowledge-catalogs/wi/wikipedia-people-religion/manifest.json +64 -0
  201. package/dist/catalog/knowledge-catalogs/wi/wikipedia-people-religion/versions/2026.10.1/manifest.json +201 -0
  202. package/dist/catalog/knowledge-catalogs/wi/wikipedia-people-science/manifest.json +65 -0
  203. package/dist/catalog/knowledge-catalogs/wi/wikipedia-people-science/versions/2026.10.1/manifest.json +205 -0
  204. package/dist/catalog/knowledge-catalogs/wi/wikipedia-people-sports/manifest.json +73 -0
  205. package/dist/catalog/knowledge-catalogs/wi/wikipedia-people-sports/versions/2026.10.1/manifest.json +237 -0
  206. package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/keywords.json +5447 -0
  207. package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/manifest.json +1 -1
  208. package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/versions/2026.10.1/manifest.json +197 -0
  209. package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/keywords.json +4009 -0
  210. package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/manifest.json +1 -1
  211. package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/versions/2026.10.1/manifest.json +189 -0
  212. package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/keywords.json +4009 -0
  213. package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/manifest.json +1 -1
  214. package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/versions/2026.10.1/manifest.json +185 -0
  215. package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/keywords.json +5209 -0
  216. package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/manifest.json +1 -1
  217. package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/versions/2026.10.1/manifest.json +193 -0
  218. package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/keywords.json +6537 -0
  219. package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/manifest.json +1 -1
  220. package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/versions/2026.10.1/manifest.json +185 -0
  221. package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/keywords.json +5989 -0
  222. package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/manifest.json +1 -1
  223. package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/versions/2026.10.1/manifest.json +189 -0
  224. package/dist/catalog/provenance.json +2 -1
  225. package/dist/engines/native-file-manifest.json +198 -118
  226. package/dist/engines/native-manifest.d.ts +4 -4
  227. package/dist/engines/native-manifest.js +36 -34
  228. package/dist/engines/resolver.js +12 -1
  229. package/dist/fs/atomic.d.ts +4 -1
  230. package/dist/fs/atomic.js +7 -1
  231. package/dist/http/openai-compat/chat-target.d.ts +1 -1
  232. package/dist/http/openai-compat/chat-target.js +1 -1
  233. package/dist/http/openai-compat/engine-failure.js +7 -2
  234. package/dist/http/routes/v1-chat.js +1 -1
  235. package/dist/http/routes/v1-images.d.ts +44 -0
  236. package/dist/http/routes/v1-images.js +370 -0
  237. package/dist/http/routes/v1-knowledge.js +4 -0
  238. package/dist/http/routes/v1-responses.d.ts +1 -1
  239. package/dist/inference-service.d.ts +9 -1
  240. package/dist/inference-service.js +44 -11
  241. package/dist/knowledge/manager.d.ts +7 -0
  242. package/dist/knowledge/manager.js +32 -1
  243. package/dist/kokoro-lexicon/manifest.json +6 -3
  244. package/dist/models/image-fit.d.ts +83 -0
  245. package/dist/models/image-fit.js +163 -0
  246. package/dist/models/weight-facts.d.ts +36 -0
  247. package/dist/models/weight-facts.js +171 -0
  248. package/dist/perf/responsiveness.js +4 -3
  249. package/dist/providers/audio/kokoro-frontend.js +1 -1
  250. package/dist/providers/ds4/build-provider.js +34 -21
  251. package/dist/providers/ds4/dspark.d.ts +23 -5
  252. package/dist/providers/ds4/dspark.js +36 -8
  253. package/dist/providers/image/img2img-support.d.ts +40 -0
  254. package/dist/providers/image/img2img-support.js +74 -0
  255. package/dist/providers/image/local-engine.d.ts +31 -0
  256. package/dist/providers/image/local-engine.js +47 -0
  257. package/dist/providers/image/local-factory.d.ts +95 -0
  258. package/dist/providers/image/local-factory.js +270 -0
  259. package/dist/providers/image/mock.d.ts +23 -0
  260. package/dist/providers/image/mock.js +151 -0
  261. package/dist/providers/image/pull-registry.d.ts +106 -0
  262. package/dist/providers/image/pull-registry.js +227 -0
  263. package/dist/providers/image/sd-cpp.d.ts +200 -0
  264. package/dist/providers/image/sd-cpp.js +845 -0
  265. package/dist/providers/image/types.d.ts +235 -0
  266. package/dist/providers/image/types.js +20 -0
  267. package/dist/providers/llama-cpp/backend-health.d.ts +7 -0
  268. package/dist/providers/llama-cpp/backend-health.js +41 -1
  269. package/dist/providers/llama-cpp/build-provider.js +107 -56
  270. package/dist/providers/llama-cpp/cache-adapter.d.ts +7 -1
  271. package/dist/providers/llama-cpp/cache-adapter.js +9 -0
  272. package/dist/providers/llama-cpp/devices.d.ts +13 -2
  273. package/dist/providers/llama-cpp/devices.js +43 -6
  274. package/dist/providers/llama-cpp/models.js +4 -1
  275. package/dist/providers/llama-cpp/offload-planner.d.ts +23 -0
  276. package/dist/providers/llama-cpp/offload-planner.js +27 -0
  277. package/dist/providers/llama-cpp/provider.d.ts +14 -3
  278. package/dist/providers/llama-cpp/provider.js +35 -2
  279. package/dist/providers/mlx/provider.js +15 -5
  280. package/dist/providers/mlx/reasoning-stream.d.ts +15 -0
  281. package/dist/providers/mlx/reasoning-stream.js +35 -0
  282. package/dist/providers/native/capacity-broker.js +9 -3
  283. package/dist/providers/native/local-engine-runtime.js +15 -12
  284. package/dist/providers/native/supervisor.d.ts +8 -0
  285. package/dist/providers/native/supervisor.js +55 -5
  286. package/dist/providers/project-macro-loop-bail.js +5 -3
  287. package/dist/providers/provider-lifecycle.d.ts +21 -0
  288. package/dist/providers/provider-lifecycle.js +83 -0
  289. package/dist/providers/queue.d.ts +9 -2
  290. package/dist/providers/queue.js +17 -2
  291. package/dist/providers/retirement-gate.d.ts +20 -0
  292. package/dist/providers/retirement-gate.js +55 -0
  293. package/dist/providers/session-hooks.d.ts +4 -1
  294. package/dist/system/memory.js +6 -0
  295. package/dist/utils/image-meta.d.ts +12 -0
  296. package/dist/utils/image-meta.js +77 -0
  297. package/package.json +6 -6
@@ -0,0 +1,235 @@
1
+ import type { ImageAspectRatio, ImageModelAuxiliaryRole, ImageQuality } from '@bendyline/gezel';
2
+ export type { ImageModelAuxiliaryRole } from '@bendyline/gezel';
3
+ /**
4
+ * ImageProvider — the service-side abstraction for local image generation.
5
+ *
6
+ * Mirrors the role `LLMProvider` plays for text. Deliberately simpler:
7
+ * image gen is one-shot rather than session-based, so there is no
8
+ * `createSession`/`sendAndWait` stream — just a single `generate` call
9
+ * that returns a PNG buffer plus metadata.
10
+ *
11
+ * Implementations today:
12
+ * - `MockImageProvider` — deterministic 1x1 PNG for tests and
13
+ * GEZEL_MOCK_PROVIDER=1 flows.
14
+ * - `StableDiffusionCppProvider` — talks to a `sd-server` binary over HTTP.
15
+ */
16
+ /**
17
+ * One source image for editing / reference-driven generation, after
18
+ * the route has resolved any artifact paths to bytes. Provider sees
19
+ * a uniform `{ data: Buffer; mimeType }` shape.
20
+ */
21
+ export interface ImageInputBytes {
22
+ data: Buffer;
23
+ mimeType: string;
24
+ }
25
+ /**
26
+ * Where a local generation is. sd-server loads weights lazily inside the
27
+ * first request after a launch, so `loading_model` happens mid-request, and
28
+ * its tiled VAE decode prints a progress bar of its own after sampling.
29
+ */
30
+ export type ImageGenerationPhase = 'queued' | 'loading_model' | 'sampling' | 'decoding';
31
+ /**
32
+ * Progress info reported mid-generate by providers that can observe
33
+ * per-step advancement. Today only the local sd-cpp provider emits
34
+ * these (parsed from sd-server's `|==> | 3/20 - 18.20s/it` stdout).
35
+ * Cloud providers stay silent — their HTTP APIs are one-shot, with
36
+ * no streaming step counter to surface.
37
+ *
38
+ * `step`/`totalSteps` count within the phase: tensors loaded while
39
+ * `loading_model`, sampling steps while `sampling`, tiles while `decoding`.
40
+ * Both are 0 while `queued`. A consumer that only draws a sampling bar
41
+ * reads events whose `phase` is `sampling` or absent.
42
+ */
43
+ export interface ImageGenerationProgress {
44
+ /** Unit the engine just completed in this phase (1-indexed). */
45
+ step: number;
46
+ /** Units in this phase. */
47
+ totalSteps: number;
48
+ /** Wall-clock seconds for the most recent step, when reported. */
49
+ secondsPerStep?: number;
50
+ /** Absent from providers that only report sampling. */
51
+ phase?: ImageGenerationPhase;
52
+ }
53
+ export interface ImageGenerationInput {
54
+ prompt: string;
55
+ negativePrompt?: string;
56
+ /** Manifest id of the model to use. Provider falls back to its default. */
57
+ model?: string;
58
+ width?: number;
59
+ height?: number;
60
+ /**
61
+ * The shape and size tier the caller asked for. Local engines render the
62
+ * pixels the route already resolved from these; cloud providers map them
63
+ * to their own aspect ratios and size tiers, which explicit pixels
64
+ * override.
65
+ */
66
+ aspectRatio?: ImageAspectRatio;
67
+ quality?: ImageQuality;
68
+ steps?: number;
69
+ seed?: number;
70
+ /**
71
+ * Source images for image editing / reference-driven generation.
72
+ * Cloud providers accept multiple; sd-cpp's img2img path uses the
73
+ * first only (the others are dropped with a warning).
74
+ */
75
+ inputImages?: ImageInputBytes[];
76
+ /** Img2img strength (0 = keep source, 1 = ignore source). sd-cpp only. */
77
+ strength?: number;
78
+ /**
79
+ * Optional callback fired as the engine advances through sampling
80
+ * steps. Today only the local sd-cpp provider emits these; cloud
81
+ * providers ignore the field. Errors thrown from the callback are
82
+ * swallowed so a buggy listener can't take down a generation.
83
+ */
84
+ onProgress?: (progress: ImageGenerationProgress) => void;
85
+ /**
86
+ * Cancels the generation. A queued request leaves without touching the
87
+ * engine. sd-server cannot interrupt a render it has started, and keeps
88
+ * rendering after its client disconnects, so the local provider stops the
89
+ * engine process instead; the next generation pays a fresh weight load.
90
+ */
91
+ signal?: AbortSignal;
92
+ }
93
+ /** The caller's signal aborted the generation. */
94
+ export declare class ImageGenerationCancelledError extends Error {
95
+ readonly code = "image_generation_cancelled";
96
+ constructor();
97
+ }
98
+ /**
99
+ * The engine could not fit the render into graphics memory. sd-server plans
100
+ * placement at launch and can misjudge free memory held by another engine;
101
+ * it then fails at the first sampling step with a bare "no results".
102
+ */
103
+ export declare class ImageCapacityError extends Error {
104
+ readonly code = "image_capacity";
105
+ constructor(detail?: string);
106
+ }
107
+ export interface ImageGenerationMeta {
108
+ model: string;
109
+ seed: number;
110
+ steps: number;
111
+ widthPx: number;
112
+ heightPx: number;
113
+ durationMs: number;
114
+ /**
115
+ * Set when `inputImages` were supplied but the resolved model does not
116
+ * support img2img — the provider dropped the sources and generated from
117
+ * the prompt alone. Mirrors the core wire schema so the route can
118
+ * forward it untouched.
119
+ */
120
+ img2imgSkippedReason?: string;
121
+ }
122
+ export interface ImageGenerationOutput {
123
+ png: Buffer;
124
+ meta: ImageGenerationMeta;
125
+ }
126
+ export interface InstalledImageModelInfo {
127
+ id: string;
128
+ name: string;
129
+ approxSizeBytes: number;
130
+ installedAt: string;
131
+ /** Loading shape recorded at pull time; absent on pre-capability installs. */
132
+ weightsKind?: 'checkpoint' | 'diffusion-model';
133
+ /** Explicit catalog capability recorded at pull time; absent → resolve via the ladder. */
134
+ supportsImg2Img?: boolean;
135
+ }
136
+ export type ImageModelPullEvent = {
137
+ type: 'progress';
138
+ bytesWritten: number;
139
+ totalBytes?: number;
140
+ }
141
+ /**
142
+ * Surfaced when the shared `downloadWithRetry` helper hit a transient
143
+ * network error and is about to try again. The UI can render
144
+ * "Connection lost — retrying in 4s (attempt 3/5)…" instead of a
145
+ * fatal error banner. `reason` is already a user-friendly sentence;
146
+ * don't wrap it.
147
+ */
148
+ | {
149
+ type: 'retrying';
150
+ attempt: number;
151
+ maxAttempts: number;
152
+ delayMs: number;
153
+ reason: string;
154
+ } | {
155
+ type: 'error';
156
+ error: string;
157
+ } | {
158
+ type: 'done';
159
+ id: string;
160
+ };
161
+ export interface ImageModelAuxiliaryPullSpec {
162
+ role: ImageModelAuxiliaryRole;
163
+ downloadUrl: string;
164
+ sha256: string;
165
+ approxSizeBytes: number;
166
+ }
167
+ export interface ImageModelPullSpec {
168
+ downloadUrl: string;
169
+ sha256: string;
170
+ approxSizeBytes: number;
171
+ /** Human-readable name copied into the local metadata. */
172
+ name: string;
173
+ /**
174
+ * `checkpoint` — single-file (SD 1.x / SDXL / SD3.5 safetensors). The
175
+ * supervisor passes `--model <weights>` at sd-server launch.
176
+ * `diffusion-model` — unet-only (FLUX / SD3 GGUF); supervisor passes
177
+ * `--diffusion-model <weights>` plus one `--<role>` flag per aux file.
178
+ */
179
+ weightsKind: 'checkpoint' | 'diffusion-model';
180
+ /**
181
+ * Explicit img2img capability from the catalog manifest, persisted
182
+ * into the installed metadata so local state stays self-describing
183
+ * even if the catalog entry later disappears. Absent when the catalog
184
+ * didn't declare it — resolution falls back to the assessment map +
185
+ * weights-kind default.
186
+ */
187
+ supportsImg2Img?: boolean;
188
+ /** Auxiliary files (VAE, text encoders) downloaded alongside the unet. */
189
+ auxiliaryFiles: ImageModelAuxiliaryPullSpec[];
190
+ }
191
+ export interface ImageEngineHealth {
192
+ /**
193
+ * `ok` — the engine is reachable and ready to accept generation requests.
194
+ * `unreachable` — the configured engine URL is not responding (no
195
+ * process listening, network error, etc).
196
+ * `not-configured` — no engine binary or URL is wired up; the provider
197
+ * would fall back to a default loopback URL that nothing is going to
198
+ * answer. UI surfaces this distinctly so the user gets actionable
199
+ * guidance rather than a generic "unreachable" state.
200
+ */
201
+ status: 'ok' | 'unreachable' | 'not-configured';
202
+ /** Resolved base URL the provider is pointed at, for diagnostic display. */
203
+ baseUrl: string;
204
+ /** Free-form reason when `status !== 'ok'`. */
205
+ error?: string;
206
+ }
207
+ export interface ImageProvider {
208
+ readonly name: string;
209
+ generate(input: ImageGenerationInput): Promise<ImageGenerationOutput>;
210
+ listInstalledModels(): Promise<InstalledImageModelInfo[]>;
211
+ /**
212
+ * The model a generate that names none will use. Callers that look up
213
+ * per-model defaults (the route's recommended steps) must ask this rather
214
+ * than guess, or the defaults of one model are applied to another.
215
+ * Providers without a local default omit it.
216
+ */
217
+ resolveDefaultModelId?(): Promise<string | undefined>;
218
+ /**
219
+ * Stream the install of one catalog model. When `signal` is supplied
220
+ * and aborts mid-download, providers should leave any `.partial` file
221
+ * in place so a follow-up pull resumes via Range requests — disconnect
222
+ * ≠ delete. Cloud providers ignore the field.
223
+ */
224
+ pullModel(id: string, spec: ImageModelPullSpec, signal?: AbortSignal): AsyncIterable<ImageModelPullEvent>;
225
+ deleteModel(id: string): Promise<void>;
226
+ /**
227
+ * Probe the underlying engine for reachability without doing real
228
+ * work. Implementations should be fast (sub-second) and never throw
229
+ * — return `unreachable` / `not-configured` instead. Called by the
230
+ * Settings UI to render an honest readiness pill.
231
+ */
232
+ health(): Promise<ImageEngineHealth>;
233
+ /** Best-effort shutdown of any backing engine. Called when the service stops. */
234
+ shutdown?(): Promise<void>;
235
+ }
@@ -0,0 +1,20 @@
1
+ /** The caller's signal aborted the generation. */
2
+ export class ImageGenerationCancelledError extends Error {
3
+ code = 'image_generation_cancelled';
4
+ constructor() {
5
+ super('Image generation was cancelled');
6
+ this.name = 'ImageGenerationCancelledError';
7
+ }
8
+ }
9
+ /**
10
+ * The engine could not fit the render into graphics memory. sd-server plans
11
+ * placement at launch and can misjudge free memory held by another engine;
12
+ * it then fails at the first sampling step with a bare "no results".
13
+ */
14
+ export class ImageCapacityError extends Error {
15
+ code = 'image_capacity';
16
+ constructor(detail) {
17
+ super(`Not enough graphics memory to render this image${detail ? ` (${detail})` : ''}. Close other models or try a smaller size.`);
18
+ this.name = 'ImageCapacityError';
19
+ }
20
+ }
@@ -11,6 +11,13 @@
11
11
  */
12
12
  import type { LlamaCppBackendHealthResponse } from '@bendyline/gezel';
13
13
  import type { GpuUnused } from './gpu-startup-watch.js';
14
+ type MissingRuntimeState = NonNullable<LlamaCppBackendHealthResponse['missingRuntime']>;
15
+ /**
16
+ * Windows: whether this PC can load the runtime every engine imports, read from
17
+ * the first engine binary discovery found. One is enough: they all link the
18
+ * same runtime.
19
+ */
20
+ export declare function readMissingRuntime(now?: number, platform?: NodeJS.Platform): MissingRuntimeState | null;
14
21
  /** Record what the latest start of a build found; null clears it. */
15
22
  export declare function noteGpuStartup(verdict: GpuUnused | null, now?: Date): void;
16
23
  export declare function noteHostOutOfMemory(input: {
@@ -9,7 +9,44 @@
9
9
  * Process-wide like the backend env it sits beside: every llama provider in
10
10
  * this process launches the same build.
11
11
  */
12
- import { readLlamaCudaBlocker } from '@bendyline/gezel/native';
12
+ import { missingMachineRuntime, readLlamaCudaBlocker, vcRedistributableUrl, } from '@bendyline/gezel/native';
13
+ /**
14
+ * Reading an engine's import tables takes tens of milliseconds of synchronous
15
+ * file reads, and the answer only changes when someone installs the runtime.
16
+ */
17
+ const RUNTIME_CHECK_TTL_MS = 60_000;
18
+ let runtimeCheck = null;
19
+ /**
20
+ * Windows: whether this PC can load the runtime every engine imports, read from
21
+ * the first engine binary discovery found. One is enough: they all link the
22
+ * same runtime.
23
+ */
24
+ export function readMissingRuntime(now = Date.now(), platform = process.platform) {
25
+ if (platform !== 'win32')
26
+ return null;
27
+ const binary = [
28
+ process.env.GEZEL_LLAMA_SERVER_BIN,
29
+ process.env.GEZEL_SD_SERVER_BIN,
30
+ process.env.GEZEL_WHISPER_SERVER_BIN,
31
+ ].find((path) => Boolean(path));
32
+ if (!binary)
33
+ return null;
34
+ if (runtimeCheck?.binary === binary && now - runtimeCheck.at < RUNTIME_CHECK_TTL_MS) {
35
+ return runtimeCheck.value;
36
+ }
37
+ const failure = missingMachineRuntime(binary, process.env);
38
+ const arch = failure?.arch === 'arm64' || failure?.arch === 'x64' ? failure.arch : null;
39
+ const value = failure && arch
40
+ ? {
41
+ arch,
42
+ dll: failure.dll ?? 'VCRUNTIME140.dll',
43
+ downloadUrl: vcRedistributableUrl(arch),
44
+ detail: `${binary}: ${failure.reason}`,
45
+ }
46
+ : null;
47
+ runtimeCheck = { binary, at: now, value };
48
+ return value;
49
+ }
13
50
  let gpuUnused = null;
14
51
  let outOfMemory = null;
15
52
  /** Record what the latest start of a build found; null clears it. */
@@ -51,14 +88,17 @@ export function llamaBackendHealthView() {
51
88
  // A verdict about a build the process has since moved off (a quarantine
52
89
  // fallback, a lifted quarantine) no longer describes what runs.
53
90
  const unused = gpuUnused && gpuUnused.backend === running ? gpuUnused : null;
91
+ const missingRuntime = readMissingRuntime();
54
92
  return {
55
93
  ...(running ? { running } : {}),
56
94
  ...(cudaBlocker ? { cudaBlocker } : {}),
57
95
  ...(unused ? { gpuUnused: unused } : {}),
96
+ ...(missingRuntime ? { missingRuntime } : {}),
58
97
  ...(outOfMemory ? { outOfMemory } : {}),
59
98
  };
60
99
  }
61
100
  export function __resetLlamaBackendHealthForTest() {
62
101
  gpuUnused = null;
63
102
  outOfMemory = null;
103
+ runtimeCheck = null;
64
104
  }
@@ -24,7 +24,7 @@ import { readGgufSummaryAsync } from './gguf-metadata-async.js';
24
24
  import { effectiveLazyTensorBytes } from './gguf-metadata.js';
25
25
  import { GpuStartupWatch } from './gpu-startup-watch.js';
26
26
  import { isGemmaModel, planLlamaCppKv, resolveLlamaCppKvCacheType, } from './kv-cache-type.js';
27
- import { degradeDenseFfnOffloadDecision, degradeMoeOffloadDecision, estimateExactPerSlotKvBytesF16, estimateKvReserveBytes, estimateWindowedKvLinearization, planDenseFfnOffload, planMoeOffload, } from './offload-planner.js';
27
+ import { degradeDenseFfnOffloadDecision, degradeMoeOffloadDecision, estimateExactPerSlotKvBytesF16, estimateKvReserveBytes, estimateWindowedKvLinearization, planDenseFfnOffload, planMoeOffload, shedSlotsForGpuResidency, } from './offload-planner.js';
28
28
  import { LlamaCppProvider } from './provider.js';
29
29
  import { reasoningLaunchOverridesFromEnv } from './reasoning-launch.js';
30
30
  import { resolveSpecDraft } from './spec-draft.js';
@@ -347,13 +347,6 @@ export async function buildLlamaCppProvider(opts) {
347
347
  // path still clamps to the native train context.
348
348
  const explicitCtx = envNumCtx ?? perModelCtxOverride ?? config.llamaCppNumCtx;
349
349
  const hostFloorTokens = minViableLocalContextTokens();
350
- // A per-model override below the host floor is deliberate user intent —
351
- // lower the admission floor to the override instead of silently raising
352
- // the request back to 64K. Env / machine-wide values keep their
353
- // historical floor semantics.
354
- const minViableTokens = perModelCtxOverride !== undefined && explicitCtx === perModelCtxOverride
355
- ? Math.min(hostFloorTokens, perModelCtxOverride)
356
- : hostFloorTokens;
357
350
  const contextRequirement = resolveLlamaCppContextRequirement({
358
351
  modelContextWindow: modelCatalogInfo?.contextWindow,
359
352
  ...(explicitCtx !== undefined ? { explicitContextWindow: explicitCtx } : {}),
@@ -362,7 +355,7 @@ export async function buildLlamaCppProvider(opts) {
362
355
  ? { manifestContextSize: manifestEngineConfig.contextSize }
363
356
  : {}),
364
357
  contextSizing: config.llamaCppContextSizing ?? 'adaptive',
365
- minViableContextTokens: minViableTokens,
358
+ minViableContextTokens: hostFloorTokens,
366
359
  });
367
360
  // `let`: RAM-aware admission below may lower this (but never below the
368
361
  // model-aware minimum) before anything launch-visible consumes it.
@@ -650,6 +643,10 @@ export async function buildLlamaCppProvider(opts) {
650
643
  // mode. Undefined when the GGUF is unreadable — the pool builder then
651
644
  // falls back to the legacy weights-multiplier reservation.
652
645
  let plannedReservationBytes;
646
+ // What prices that reservation, kept for the out-of-memory ladder: when it
647
+ // drops a slot, the relaunch is charged for the KV it actually allocates.
648
+ let reservationKvFor;
649
+ let reservationResidentBytes;
653
650
  // Graphics memory the MoE offload plan puts on the card. Device admission
654
651
  // charges this rather than the whole card; undefined keeps the old charge.
655
652
  let plannedGpuBytes;
@@ -979,9 +976,9 @@ export async function buildLlamaCppProvider(opts) {
979
976
  ssmConvKernel: summary.ssmConvKernel,
980
977
  kvCacheType,
981
978
  });
982
- const kvReserveBytes = windowedKvPlan
983
- ? Math.round(windowedKvPlan.fixedBytes * slots +
984
- windowedKvPlan.bytesPerToken * effectiveNumCtx * slots)
979
+ const kvReserveFor = (slotCount) => windowedKvPlan
980
+ ? Math.round(windowedKvPlan.fixedBytes * slotCount +
981
+ windowedKvPlan.bytesPerToken * effectiveNumCtx * slotCount)
985
982
  : estimateKvReserveBytes({
986
983
  blockCount: summary.blockCount,
987
984
  embeddingLength: summary.embeddingLength,
@@ -999,43 +996,47 @@ export async function buildLlamaCppProvider(opts) {
999
996
  ssmInnerSize: summary.ssmInnerSize,
1000
997
  ssmStateSize: summary.ssmStateSize,
1001
998
  ssmConvKernel: summary.ssmConvKernel,
1002
- ctxTokens: effectiveNumCtx * slots,
999
+ ctxTokens: effectiveNumCtx * slotCount,
1003
1000
  kvCacheType,
1004
1001
  });
1005
- // The broker-ledger reservation for this launch: resident weights
1006
- // plus the KV the engine will allocate at the granted window (M1 —
1007
- // the weights-only ledger under-reserved dense models whose KV
1008
- // rivals their weights: qwen3.5-4b at 64K carries more KV than
1009
- // parameters). Consumed by the pool builder via
1010
- // `plannedReservationBytes` so co-residency admission can see it.
1011
- if (kvReserveBytes !== undefined) {
1012
- plannedReservationBytes = residentBytes + kvReserveBytes;
1013
- }
1002
+ // Plan against the card as it is now. Sized to the whole card, a plan
1003
+ // counts memory other programs hold: MoE admission then charged the
1004
+ // model the whole card and refused it (2026-10-11), and a dense
1005
+ // 31B planned into 30.3 GiB of a 32 GB card that the desktop and its
1006
+ // apps were already holding ~5 GB of died with a Vulkan out-of-memory
1007
+ // (2026-10-19).
1008
+ const freeGpuBytes = vramBytes > 0 ? await measureAvailableGpuBytes().catch(() => undefined) : undefined;
1009
+ // A lane count the person chose is not the planner's to spend, and
1010
+ // eval runs under GEZEL_LLAMA_NUM_CTX accept the memory consequences.
1011
+ const mayShedSlots = configuredSlots === undefined && envNumCtx === undefined;
1012
+ const placeSlots = (gpuBytes, plan) => mayShedSlots
1013
+ ? shedSlotsForGpuResidency({ slots, vramBytes: gpuBytes, plan })
1014
+ : { slots, decision: plan(slots, gpuBytes), shed: false };
1015
+ let placement;
1014
1016
  if (isMoE) {
1015
- // Plan against the card as it is now. Sized to the whole card, the
1016
- // plan counted memory other programs held, and admission then had
1017
- // to charge the model the whole card and refuse it (2026-10-11).
1018
- const freeGpuBytes = vramBytes > 0 ? await measureAvailableGpuBytes().catch(() => undefined) : undefined;
1019
- const moePlan = planMoeOffload({
1020
- isMoE,
1021
- residentBytes,
1022
- vramBytes: freeGpuBytes !== undefined ? Math.min(vramBytes, freeGpuBytes) : vramBytes,
1023
- ...(split
1024
- ? {
1025
- split,
1026
- ...(summary.blockCount !== undefined ? { blockCount: summary.blockCount } : {}),
1027
- ...(kvReserveBytes !== undefined ? { kvReserveBytes } : {}),
1028
- }
1029
- : {}),
1017
+ placement = placeSlots(freeGpuBytes !== undefined ? Math.min(vramBytes, freeGpuBytes) : vramBytes, (slotCount, gpuBytes) => {
1018
+ const kvReserveBytes = kvReserveFor(slotCount);
1019
+ return planMoeOffload({
1020
+ isMoE,
1021
+ residentBytes,
1022
+ vramBytes: gpuBytes,
1023
+ ...(split
1024
+ ? {
1025
+ split,
1026
+ ...(summary.blockCount !== undefined ? { blockCount: summary.blockCount } : {}),
1027
+ ...(kvReserveBytes !== undefined ? { kvReserveBytes } : {}),
1028
+ }
1029
+ : {}),
1030
+ });
1030
1031
  });
1031
- offloadDecision = moePlan;
1032
+ offloadDecision = placement.decision;
1032
1033
  // An explicit offload setting shadows the planner's flags, so its
1033
1034
  // footprint would describe a launch that is not the one made.
1034
1035
  const plannerPlacesExperts = (config.llamaCppCpuMoe ?? resolvedManifestEngineConfig?.cpuMoe) === undefined &&
1035
1036
  (config.llamaCppNCpuMoe ?? resolvedManifestEngineConfig?.nCpuMoe) === undefined &&
1036
1037
  (config.llamaCppNGpuLayers ?? resolvedManifestEngineConfig?.nGpuLayers) === undefined;
1037
1038
  if (plannerPlacesExperts)
1038
- plannedGpuBytes = moePlan.gpuBytes;
1039
+ plannedGpuBytes = placement.decision.gpuBytes;
1039
1040
  }
1040
1041
  else {
1041
1042
  const explicitNCpuFfn = config.llamaCppNCpuFfn ?? resolvedManifestEngineConfig?.nCpuFfn;
@@ -1044,16 +1045,21 @@ export async function buildLlamaCppProvider(opts) {
1044
1045
  // A finite whole-layer GPU count is a different placement strategy;
1045
1046
  // don't layer an automatic tensor override on top of it. `-1` means
1046
1047
  // all and is compatible with the planner's own attention-on-GPU plan.
1047
- offloadDecision =
1048
- explicitNCpuFfn === undefined &&
1049
- (explicitNGpuLayers === undefined || explicitNGpuLayers === -1)
1050
- ? planDenseFfnOffload({
1048
+ if (explicitNCpuFfn === undefined &&
1049
+ (explicitNGpuLayers === undefined || explicitNGpuLayers === -1)) {
1050
+ placement = placeSlots(
1051
+ // Respect the usable accelerator pool, any explicit capacity
1052
+ // ceiling, co-resident reservations, and what other programs
1053
+ // hold on the card now. The raw probe still gates this to a real
1054
+ // discrete-GPU build rather than treating a CPU/unified fast pool
1055
+ // as VRAM.
1056
+ vramBytes > 0
1057
+ ? Math.max(0, Math.min(budgetBytes - committedOtherBytes, freeGpuBytes ?? Number.POSITIVE_INFINITY))
1058
+ : 0, (slotCount, gpuBytes) => {
1059
+ const kvReserveBytes = kvReserveFor(slotCount);
1060
+ return planDenseFfnOffload({
1051
1061
  isMoE,
1052
- // Respect the usable accelerator pool, any explicit capacity
1053
- // ceiling, and co-resident reservations. The raw probe still
1054
- // gates this to a real discrete-GPU build rather than treating
1055
- // a CPU/unified fast pool as VRAM.
1056
- vramBytes: vramBytes > 0 ? Math.max(0, budgetBytes - committedOtherBytes) : 0,
1062
+ vramBytes: gpuBytes,
1057
1063
  ...(denseFfnSplit ? { split: denseFfnSplit } : {}),
1058
1064
  ...(summary.blockCount !== undefined ? { blockCount: summary.blockCount } : {}),
1059
1065
  ...(kvReserveBytes !== undefined ? { kvReserveBytes } : {}),
@@ -1062,9 +1068,30 @@ export async function buildLlamaCppProvider(opts) {
1062
1068
  ? brokerSnap.pools.ramShareBytes
1063
1069
  : hostCapacity.ramShareBytes,
1064
1070
  freeSystemRamBytes: availableSystemRamBytes(),
1065
- })
1066
- : undefined;
1071
+ });
1072
+ });
1073
+ offloadDecision = placement.decision;
1074
+ }
1075
+ else {
1076
+ offloadDecision = undefined;
1077
+ }
1078
+ }
1079
+ if (placement?.shed) {
1080
+ log.info(`[llama-cpp] ${modelCatalogInfo?.id ?? 'model'}: reducing engine slots ${slots} -> 1 to keep the model on the GPU with room to spare (other programs' graphics memory moves)`);
1081
+ slots = 1;
1082
+ }
1083
+ // The broker-ledger reservation for this launch: resident weights
1084
+ // plus the KV the engine will allocate at the granted window (M1 —
1085
+ // the weights-only ledger under-reserved dense models whose KV
1086
+ // rivals their weights: qwen3.5-4b at 64K carries more KV than
1087
+ // parameters). Consumed by the pool builder via
1088
+ // `plannedReservationBytes` so co-residency admission can see it.
1089
+ const kvReserveBytes = kvReserveFor(slots);
1090
+ if (kvReserveBytes !== undefined) {
1091
+ plannedReservationBytes = residentBytes + kvReserveBytes;
1067
1092
  }
1093
+ reservationKvFor = kvReserveFor;
1094
+ reservationResidentBytes = residentBytes;
1068
1095
  if (offloadDecision?.reason) {
1069
1096
  log.info(`[llama-cpp] offload plan (${modelCatalogInfo?.id ?? 'model'}): ${offloadDecision.reason}`);
1070
1097
  }
@@ -1228,16 +1255,34 @@ export async function buildLlamaCppProvider(opts) {
1228
1255
  gpuWatch?.observe(line);
1229
1256
  providerHolder.current?.onStdoutLine(line);
1230
1257
  },
1231
- // GPU-OOM recovery ladder: when a start dies of VRAM exhaustion and the
1232
- // planner's offload decision was in play, degrade it one step
1233
- // (partial split → all expert/FFN weights to RAM → engine-owned fit) and let the
1234
- // supervisor retry — `resolveLaunch` below re-reads `offloadDecision`
1235
- // on every spawn. The degraded plan sticks for later restarts of this
1236
- // provider, so a recovered engine doesn't re-OOM on its next boot.
1258
+ // GPU-OOM recovery ladder: when a start dies of VRAM exhaustion, first
1259
+ // give back the extra slots' KV (every weight stays on the GPU), then, if
1260
+ // the planner's offload decision was in play, degrade it one step
1261
+ // (partial split → all expert/FFN weights to RAM → engine-owned fit) and
1262
+ // let the supervisor retry — `resolveLaunch` below re-reads `slots` and
1263
+ // `offloadDecision` on every spawn. The degraded plan sticks for later
1264
+ // restarts of this provider, so a recovered engine doesn't re-OOM on its
1265
+ // next boot.
1237
1266
  recoverStartup: ({ panicKind }) => {
1238
1267
  if (panicKind !== 'cuda-out-of-memory' && panicKind !== 'vulkan-out-of-memory') {
1239
1268
  return false;
1240
1269
  }
1270
+ // A full-residency plan has no offload rung below it, so before this a
1271
+ // two-slot launch that missed by one KV allocation failed outright
1272
+ // (2026-10-19, Gemma 4 31B on a 32 GB card). This rung spends one of
1273
+ // the supervisor's two retries; an offload rung still has the other.
1274
+ if (slots > 1 && configuredSlots === undefined) {
1275
+ const from = slots;
1276
+ if (providerHolder.current?.narrowEngineSlots(1)) {
1277
+ slots = 1;
1278
+ const kvReserveBytes = reservationKvFor?.(1);
1279
+ if (kvReserveBytes !== undefined && reservationResidentBytes !== undefined) {
1280
+ plannedReservationBytes = reservationResidentBytes + kvReserveBytes;
1281
+ }
1282
+ log.warn(`[llama-cpp] ${panicKind} while starting ${modelCatalogInfo?.id ?? 'model'} — retrying with one engine slot instead of ${from}`);
1283
+ return true;
1284
+ }
1285
+ }
1241
1286
  // Explicit config/manifest offload settings shadow the planner
1242
1287
  // per-field (see `buildLlamaCppEngineArgs`); when every field the
1243
1288
  // ladder would change is pinned, a retry replays the same argv.
@@ -1274,6 +1319,12 @@ export async function buildLlamaCppProvider(opts) {
1274
1319
  },
1275
1320
  resolveLaunch: async () => {
1276
1321
  gpuWatch = new GpuStartupWatch(binaryBackend);
1322
+ // Again at every launch, not only at build: llama.cpp from the 0.1.51
1323
+ // release refuses a --slot-save-path that does not exist ("not a
1324
+ // directory") and exits before ready, and an eval preflight lost its
1325
+ // build-time directory during a 50 s capacity wait (2026-10-18). The
1326
+ // person saw "no model is installed yet".
1327
+ await mkdirAsync(slotSavePath, { recursive: true }).catch(() => { });
1277
1328
  const port = cachedPort ?? (await pickFreePort());
1278
1329
  cachedPort = port;
1279
1330
  // Prepend the binary's own directory to PATH so the OS finds the
@@ -123,7 +123,7 @@ export declare class LlamaCppCacheAdapter implements EngineCacheAdapter {
123
123
  */
124
124
  private allocationTail;
125
125
  private engineGeneration;
126
- private readonly slotCount;
126
+ private slotCount;
127
127
  private readonly resolveBaseUrl;
128
128
  private readonly resolveAuthToken;
129
129
  private readonly fetchImpl;
@@ -168,6 +168,12 @@ export declare class LlamaCppCacheAdapter implements EngineCacheAdapter {
168
168
  */
169
169
  private slotActionsUnsupported;
170
170
  constructor(opts: LlamaCppCacheAdapterOptions);
171
+ /**
172
+ * Follow an engine relaunched with a different `--parallel` count. Every
173
+ * binding goes with it: a session pinned to a slot the new engine lacks
174
+ * would send an `id_slot` the server rejects.
175
+ */
176
+ setSlotCount(slotCount: number): void;
171
177
  /** The provider survives engine restarts, but its resident slot contents do not. */
172
178
  resetEngineState(): void;
173
179
  /**
@@ -181,6 +181,15 @@ export class LlamaCppCacheAdapter {
181
181
  throw new Error('Invalid llama disk cache budget');
182
182
  this.diskCacheBudgetBytes = budget * 1024 * 1024;
183
183
  }
184
+ /**
185
+ * Follow an engine relaunched with a different `--parallel` count. Every
186
+ * binding goes with it: a session pinned to a slot the new engine lacks
187
+ * would send an `id_slot` the server rejects.
188
+ */
189
+ setSlotCount(slotCount) {
190
+ this.slotCount = Math.max(1, Math.floor(slotCount));
191
+ this.resetEngineState();
192
+ }
184
193
  /** The provider survives engine restarts, but its resident slot contents do not. */
185
194
  resetEngineState() {
186
195
  this.engineGeneration++;
@@ -37,6 +37,8 @@ export interface LlamaDeviceProbe {
37
37
  * means the cached devices describe a machine that no longer exists.
38
38
  */
39
39
  systemRamBytes?: number;
40
+ /** {@link llamaBinaryFingerprint} of the build that answered. */
41
+ binary?: string;
40
42
  }
41
43
  export interface NvidiaRuntimeDevice {
42
44
  index: number;
@@ -75,11 +77,20 @@ export declare function maxGpuVramBytes(devices: LlamaDevice[]): number;
75
77
  * (e.g. "AMD Radeon RX 7900 XTX") in a tier rationale. Pure — unit-tested.
76
78
  */
77
79
  export declare function pickBestGpuDevice(devices: LlamaDevice[]): LlamaDevice | null;
80
+ /**
81
+ * Which build a cached listing came from: its path (the backend) and its
82
+ * size and mtime (the release, since a native update rewrites the files).
83
+ * A listing taken from the CPU build, or from the build an update replaced,
84
+ * said "no GPU" about a 32 GB Radeon and was served for the rest of the day
85
+ * (2026-10-19).
86
+ */
87
+ export declare function llamaBinaryFingerprint(binaryPath: string): string;
78
88
  /**
79
89
  * Probe device memory by running `<binaryPath> --list-devices`, caching
80
90
  * the result. Reads the cache when present (VRAM capacity is stable per
81
- * machine) and the OS still reports the RAM it was probed with; pass
82
- * `force` to re-probe. Any failure (spawn error, no
91
+ * machine), the OS still reports the RAM it was probed with, and the same
92
+ * build answered it; an empty listing is re-asked hourly. Pass `force` to
93
+ * re-probe. Any failure (spawn error, no
83
94
  * cache, unparseable output) resolves to an empty device list — the
84
95
  * planner then simply does nothing and the engine's own `--fit`/`-ngl
85
96
  * auto` takes over. `nowIso` and `systemRamBytes` are injectable for