@bendyline/gezel-inference 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +13 -2
- package/dist/cache/adapter.d.ts +115 -0
- package/dist/cache/adapter.js +23 -0
- package/dist/cache/budget.d.ts +15 -0
- package/dist/cache/budget.js +31 -0
- package/dist/cache/controller.d.ts +205 -0
- package/dist/cache/controller.js +377 -0
- package/dist/catalog/LICENSE +21 -0
- package/dist/catalog/chat-models/bt/btl4-35b-q4/manifest.json +146 -0
- package/dist/catalog/chat-models/bt/btl4-35b-q4/versions/1.0.0/manifest.json +15 -0
- package/dist/catalog/chat-models/bt/btl4-35b-q4/versions/1.0.1/manifest.json +15 -0
- package/dist/catalog/chat-models/bt/btl4-compact-iq2/manifest.json +146 -0
- package/dist/catalog/chat-models/bt/btl4-compact-iq2/versions/1.0.0/manifest.json +15 -0
- package/dist/catalog/chat-models/bt/btl4-compact-iq2/versions/1.0.1/manifest.json +15 -0
- package/dist/catalog/chat-models/bt/btl4-compact-iq2/versions/1.0.2/manifest.json +15 -0
- package/dist/catalog/chat-models/de/deepseek-r1-8b-q4/manifest.json +166 -0
- package/dist/catalog/chat-models/de/deepseek-r1-8b-q4/versions/1.1.0/manifest.json +62 -0
- package/dist/catalog/chat-models/de/deepseek-r1-8b-q4/versions/1.1.1/manifest.json +61 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-mxfp4/manifest.json +125 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-mxfp4/versions/1.0.0/manifest.json +27 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2/manifest.json +125 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2/versions/1.0.0/manifest.json +27 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2/versions/1.1.0/manifest.json +27 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2q4/manifest.json +126 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2q4/versions/1.0.0/manifest.json +27 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q4/manifest.json +318 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q4/versions/1.0.0/manifest.json +225 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q4/versions/1.1.0/manifest.json +225 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/manifest.json +249 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.0.0/manifest.json +70 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.1.0/manifest.json +72 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.1.2/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.1.3/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.2.0/manifest.json +98 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/manifest.json +228 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/versions/1.0.0/manifest.json +72 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/versions/1.0.2/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/versions/1.0.3/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/versions/1.1.0/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/manifest.json +220 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.1.0/manifest.json +75 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.2.0/manifest.json +75 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.2.1/manifest.json +80 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.2.2/manifest.json +80 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.3.0/manifest.json +81 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/manifest.json +226 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.1.0/manifest.json +80 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.1.1/manifest.json +82 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.2.0/manifest.json +82 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.2.1/manifest.json +95 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.2.2/manifest.json +95 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.3.0/manifest.json +86 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/manifest.json +213 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.1.0/manifest.json +67 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.1.2/manifest.json +75 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.2.0/manifest.json +71 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.2.1/manifest.json +71 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.3.0/manifest.json +71 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/manifest.json +205 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.1.0/manifest.json +72 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.1.2/manifest.json +75 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.2.0/manifest.json +76 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.2.1/manifest.json +76 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.3.0/manifest.json +76 -0
- package/dist/catalog/chat-models/gl/glm-5.2-754b-q2/manifest.json +127 -0
- package/dist/catalog/chat-models/gl/glm-5.2-754b-q2/versions/1.0.0/manifest.json +20 -0
- package/dist/catalog/chat-models/gl/glm-5.3-flash-320b-q2/manifest.json +140 -0
- package/dist/catalog/chat-models/gl/glm-5.3-flash-320b-q2/versions/1.0.0/manifest.json +23 -0
- package/dist/catalog/chat-models/gl/glm-5.3-flash-320b-q2/versions/1.0.1/manifest.json +26 -0
- package/dist/catalog/chat-models/gp/gpt-oss-120b-q4/manifest.json +247 -0
- package/dist/catalog/chat-models/gp/gpt-oss-120b-q4/versions/1.0.0/manifest.json +137 -0
- package/dist/catalog/chat-models/gp/gpt-oss-120b-q4/versions/1.1.0/manifest.json +135 -0
- package/dist/catalog/chat-models/gp/gpt-oss-20b-q4/manifest.json +195 -0
- package/dist/catalog/chat-models/gp/gpt-oss-20b-q4/versions/1.1.0/manifest.json +72 -0
- package/dist/catalog/chat-models/gp/gpt-oss-20b-q4/versions/1.1.1/manifest.json +71 -0
- package/dist/catalog/chat-models/gr/granite4.2-30b-q4/manifest.json +200 -0
- package/dist/catalog/chat-models/gr/granite4.2-30b-q4/versions/1.0.0/manifest.json +72 -0
- package/dist/catalog/chat-models/gr/granite4.2-3b-q4/manifest.json +196 -0
- package/dist/catalog/chat-models/gr/granite4.2-3b-q4/versions/1.0.0/manifest.json +57 -0
- package/dist/catalog/chat-models/gr/granite4.2-8b-q4/manifest.json +189 -0
- package/dist/catalog/chat-models/gr/granite4.2-8b-q4/versions/1.0.0/manifest.json +57 -0
- package/dist/catalog/chat-models/index.json +1 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q4/manifest.json +235 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q4/versions/1.0.0/manifest.json +124 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q4/versions/1.0.1/manifest.json +124 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q4/versions/1.0.2/manifest.json +123 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q6/manifest.json +257 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q6/versions/1.0.0/manifest.json +145 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q6/versions/1.0.1/manifest.json +145 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q8/manifest.json +285 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q8/versions/1.0.0/manifest.json +174 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q8/versions/1.0.1/manifest.json +174 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q8/versions/1.0.2/manifest.json +173 -0
- package/dist/catalog/chat-models/lf/lfm2.5-2.6b-q4/manifest.json +162 -0
- package/dist/catalog/chat-models/lf/lfm2.5-2.6b-q4/versions/1.0.0/manifest.json +59 -0
- package/dist/catalog/chat-models/lf/lfm2.5-2.6b-q4/versions/1.0.1/manifest.json +58 -0
- package/dist/catalog/chat-models/ll/llama3.2-3b-q4/manifest.json +134 -0
- package/dist/catalog/chat-models/ll/llama3.2-3b-q4/versions/1.1.0/manifest.json +57 -0
- package/dist/catalog/chat-models/ll/llama3.2-3b-q4/versions/1.1.1/manifest.json +56 -0
- package/dist/catalog/chat-models/mi/minicpm5-1b-q4/manifest.json +156 -0
- package/dist/catalog/chat-models/mi/minicpm5-1b-q4/versions/1.0.0/manifest.json +57 -0
- package/dist/catalog/chat-models/mi/minicpm5-2b-q4/manifest.json +161 -0
- package/dist/catalog/chat-models/mi/minicpm5-2b-q4/versions/1.0.0/manifest.json +57 -0
- package/dist/catalog/chat-models/mi/mistral-7b-q4/manifest.json +159 -0
- package/dist/catalog/chat-models/mi/mistral-7b-q4/versions/1.1.0/manifest.json +62 -0
- package/dist/catalog/chat-models/mi/mistral-7b-q4/versions/1.1.1/manifest.json +61 -0
- package/dist/catalog/chat-models/mi/mistral-medium-3.5-128b-q4/manifest.json +275 -0
- package/dist/catalog/chat-models/mi/mistral-medium-3.5-128b-q4/versions/1.0.0/manifest.json +154 -0
- package/dist/catalog/chat-models/mi/mistral-medium-3.5-128b-q4/versions/1.0.1/manifest.json +153 -0
- package/dist/catalog/chat-models/mu/muse-glimmer-30b-q4/manifest.json +135 -0
- package/dist/catalog/chat-models/mu/muse-glimmer-30b-q4/versions/1.0.0/manifest.json +20 -0
- package/dist/catalog/chat-models/mu/muse-glimmer-30b-q4/versions/1.0.1/manifest.json +20 -0
- package/dist/catalog/chat-models/mu/muse-glimmer-30b-q4/versions/1.0.2/manifest.json +20 -0
- package/dist/catalog/chat-models/na/nanbeige4.2-3b-q4/manifest.json +138 -0
- package/dist/catalog/chat-models/na/nanbeige4.2-3b-q4/versions/1.0.0/manifest.json +14 -0
- package/dist/catalog/chat-models/ne/nemotron3-nano-30b-q4/manifest.json +212 -0
- package/dist/catalog/chat-models/ne/nemotron3-nano-30b-q4/versions/1.0.0/manifest.json +94 -0
- package/dist/catalog/chat-models/ne/nemotron3-nano-30b-q4/versions/1.0.1/manifest.json +94 -0
- package/dist/catalog/chat-models/ne/nemotron3-nano-30b-q4/versions/1.0.2/manifest.json +93 -0
- package/dist/catalog/chat-models/ne/nemotron3-super-120b-q4/manifest.json +135 -0
- package/dist/catalog/chat-models/ne/nemotron3-super-120b-q4/versions/1.0.0/manifest.json +30 -0
- package/dist/catalog/chat-models/ne/nemotron3-super-120b-q4/versions/1.0.1/manifest.json +30 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q4/manifest.json +192 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q4/versions/1.0.0/manifest.json +74 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q4/versions/1.0.1/manifest.json +73 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q8/manifest.json +207 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q8/versions/1.0.0/manifest.json +89 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q8/versions/1.0.1/manifest.json +88 -0
- package/dist/catalog/chat-models/or/ornith-35b-q4/manifest.json +224 -0
- package/dist/catalog/chat-models/or/ornith-35b-q4/versions/1.0.0/manifest.json +94 -0
- package/dist/catalog/chat-models/or/ornith-35b-q4/versions/1.0.1/manifest.json +93 -0
- package/dist/catalog/chat-models/or/ornith-35b-q8/manifest.json +244 -0
- package/dist/catalog/chat-models/or/ornith-35b-q8/versions/1.0.0/manifest.json +114 -0
- package/dist/catalog/chat-models/or/ornith-35b-q8/versions/1.0.1/manifest.json +113 -0
- package/dist/catalog/chat-models/or/ornith-9b-q4/manifest.json +215 -0
- package/dist/catalog/chat-models/or/ornith-9b-q4/versions/1.0.0/manifest.json +84 -0
- package/dist/catalog/chat-models/or/ornith-9b-q4/versions/1.0.1/manifest.json +83 -0
- package/dist/catalog/chat-models/or/ornith1.5-35b-a3b-q4/manifest.json +208 -0
- package/dist/catalog/chat-models/or/ornith1.5-35b-a3b-q4/versions/1.0.0/manifest.json +74 -0
- package/dist/catalog/chat-models/or/ornith1.5-35b-a3b-q8/manifest.json +223 -0
- package/dist/catalog/chat-models/or/ornith1.5-35b-a3b-q8/versions/1.0.0/manifest.json +89 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q4/manifest.json +187 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q4/versions/1.0.0/manifest.json +53 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q4/versions/1.0.1/manifest.json +77 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q8/manifest.json +192 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q8/versions/1.0.0/manifest.json +58 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q8/versions/1.0.1/manifest.json +82 -0
- package/dist/catalog/chat-models/qw/qwen3.5-0.8b-q4/manifest.json +192 -0
- package/dist/catalog/chat-models/qw/qwen3.5-0.8b-q4/versions/1.0.0/manifest.json +75 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/manifest.json +315 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/versions/1.0.0/manifest.json +164 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/versions/1.0.1/manifest.json +164 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/versions/1.0.2/manifest.json +164 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/versions/1.0.3/manifest.json +163 -0
- package/dist/catalog/chat-models/qw/qwen3.5-27b-q4/manifest.json +217 -0
- package/dist/catalog/chat-models/qw/qwen3.5-27b-q4/versions/1.0.0/manifest.json +90 -0
- package/dist/catalog/chat-models/qw/qwen3.5-2b-q4/manifest.json +194 -0
- package/dist/catalog/chat-models/qw/qwen3.5-2b-q4/versions/1.1.0/manifest.json +77 -0
- package/dist/catalog/chat-models/qw/qwen3.5-2b-q4/versions/1.1.2/manifest.json +76 -0
- package/dist/catalog/chat-models/qw/qwen3.5-2b-q4/versions/1.1.3/manifest.json +76 -0
- package/dist/catalog/chat-models/qw/qwen3.5-4b-q4/manifest.json +188 -0
- package/dist/catalog/chat-models/qw/qwen3.5-4b-q4/versions/1.1.0/manifest.json +77 -0
- package/dist/catalog/chat-models/qw/qwen3.5-4b-q4/versions/1.1.2/manifest.json +76 -0
- package/dist/catalog/chat-models/qw/qwen3.5-4b-q4/versions/1.1.3/manifest.json +76 -0
- package/dist/catalog/chat-models/qw/qwen3.5-9b-q4/manifest.json +205 -0
- package/dist/catalog/chat-models/qw/qwen3.5-9b-q4/versions/1.1.0/manifest.json +82 -0
- package/dist/catalog/chat-models/qw/qwen3.5-9b-q4/versions/1.1.2/manifest.json +81 -0
- package/dist/catalog/chat-models/qw/qwen3.5-9b-q4/versions/1.1.3/manifest.json +81 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/manifest.json +230 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/versions/1.1.0/manifest.json +92 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/versions/1.1.4/manifest.json +91 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/versions/1.1.5/manifest.json +91 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/versions/1.1.6/manifest.json +115 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/manifest.json +240 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/versions/1.0.0/manifest.json +102 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/versions/1.0.2/manifest.json +103 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/versions/1.0.3/manifest.json +103 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/versions/1.0.4/manifest.json +127 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/manifest.json +233 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/versions/1.0.0/manifest.json +92 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/versions/1.0.1/manifest.json +93 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/versions/1.0.2/manifest.json +93 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/versions/1.0.3/manifest.json +117 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/manifest.json +252 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/versions/1.0.0/manifest.json +112 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/versions/1.0.1/manifest.json +113 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/versions/1.0.2/manifest.json +113 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/versions/1.0.3/manifest.json +137 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-iq1-s/manifest.json +195 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-iq1-s/versions/1.0.0/manifest.json +19 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q2/manifest.json +194 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q2/versions/1.0.0/manifest.json +19 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q3/manifest.json +194 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q3/versions/1.0.0/manifest.json +19 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q3/versions/1.0.1/manifest.json +19 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/manifest.json +291 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.0/manifest.json +20 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.1/manifest.json +93 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.2/manifest.json +92 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.3/manifest.json +116 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.4/manifest.json +116 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.5/manifest.json +116 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/manifest.json +278 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/versions/1.0.0/manifest.json +20 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/versions/1.0.1/manifest.json +104 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/versions/1.0.2/manifest.json +103 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/versions/1.0.3/manifest.json +127 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q8/manifest.json +278 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q8/versions/1.0.0/manifest.json +113 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q8/versions/1.0.1/manifest.json +113 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q8/versions/1.0.2/manifest.json +137 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq3/manifest.json +221 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq3/versions/1.0.0/manifest.json +36 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq4/manifest.json +429 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq4/versions/1.0.0/manifest.json +36 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq4/versions/1.1.0/manifest.json +205 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq4/versions/1.1.1/manifest.json +244 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-q2/manifest.json +203 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-q2/versions/1.0.0/manifest.json +21 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-q2/versions/1.0.1/manifest.json +31 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-q2/versions/1.0.2/manifest.json +30 -0
- package/dist/catalog/chat-models/raw-index.json +1 -0
- package/dist/catalog/chat-models/ta/talkie-1930-13b-q4/manifest.json +79 -0
- package/dist/catalog/chat-models/ta/talkie-1930-13b-q4/versions/1.0.0/manifest.json +15 -0
- package/dist/catalog/chat-models/ta/talkie-1930-13b-q4/versions/1.0.1/manifest.json +15 -0
- package/dist/catalog/chat-models/te/ternary-bonsai-27b-q2/manifest.json +204 -0
- package/dist/catalog/chat-models/te/ternary-bonsai-27b-q2/versions/1.0.0/manifest.json +70 -0
- package/dist/catalog/chat-models/te/ternary-bonsai-27b-q2/versions/1.0.1/manifest.json +70 -0
- package/dist/catalog/chat-models/un/underdog-saluki-27b-iq2-mix/manifest.json +164 -0
- package/dist/catalog/chat-models/un/underdog-saluki-27b-iq2-mix/versions/1.0.0/manifest.json +14 -0
- package/dist/catalog/knowledge-catalogs/be/bendyline-how-to-books/manifest.json +26 -0
- package/dist/catalog/knowledge-catalogs/be/bendyline-how-to-books/versions/2026.10.8/manifest.json +8950 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-alaska-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-alaska-part-0001/versions/2026.10.1/manifest.json +658 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-nevada-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-nevada-part-0001/versions/2026.10.1/manifest.json +666 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-us-300-399-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-us-300-399-part-0001/versions/2026.10.2/manifest.json +182 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-us-347-349/manifest.json +25 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-us-347-349/versions/2026.10.5/manifest.json +38 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-utah-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-utah-part-0001/versions/2026.10.1/manifest.json +558 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-utah-part-0002/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-utah-part-0002/versions/2026.10.1/manifest.json +258 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0001/versions/2026.10.1/manifest.json +318 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0002/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0002/versions/2026.10.1/manifest.json +266 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0003/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0003/versions/2026.10.1/manifest.json +186 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0004/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0004/versions/2026.10.1/manifest.json +138 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0005/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0005/versions/2026.10.1/manifest.json +138 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-wyoming-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-wyoming-part-0001/versions/2026.10.3/manifest.json +626 -0
- package/dist/catalog/knowledge-catalogs/index.json +1 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-aspnet-core-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-aspnet-core-en/versions/2026.10.16/manifest.json +18270 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-ai-platform-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-ai-platform-en/versions/2026.10.16/manifest.json +1098 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-apps-compute-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-apps-compute-en/versions/2026.10.16/manifest.json +722 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-data-aiot-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-data-aiot-en/versions/2026.10.16/manifest.json +530 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-management-hybrid-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-management-hybrid-en/versions/2026.10.16/manifest.json +602 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-network-security-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-network-security-en/versions/2026.10.16/manifest.json +250 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-dotnet-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-dotnet-en/versions/2026.10.16/manifest.json +16794 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-entity-framework-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-entity-framework-en/versions/2026.10.16/manifest.json +1106 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-microsoft-365-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-microsoft-365-en/versions/2026.10.16/manifest.json +234 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-powershell-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-powershell-en/versions/2026.10.16/manifest.json +522 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-sql-server-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-sql-server-en/versions/2026.10.16/manifest.json +1850 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-windows-apps-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-windows-apps-en/versions/2026.10.16/manifest.json +1734 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-windows-server-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-windows-server-en/versions/2026.10.16/manifest.json +774 -0
- package/dist/catalog/knowledge-catalogs/raw-index.json +1 -0
- package/dist/catalog/knowledge-catalogs/re/regional-american-south/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-american-south/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-american-south/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-american-south/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-andes-amazon/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-andes-amazon/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-andes-amazon/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-andes-amazon/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-australia-nz/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-australia-nz/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-australia-nz/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-australia-nz/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-brazil/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-brazil/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-brazil/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-brazil/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-britain-ireland/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-britain-ireland/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-britain-ireland/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-britain-ireland/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-california-southwest/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-california-southwest/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-california-southwest/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-california-southwest/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-canada-alaska/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-canada-alaska/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-canada-alaska/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-canada-alaska/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-central-eastern-europe/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-central-eastern-europe/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-central-eastern-europe/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-central-eastern-europe/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-asia/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-asia/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-asia/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-asia/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-southern-africa/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-southern-africa/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-southern-africa/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-southern-africa/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mediterranean/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mediterranean/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mediterranean/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mediterranean/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mexico-central-america/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mexico-central-america/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mexico-central-america/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mexico-central-america/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-middle-east/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-middle-east/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-middle-east/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-middle-east/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-midwest/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-midwest/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-midwest/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-midwest/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-north-africa/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-north-africa/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-north-africa/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-north-africa/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northeast/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northeast/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northeast/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northeast/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-eurasia/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-eurasia/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-eurasia/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-eurasia/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-europe/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-europe/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-europe/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-europe/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-islands/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-islands/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-islands/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-islands/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-northwest/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-northwest/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-northwest/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-northwest/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-rockies-plains/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-rockies-plains/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-rockies-plains/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-rockies-plains/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-south-asia/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-south-asia/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-south-asia/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-south-asia/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southeast-asia/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southeast-asia/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southeast-asia/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southeast-asia/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southern-cone/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southern-cone/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southern-cone/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southern-cone/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-west-central-africa/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-west-central-africa/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-west-central-africa/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-west-central-africa/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-western-europe/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-western-europe/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-western-europe/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-western-europe/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/manifest.json +28 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/versions/2026.4.2/manifest.json +53 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/versions/2026.4.3/manifest.json +885 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/versions/2026.4.5/manifest.json +157 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/art.json +11 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/manifest.json +32 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/versions/2026.4.2/manifest.json +69 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/versions/2026.4.3/manifest.json +741 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/versions/2026.4.5/manifest.json +173 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/manifest.json +69 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/versions/2026.4.4/manifest.json +217 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/versions/2026.4.5/manifest.json +217 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/manifest.json +64 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/versions/2026.4.4/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/versions/2026.4.5/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/manifest.json +64 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/versions/2026.4.5/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/art.json +11 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/versions/2026.4.3/manifest.json +925 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/versions/2026.4.5/manifest.json +185 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/manifest.json +28 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/versions/2026.4.2/manifest.json +53 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/versions/2026.4.3/manifest.json +1665 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/versions/2026.4.5/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/versions/2026.4.3/manifest.json +1233 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/versions/2026.4.5/manifest.json +141 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/art.json +11 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/versions/2026.4.3/manifest.json +493 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/versions/2026.4.5/manifest.json +185 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/manifest.json +63 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/versions/2026.4.4/manifest.json +193 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/versions/2026.4.5/manifest.json +193 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/manifest.json +30 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/versions/2026.4.2/manifest.json +61 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/versions/2026.4.3/manifest.json +665 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/versions/2026.4.5/manifest.json +177 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/versions/2026.4.3/manifest.json +745 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/versions/2026.4.5/manifest.json +185 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/manifest.json +62 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/versions/2026.4.4/manifest.json +189 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/versions/2026.4.5/manifest.json +189 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/manifest.json +64 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/versions/2026.4.5/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/manifest.json +64 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/versions/2026.4.4/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/versions/2026.4.5/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/manifest.json +30 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/versions/2026.4.2/manifest.json +61 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/versions/2026.4.3/manifest.json +1253 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/versions/2026.4.5/manifest.json +189 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/versions/2026.4.3/manifest.json +1957 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/versions/2026.4.5/manifest.json +185 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/manifest.json +63 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/versions/2026.4.5/manifest.json +193 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/art.json +11 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/manifest.json +45 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/versions/2026.4.4/manifest.json +121 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/versions/2026.4.5/manifest.json +173 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/manifest.json +62 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/versions/2026.4.4/manifest.json +189 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/versions/2026.4.5/manifest.json +189 -0
- package/dist/catalog/provenance.json +8 -0
- package/dist/chat/catalog-model-lookup.d.ts +21 -0
- package/dist/chat/catalog-model-lookup.js +48 -0
- package/dist/chat/local-model-tier.d.ts +1 -0
- package/dist/chat/local-model-tier.js +2 -0
- package/dist/chat/vision-capability.d.ts +1 -0
- package/dist/chat/vision-capability.js +3 -0
- package/dist/engine-components.d.ts +30 -0
- package/dist/engine-components.js +144 -0
- package/dist/engines/electron-native-reuse.d.ts +65 -0
- package/dist/engines/electron-native-reuse.js +305 -0
- package/dist/engines/native-file-manifest.json +1320 -0
- package/dist/engines/native-manifest.d.ts +70 -0
- package/dist/engines/native-manifest.js +98 -0
- package/dist/engines/registry.d.ts +88 -0
- package/dist/engines/registry.js +217 -0
- package/dist/engines/resolver.d.ts +121 -0
- package/dist/engines/resolver.js +894 -0
- package/dist/engines/signature.d.ts +85 -0
- package/dist/engines/signature.js +231 -0
- package/dist/fs/atomic.d.ts +53 -0
- package/dist/fs/atomic.js +202 -0
- package/dist/fs/config-store.d.ts +14 -0
- package/dist/fs/config-store.js +101 -0
- package/dist/fs/home-permissions.d.ts +18 -0
- package/dist/fs/home-permissions.js +27 -0
- package/dist/fs/safe-paths.d.ts +107 -0
- package/dist/fs/safe-paths.js +264 -0
- package/dist/fs/security-json.d.ts +13 -0
- package/dist/fs/security-json.js +67 -0
- package/dist/http/auth-context.d.ts +23 -0
- package/dist/http/auth-context.js +1 -0
- package/dist/http/engine-runtime-context.d.ts +30 -0
- package/dist/http/engine-runtime-context.js +1 -0
- package/dist/http/external-conversation-contract.d.ts +49 -0
- package/dist/http/external-conversation-contract.js +1 -0
- package/dist/http/external-conversation-headers.d.ts +11 -0
- package/dist/http/external-conversation-headers.js +11 -0
- package/dist/http/inference-context.d.ts +36 -0
- package/dist/http/inference-context.js +1 -0
- package/dist/http/model-inventory-cache.d.ts +8 -0
- package/dist/http/model-inventory-cache.js +8 -0
- package/dist/http/openai-compat/action-ledger.d.ts +15 -0
- package/dist/http/openai-compat/action-ledger.js +119 -0
- package/dist/http/openai-compat/apple-model.d.ts +3 -0
- package/dist/http/openai-compat/apple-model.js +44 -0
- package/dist/http/openai-compat/caller-owned-profile.d.ts +7 -0
- package/dist/http/openai-compat/caller-owned-profile.js +18 -0
- package/dist/http/openai-compat/chat-progress.d.ts +9 -0
- package/dist/http/openai-compat/chat-progress.js +69 -0
- package/dist/http/openai-compat/chat-target.d.ts +76 -0
- package/dist/http/openai-compat/chat-target.js +97 -0
- package/dist/http/openai-compat/embeddings.d.ts +37 -0
- package/dist/http/openai-compat/embeddings.js +86 -0
- package/dist/http/openai-compat/request-tuning.d.ts +35 -0
- package/dist/http/openai-compat/request-tuning.js +87 -0
- package/dist/http/openai-compat/responses-streaming.d.ts +351 -0
- package/dist/http/openai-compat/responses-streaming.js +717 -0
- package/dist/http/openai-compat/responses-translate.d.ts +215 -0
- package/dist/http/openai-compat/responses-translate.js +377 -0
- package/dist/http/openai-compat/streaming-telemetry.d.ts +30 -0
- package/dist/http/openai-compat/streaming-telemetry.js +88 -0
- package/dist/http/openai-compat/streaming.d.ts +141 -0
- package/dist/http/openai-compat/streaming.js +687 -0
- package/dist/http/openai-compat/tool-call-stream-filter.d.ts +33 -0
- package/dist/http/openai-compat/tool-call-stream-filter.js +110 -0
- package/dist/http/openai-compat/translate.d.ts +254 -0
- package/dist/http/openai-compat/translate.js +485 -0
- package/dist/http/routes/engines.d.ts +13 -0
- package/dist/http/routes/engines.js +366 -0
- package/dist/http/routes/machine-engine-proxy.d.ts +26 -0
- package/dist/http/routes/machine-engine-proxy.js +43 -0
- package/dist/http/routes/model-bundles.d.ts +4 -0
- package/dist/http/routes/model-bundles.js +190 -0
- package/dist/http/routes/v1-chat.d.ts +72 -0
- package/dist/http/routes/v1-chat.js +645 -0
- package/dist/http/routes/v1-embeddings.d.ts +3 -0
- package/dist/http/routes/v1-embeddings.js +82 -0
- package/dist/http/routes/v1-knowledge.d.ts +4 -0
- package/dist/http/routes/v1-knowledge.js +304 -0
- package/dist/http/routes/v1-models-ensure.d.ts +32 -0
- package/dist/http/routes/v1-models-ensure.js +122 -0
- package/dist/http/routes/v1-models.d.ts +8 -0
- package/dist/http/routes/v1-models.js +189 -0
- package/dist/http/routes/v1-responses.d.ts +20 -0
- package/dist/http/routes/v1-responses.js +327 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/inference-service.d.ts +28 -0
- package/dist/inference-service.js +275 -0
- package/dist/knowledge/admission.d.ts +3 -0
- package/dist/knowledge/admission.js +22 -0
- package/dist/knowledge/bundled-catalog.d.ts +2 -0
- package/dist/knowledge/bundled-catalog.js +2 -0
- package/dist/knowledge/catalog-host.d.ts +103 -0
- package/dist/knowledge/catalog-host.js +180 -0
- package/dist/knowledge/catalog-source.d.ts +22 -0
- package/dist/knowledge/catalog-source.js +35 -0
- package/dist/knowledge/install.d.ts +55 -0
- package/dist/knowledge/install.js +274 -0
- package/dist/knowledge/manager.d.ts +287 -0
- package/dist/knowledge/manager.js +1540 -0
- package/dist/knowledge/registry.d.ts +35 -0
- package/dist/knowledge/registry.js +123 -0
- package/dist/knowledge/search-worker.d.ts +17 -0
- package/dist/knowledge/search-worker.js +36 -0
- package/dist/knowledge/shared-install-contract.d.ts +19 -0
- package/dist/knowledge/shared-install-contract.js +1 -0
- package/dist/knowledge/spatial-query.d.ts +11 -0
- package/dist/knowledge/spatial-query.js +33 -0
- package/dist/knowledge/trust-anchors.d.ts +11 -0
- package/dist/knowledge/trust-anchors.js +51 -0
- package/dist/knowledge/vector-floors.d.ts +44 -0
- package/dist/knowledge/vector-floors.js +92 -0
- package/dist/knowledge/worker-host.d.ts +9 -0
- package/dist/knowledge/worker-host.js +179 -0
- package/dist/kokoro-lexicon/LICENSE +202 -0
- package/dist/kokoro-lexicon/lexicon-gb-en.txt.gz +0 -0
- package/dist/kokoro-lexicon/lexicon-us-en.txt.gz +0 -0
- package/dist/kokoro-lexicon/manifest.json +23 -0
- package/dist/machine-engine/inspect-runtime.d.ts +3 -0
- package/dist/machine-engine/inspect-runtime.js +48 -0
- package/dist/machine-engine/knowledge-assets.d.ts +79 -0
- package/dist/machine-engine/knowledge-assets.js +505 -0
- package/dist/memory/embed-core.d.ts +131 -0
- package/dist/memory/embed-core.js +398 -0
- package/dist/memory/embed-worker.d.ts +23 -0
- package/dist/memory/embed-worker.js +49 -0
- package/dist/memory/embeddings.d.ts +105 -0
- package/dist/memory/embeddings.js +467 -0
- package/dist/model-profile/behaviors/tools-mlx-template-fix.d.ts +1 -0
- package/dist/model-profile/behaviors/tools-mlx-template-fix.js +2 -0
- package/dist/model-profile/behaviors/turn-ramble-detection.d.ts +1 -0
- package/dist/model-profile/behaviors/turn-ramble-detection.js +2 -0
- package/dist/model-profile/defaults.d.ts +1 -0
- package/dist/model-profile/defaults.js +2 -0
- package/dist/model-profile/index.d.ts +9 -0
- package/dist/model-profile/index.js +7 -0
- package/dist/model-profile/registry.d.ts +15 -0
- package/dist/model-profile/registry.js +18 -0
- package/dist/model-profile/runtime.d.ts +48 -0
- package/dist/model-profile/runtime.js +131 -0
- package/dist/model-profile/tool-grammar.d.ts +1 -0
- package/dist/model-profile/tool-grammar.js +2 -0
- package/dist/model-profile/tuning.d.ts +19 -0
- package/dist/model-profile/tuning.js +21 -0
- package/dist/model-profile/types.d.ts +1 -0
- package/dist/model-profile/types.js +2 -0
- package/dist/models/bundle-storage.d.ts +28 -0
- package/dist/models/bundle-storage.js +80 -0
- package/dist/models/catalog-drift.d.ts +48 -0
- package/dist/models/catalog-drift.js +94 -0
- package/dist/models/catalog-payload-identity.d.ts +107 -0
- package/dist/models/catalog-payload-identity.js +254 -0
- package/dist/models/ensure.d.ts +125 -0
- package/dist/models/ensure.js +205 -0
- package/dist/models/gezmodel.d.ts +47 -0
- package/dist/models/gezmodel.js +742 -0
- package/dist/models/install-registry.d.ts +101 -0
- package/dist/models/install-registry.js +216 -0
- package/dist/models/model-id.d.ts +22 -0
- package/dist/models/model-id.js +40 -0
- package/dist/models/storage-roots.d.ts +274 -0
- package/dist/models/storage-roots.js +865 -0
- package/dist/native-release-entry.d.ts +16 -0
- package/dist/native-release-entry.js +16 -0
- package/dist/perf/redact-path.d.ts +2 -0
- package/dist/perf/redact-path.js +27 -0
- package/dist/perf/responsiveness.d.ts +70 -0
- package/dist/perf/responsiveness.js +560 -0
- package/dist/providers/active-install-message.d.ts +42 -0
- package/dist/providers/active-install-message.js +49 -0
- package/dist/providers/apple-foundation-models/binary.d.ts +4 -0
- package/dist/providers/apple-foundation-models/binary.js +18 -0
- package/dist/providers/apple-foundation-models/helper.d.ts +66 -0
- package/dist/providers/apple-foundation-models/helper.js +262 -0
- package/dist/providers/apple-foundation-models/provider.d.ts +82 -0
- package/dist/providers/apple-foundation-models/provider.js +389 -0
- package/dist/providers/apple-foundation-models/status.d.ts +9 -0
- package/dist/providers/apple-foundation-models/status.js +49 -0
- package/dist/providers/audio/kokoro-frontend.d.ts +50 -0
- package/dist/providers/audio/kokoro-frontend.js +113 -0
- package/dist/providers/audio/managed-speech-model.d.ts +9 -0
- package/dist/providers/audio/managed-speech-model.js +86 -0
- package/dist/providers/audio/types.d.ts +202 -0
- package/dist/providers/audio/types.js +17 -0
- package/dist/providers/audio/whisper-cpp.d.ts +99 -0
- package/dist/providers/audio/whisper-cpp.js +420 -0
- package/dist/providers/audio-persister-contract.d.ts +13 -0
- package/dist/providers/audio-persister-contract.js +1 -0
- package/dist/providers/catalog-model-config.d.ts +63 -0
- package/dist/providers/catalog-model-config.js +95 -0
- package/dist/providers/code-block-salvage.d.ts +1 -0
- package/dist/providers/code-block-salvage.js +2 -0
- package/dist/providers/codex-cli/reasoning.d.ts +8 -0
- package/dist/providers/codex-cli/reasoning.js +17 -0
- package/dist/providers/complete-tool-call.d.ts +16 -0
- package/dist/providers/complete-tool-call.js +25 -0
- package/dist/providers/constrained-turn.d.ts +1 -0
- package/dist/providers/constrained-turn.js +2 -0
- package/dist/providers/deliverable-read-pacing.d.ts +1 -0
- package/dist/providers/deliverable-read-pacing.js +2 -0
- package/dist/providers/direct-file-work-prompt.d.ts +1 -0
- package/dist/providers/direct-file-work-prompt.js +2 -0
- package/dist/providers/ds4/build-provider.d.ts +100 -0
- package/dist/providers/ds4/build-provider.js +539 -0
- package/dist/providers/ds4/cache-adapter.d.ts +42 -0
- package/dist/providers/ds4/cache-adapter.js +110 -0
- package/dist/providers/ds4/dspark.d.ts +83 -0
- package/dist/providers/ds4/dspark.js +107 -0
- package/dist/providers/ds4/mtp.d.ts +32 -0
- package/dist/providers/ds4/mtp.js +46 -0
- package/dist/providers/ds4/provider.d.ts +67 -0
- package/dist/providers/ds4/provider.js +104 -0
- package/dist/providers/ds4/residency.d.ts +143 -0
- package/dist/providers/ds4/residency.js +139 -0
- package/dist/providers/ds4/stdout-parser.d.ts +47 -0
- package/dist/providers/ds4/stdout-parser.js +134 -0
- package/dist/providers/duplicate-tool-calls.d.ts +1 -0
- package/dist/providers/duplicate-tool-calls.js +2 -0
- package/dist/providers/file-repair-policy.d.ts +1 -0
- package/dist/providers/file-repair-policy.js +2 -0
- package/dist/providers/gpu-arbiter.d.ts +159 -0
- package/dist/providers/gpu-arbiter.js +301 -0
- package/dist/providers/image-persister-contract.d.ts +15 -0
- package/dist/providers/image-persister-contract.js +1 -0
- package/dist/providers/llama-cpp/build-metadata.d.ts +13 -0
- package/dist/providers/llama-cpp/build-metadata.js +39 -0
- package/dist/providers/llama-cpp/build-provider.d.ts +66 -0
- package/dist/providers/llama-cpp/build-provider.js +1491 -0
- package/dist/providers/llama-cpp/cache-adapter.d.ts +242 -0
- package/dist/providers/llama-cpp/cache-adapter.js +689 -0
- package/dist/providers/llama-cpp/devices.d.ts +130 -0
- package/dist/providers/llama-cpp/devices.js +256 -0
- package/dist/providers/llama-cpp/disk-cache.d.ts +8 -0
- package/dist/providers/llama-cpp/disk-cache.js +112 -0
- package/dist/providers/llama-cpp/engine-flags.d.ts +181 -0
- package/dist/providers/llama-cpp/engine-flags.js +279 -0
- package/dist/providers/llama-cpp/gguf-metadata-async.d.ts +11 -0
- package/dist/providers/llama-cpp/gguf-metadata-async.js +180 -0
- package/dist/providers/llama-cpp/gguf-metadata-worker.d.ts +7 -0
- package/dist/providers/llama-cpp/gguf-metadata-worker.js +27 -0
- package/dist/providers/llama-cpp/gguf-metadata.d.ts +198 -0
- package/dist/providers/llama-cpp/gguf-metadata.js +615 -0
- package/dist/providers/llama-cpp/gguf-quantization-backfill.d.ts +32 -0
- package/dist/providers/llama-cpp/gguf-quantization-backfill.js +75 -0
- package/dist/providers/llama-cpp/index.d.ts +10 -0
- package/dist/providers/llama-cpp/index.js +13 -0
- package/dist/providers/llama-cpp/kv-cache-type.d.ts +118 -0
- package/dist/providers/llama-cpp/kv-cache-type.js +140 -0
- package/dist/providers/llama-cpp/log.d.ts +92 -0
- package/dist/providers/llama-cpp/log.js +280 -0
- package/dist/providers/llama-cpp/models.d.ts +389 -0
- package/dist/providers/llama-cpp/models.js +1011 -0
- package/dist/providers/llama-cpp/offload-planner.d.ts +339 -0
- package/dist/providers/llama-cpp/offload-planner.js +524 -0
- package/dist/providers/llama-cpp/provider.d.ts +493 -0
- package/dist/providers/llama-cpp/provider.js +862 -0
- package/dist/providers/llama-cpp/reasoning-launch.d.ts +7 -0
- package/dist/providers/llama-cpp/reasoning-launch.js +14 -0
- package/dist/providers/llama-cpp/spec-draft.d.ts +44 -0
- package/dist/providers/llama-cpp/spec-draft.js +44 -0
- package/dist/providers/llama-cpp/stdout-parser.d.ts +70 -0
- package/dist/providers/llama-cpp/stdout-parser.js +197 -0
- package/dist/providers/local-tool-call-salvage.d.ts +1 -0
- package/dist/providers/local-tool-call-salvage.js +2 -0
- package/dist/providers/local-turn-policy.d.ts +1 -0
- package/dist/providers/local-turn-policy.js +2 -0
- package/dist/providers/mlx/async-file-handoff.d.ts +11 -0
- package/dist/providers/mlx/async-file-handoff.js +25 -0
- package/dist/providers/mlx/build-provider.d.ts +65 -0
- package/dist/providers/mlx/build-provider.js +717 -0
- package/dist/providers/mlx/cache-adapter.d.ts +161 -0
- package/dist/providers/mlx/cache-adapter.js +445 -0
- package/dist/providers/mlx/chat-protocol.d.ts +48 -0
- package/dist/providers/mlx/chat-protocol.js +8 -0
- package/dist/providers/mlx/config-parser.d.ts +29 -0
- package/dist/providers/mlx/config-parser.js +81 -0
- package/dist/providers/mlx/engine-gate.d.ts +51 -0
- package/dist/providers/mlx/engine-gate.js +207 -0
- package/dist/providers/mlx/engine-hold.d.ts +41 -0
- package/dist/providers/mlx/engine-hold.js +59 -0
- package/dist/providers/mlx/engine-log-router.d.ts +84 -0
- package/dist/providers/mlx/engine-log-router.js +137 -0
- package/dist/providers/mlx/engine-stats-sampler.d.ts +36 -0
- package/dist/providers/mlx/engine-stats-sampler.js +59 -0
- package/dist/providers/mlx/index.d.ts +10 -0
- package/dist/providers/mlx/index.js +10 -0
- package/dist/providers/mlx/log.d.ts +55 -0
- package/dist/providers/mlx/log.js +157 -0
- package/dist/providers/mlx/model-geometry.d.ts +35 -0
- package/dist/providers/mlx/model-geometry.js +118 -0
- package/dist/providers/mlx/models.d.ts +289 -0
- package/dist/providers/mlx/models.js +1079 -0
- package/dist/providers/mlx/provider.d.ts +404 -0
- package/dist/providers/mlx/provider.js +3017 -0
- package/dist/providers/mlx/python/cache_persist.py +348 -0
- package/dist/providers/mlx/python/cache_seed.py +402 -0
- package/dist/providers/mlx/python/gezel_mlx_server.py +4491 -0
- package/dist/providers/mlx/python/lfm2_compat.py +55 -0
- package/dist/providers/mlx/python/qwen3_5_text_compat.py +60 -0
- package/dist/providers/mlx/python/qwen4_ple.py +159 -0
- package/dist/providers/mlx/python/spec_decode.py +775 -0
- package/dist/providers/mlx/python/template_stability.py +133 -0
- package/dist/providers/mlx/python/think_budget.py +113 -0
- package/dist/providers/mlx/python/tool_args_json.py +297 -0
- package/dist/providers/mlx/python/tool_call_stream.py +265 -0
- package/dist/providers/mlx/python/tool_grammar.py +794 -0
- package/dist/providers/mlx/python/vision_inputs.py +64 -0
- package/dist/providers/mlx/python/wave_policy.py +147 -0
- package/dist/providers/mlx/reasoning-stream.d.ts +85 -0
- package/dist/providers/mlx/reasoning-stream.js +196 -0
- package/dist/providers/mlx/request-shape.d.ts +34 -0
- package/dist/providers/mlx/request-shape.js +42 -0
- package/dist/providers/mlx/runtime-diagnostics.d.ts +29 -0
- package/dist/providers/mlx/runtime-diagnostics.js +162 -0
- package/dist/providers/mlx/spec-drafter.d.ts +25 -0
- package/dist/providers/mlx/spec-drafter.js +73 -0
- package/dist/providers/mlx/stdout-parser.d.ts +60 -0
- package/dist/providers/mlx/stdout-parser.js +254 -0
- package/dist/providers/mlx/textual-tool-call-salvage.d.ts +46 -0
- package/dist/providers/mlx/textual-tool-call-salvage.js +396 -0
- package/dist/providers/mlx/tool-call-protocol.d.ts +65 -0
- package/dist/providers/mlx/tool-call-protocol.js +140 -0
- package/dist/providers/mlx/tool-call-stripper.d.ts +68 -0
- package/dist/providers/mlx/tool-call-stripper.js +153 -0
- package/dist/providers/mlx/tool-image-retention.d.ts +23 -0
- package/dist/providers/mlx/tool-image-retention.js +43 -0
- package/dist/providers/mlx/turn-telemetry.d.ts +22 -0
- package/dist/providers/mlx/turn-telemetry.js +45 -0
- package/dist/providers/mlx/venv.d.ts +91 -0
- package/dist/providers/mlx/venv.js +111 -0
- package/dist/providers/mlx/vision-mode.d.ts +92 -0
- package/dist/providers/mlx/vision-mode.js +187 -0
- package/dist/providers/mlx/vision.d.ts +2 -0
- package/dist/providers/mlx/vision.js +12 -0
- package/dist/providers/mlx/wire-transcript.d.ts +14 -0
- package/dist/providers/mlx/wire-transcript.js +43 -0
- package/dist/providers/native/capacity-broker.d.ts +812 -0
- package/dist/providers/native/capacity-broker.js +1058 -0
- package/dist/providers/native/capacity-budget.d.ts +133 -0
- package/dist/providers/native/capacity-budget.js +265 -0
- package/dist/providers/native/device-capacity-ledger.d.ts +31 -0
- package/dist/providers/native/device-capacity-ledger.js +196 -0
- package/dist/providers/native/device-capacity.d.ts +84 -0
- package/dist/providers/native/device-capacity.js +431 -0
- package/dist/providers/native/engine-api-key.d.ts +57 -0
- package/dist/providers/native/engine-api-key.js +72 -0
- package/dist/providers/native/engine-key.d.ts +18 -0
- package/dist/providers/native/engine-key.js +41 -0
- package/dist/providers/native/engine-router.d.ts +145 -0
- package/dist/providers/native/engine-router.js +191 -0
- package/dist/providers/native/gpu-panic-guard.d.ts +54 -0
- package/dist/providers/native/gpu-panic-guard.js +59 -0
- package/dist/providers/native/inference.d.ts +33 -0
- package/dist/providers/native/inference.js +49 -0
- package/dist/providers/native/local-engine-runtime.d.ts +412 -0
- package/dist/providers/native/local-engine-runtime.js +1714 -0
- package/dist/providers/native/measured-budget.d.ts +32 -0
- package/dist/providers/native/measured-budget.js +54 -0
- package/dist/providers/native/port.d.ts +11 -0
- package/dist/providers/native/port.js +29 -0
- package/dist/providers/native/provider-pool.d.ts +474 -0
- package/dist/providers/native/provider-pool.js +1166 -0
- package/dist/providers/native/supervisor.d.ts +503 -0
- package/dist/providers/native/supervisor.js +1466 -0
- package/dist/providers/observation-context.d.ts +16 -0
- package/dist/providers/observation-context.js +1 -0
- package/dist/providers/openai-compatible/sse.d.ts +1 -0
- package/dist/providers/openai-compatible/sse.js +2 -0
- package/dist/providers/patient-fetch.d.ts +36 -0
- package/dist/providers/patient-fetch.js +44 -0
- package/dist/providers/project-macro-loop-bail.d.ts +7 -0
- package/dist/providers/project-macro-loop-bail.js +21 -0
- package/dist/providers/prose-document-salvage.d.ts +1 -0
- package/dist/providers/prose-document-salvage.js +2 -0
- package/dist/providers/provider-disposal.d.ts +1 -0
- package/dist/providers/provider-disposal.js +2 -0
- package/dist/providers/queue.d.ts +15 -0
- package/dist/providers/queue.js +23 -0
- package/dist/providers/ramble-abort-message.d.ts +1 -0
- package/dist/providers/ramble-abort-message.js +2 -0
- package/dist/providers/ramble-detector.d.ts +1 -0
- package/dist/providers/ramble-detector.js +2 -0
- package/dist/providers/reasoning-depth.d.ts +1 -0
- package/dist/providers/reasoning-depth.js +2 -0
- package/dist/providers/required-input-reads.d.ts +1 -0
- package/dist/providers/required-input-reads.js +2 -0
- package/dist/providers/session-defaults.d.ts +13 -0
- package/dist/providers/session-defaults.js +49 -0
- package/dist/providers/session-hooks.d.ts +26 -0
- package/dist/providers/session-hooks.js +1 -0
- package/dist/providers/streaming-session.d.ts +1 -0
- package/dist/providers/streaming-session.js +2 -0
- package/dist/providers/terminal-tool-policy.d.ts +1 -0
- package/dist/providers/terminal-tool-policy.js +2 -0
- package/dist/providers/tool-arg-schema-coercion.d.ts +1 -0
- package/dist/providers/tool-arg-schema-coercion.js +2 -0
- package/dist/providers/tool-executor.d.ts +12 -0
- package/dist/providers/tool-executor.js +20 -0
- package/dist/providers/tool-failure-tracker.d.ts +1 -0
- package/dist/providers/tool-failure-tracker.js +2 -0
- package/dist/providers/tool-repeat-tracker.d.ts +1 -0
- package/dist/providers/tool-repeat-tracker.js +2 -0
- package/dist/providers/turn-timeout.d.ts +1 -0
- package/dist/providers/turn-timeout.js +1 -0
- package/dist/providers/types.d.ts +834 -0
- package/dist/providers/types.js +42 -0
- package/dist/providers/usage-builder.d.ts +1 -0
- package/dist/providers/usage-builder.js +2 -0
- package/dist/providers/vision-capability.d.ts +109 -0
- package/dist/providers/vision-capability.js +137 -0
- package/dist/python/mlx-runtime-status-bus.d.ts +39 -0
- package/dist/python/mlx-runtime-status-bus.js +27 -0
- package/dist/python/uv-runtime.d.ts +176 -0
- package/dist/python/uv-runtime.js +492 -0
- package/dist/relevance/install.d.ts +28 -0
- package/dist/relevance/install.js +114 -0
- package/dist/relevance/manager.d.ts +79 -0
- package/dist/relevance/manager.js +211 -0
- package/dist/relevance/registry.d.ts +11 -0
- package/dist/relevance/registry.js +158 -0
- package/dist/relevance/relevance-core.d.ts +67 -0
- package/dist/relevance/relevance-core.js +189 -0
- package/dist/relevance/relevance-model.d.ts +42 -0
- package/dist/relevance/relevance-model.js +292 -0
- package/dist/relevance/relevance-worker.d.ts +20 -0
- package/dist/relevance/relevance-worker.js +57 -0
- package/dist/relevance/settings.d.ts +30 -0
- package/dist/relevance/settings.js +81 -0
- package/dist/remotes/identity.d.ts +121 -0
- package/dist/remotes/identity.js +348 -0
- package/dist/remotes/pinned-fetch.d.ts +45 -0
- package/dist/remotes/pinned-fetch.js +193 -0
- package/dist/remotes/types.d.ts +54 -0
- package/dist/remotes/types.js +1 -0
- package/dist/runtime-lock.d.ts +29 -0
- package/dist/runtime-lock.js +85 -0
- package/dist/search/relevance-stage.d.ts +81 -0
- package/dist/search/relevance-stage.js +177 -0
- package/dist/secrets/types.d.ts +63 -0
- package/dist/secrets/types.js +64 -0
- package/dist/speech.d.ts +1 -0
- package/dist/speech.js +1 -0
- package/dist/system/darwin-memory.d.ts +26 -0
- package/dist/system/darwin-memory.js +81 -0
- package/dist/system/gezel-process-memory.d.ts +55 -0
- package/dist/system/gezel-process-memory.js +156 -0
- package/dist/system/memory.d.ts +154 -0
- package/dist/system/memory.js +501 -0
- package/dist/transformers-cache.d.ts +112 -0
- package/dist/transformers-cache.js +392 -0
- package/dist/utils/disk-space.d.ts +55 -0
- package/dist/utils/disk-space.js +72 -0
- package/dist/utils/download-common.d.ts +138 -0
- package/dist/utils/download-common.js +196 -0
- package/dist/utils/download-with-retry.d.ts +85 -0
- package/dist/utils/download-with-retry.js +522 -0
- package/dist/utils/extract-zip.d.ts +22 -0
- package/dist/utils/extract-zip.js +103 -0
- package/dist/utils/retire-model-worker.d.ts +15 -0
- package/dist/utils/retire-model-worker.js +24 -0
- package/dist/utils/service-worker-entry.d.ts +59 -0
- package/dist/utils/service-worker-entry.js +69 -0
- package/dist/utils/xet-download.d.ts +40 -0
- package/dist/utils/xet-download.js +526 -0
- package/dist/utils/xet.d.ts +86 -0
- package/dist/utils/xet.js +201 -0
- package/package.json +103 -3
- package/scripts/embedding-packaging.cjs +264 -0
- package/scripts/embedding-packaging.d.cts +16 -0
|
@@ -0,0 +1,717 @@
|
|
|
1
|
+
import { join } from 'node:path';
|
|
2
|
+
import { DEFAULT_LOCAL_ENGINE_IDLE_TIMEOUT_MS, createLogger, } from '@bendyline/gezel';
|
|
3
|
+
import { gezelPaths } from '@bendyline/gezel/paths';
|
|
4
|
+
import { noModelYetMessage, notReadyError } from '../active-install-message.js';
|
|
5
|
+
import { estimateExactPerSlotKvBytesF16 } from '../llama-cpp/offload-planner.js';
|
|
6
|
+
import { CapacityDeniedError, NOT_ENOUGH_MEMORY_MESSAGE, availableSystemRamBytes, formatContextCapacityDenial, minViableLocalContextTokens, pressureIdleGraceMs, resolveLocalContextRequirement, } from '../native/capacity-broker.js';
|
|
7
|
+
import { pickFreePort } from '../native/port.js';
|
|
8
|
+
import { NativeEngineSupervisor } from '../native/supervisor.js';
|
|
9
|
+
import { patientFetch } from '../patient-fetch.js';
|
|
10
|
+
import { nativeVisionPreferenceFor } from '../vision-capability.js';
|
|
11
|
+
import { readMlxModelGeometry } from './model-geometry.js';
|
|
12
|
+
import { MlxProvider } from './provider.js';
|
|
13
|
+
import { templateOpensReasoning } from './reasoning-stream.js';
|
|
14
|
+
import { drafterDirFor, resolveSpecDrafter } from './spec-drafter.js';
|
|
15
|
+
import { MLX_DEFAULT_PACKAGE_SPEC, MLX_VENV_NAME, mlxVenvPackages } from './venv.js';
|
|
16
|
+
import { MlxVisionMode, mlxCacheFingerprint, resolveMlxVisionPolicy } from './vision-mode.js';
|
|
17
|
+
import { hasMlxVisionTower } from './vision.js';
|
|
18
|
+
const log = createLogger('chat');
|
|
19
|
+
/**
|
|
20
|
+
* MLX does not receive a fixed-context launch flag: its KV cache grows with
|
|
21
|
+
* the request up to the model architecture's native limit. Consequently the
|
|
22
|
+
* catalog context window — not an arbitrary prefill-performance target — is
|
|
23
|
+
* the correct denominator for overflow checks, compaction, tool-output caps,
|
|
24
|
+
* and user-facing context warnings. An explicit operator limit still wins,
|
|
25
|
+
* clamped to the model's native maximum. Manual model paths have no catalog
|
|
26
|
+
* metadata, so they fall back to the host's context floor (64K, or 32K on a
|
|
27
|
+
* memory-constrained machine).
|
|
28
|
+
*/
|
|
29
|
+
export function resolveMlxEffectiveNumCtx(opts) {
|
|
30
|
+
return resolveLocalContextRequirement({
|
|
31
|
+
modelContextWindow: opts.modelContextWindow,
|
|
32
|
+
requestedContextWindow: opts.configuredLimit ?? opts.modelContextWindow,
|
|
33
|
+
...(opts.minViableContextTokens !== undefined
|
|
34
|
+
? { minViableContextTokens: opts.minViableContextTokens }
|
|
35
|
+
: {}),
|
|
36
|
+
}).requestedPerTurnCtxTokens;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Construct an `MlxProvider` honoring env vars, config, and the
|
|
40
|
+
* UvRuntime bootstrap. Resolution order for the wire target:
|
|
41
|
+
*
|
|
42
|
+
* 1. `GEZEL_MLX_SERVER_URL` / `config.mlxBaseUrl` — external wire mode,
|
|
43
|
+
* no subprocess. Mirrors llama-cpp's external-baseUrl branch.
|
|
44
|
+
* 2. A supervised `mlx_lm.server` subprocess launched from the MLX
|
|
45
|
+
* venv UvRuntime manages. Requires:
|
|
46
|
+
* - Apple Silicon (darwin-arm64). Other platforms → actionable
|
|
47
|
+
* error pointing the user at llama-cpp.
|
|
48
|
+
* - A UvRuntime instance on `ChatManager` (see `ChatManagerOptions`).
|
|
49
|
+
* - An installed MLX model directory — via `mlxModels` catalog
|
|
50
|
+
* manager or `config.mlxModelPath` env/config override.
|
|
51
|
+
* 3. Any of those missing → actionable error the Settings UI can
|
|
52
|
+
* surface with a clear "install a model / switch Python runtime"
|
|
53
|
+
* affordance.
|
|
54
|
+
*
|
|
55
|
+
* Unlike buildLlamaCppProvider, we must ensure the Python venv + mlx-lm
|
|
56
|
+
* package are provisioned BEFORE the supervisor spawns — the child
|
|
57
|
+
* launch command is the venv's `mlx_lm.server` console script. That's
|
|
58
|
+
* an `await uvRuntime.ensureVenv(...)` on the cold path, which can
|
|
59
|
+
* take minutes on first install. Subsequent boots are a no-op.
|
|
60
|
+
*/
|
|
61
|
+
export async function buildMlxProvider(opts) {
|
|
62
|
+
const { config, affinity, store } = opts;
|
|
63
|
+
const externalBaseUrl = opts.modelOverride
|
|
64
|
+
? undefined
|
|
65
|
+
: (process.env.GEZEL_MLX_SERVER_URL ?? config.mlxBaseUrl);
|
|
66
|
+
const defaultModelId = opts.modelOverride?.modelId ?? config.defaultModel?.mlx;
|
|
67
|
+
const concurrency = config.providerConcurrency?.mlx;
|
|
68
|
+
// Batched-inference sizing (mlxSlots / mlxBatchMaxConcurrency) and the
|
|
69
|
+
// in-engine cache budget are computed below, AFTER the model size, effective
|
|
70
|
+
// context window, and KV dtype resolve — a memory-aware slot ceiling needs
|
|
71
|
+
// all three. Sizing concurrency here (pre-resolve) from a model-blind default
|
|
72
|
+
// alone is what let a 27B model open a width-4 engine gate and abort Metal.
|
|
73
|
+
// Per-model context override (Settings → Local models → Context size…)
|
|
74
|
+
// wins over the machine-wide mlxNumCtx cap for the model being launched.
|
|
75
|
+
const perModelCtxOverride = defaultModelId
|
|
76
|
+
? config.modelContextOverrides?.[`mlx:${defaultModelId}`]
|
|
77
|
+
: undefined;
|
|
78
|
+
const numCtx = perModelCtxOverride ?? config.mlxNumCtx;
|
|
79
|
+
const baseProviderOpts = {
|
|
80
|
+
// Both the supervised subprocess and the external-baseUrl branch talk
|
|
81
|
+
// to an MLX server that can spend many minutes in prefill before its
|
|
82
|
+
// first byte. Node's global fetch cuts that at 5 minutes via undici's
|
|
83
|
+
// defaults — well inside the 595–900s pre-first-byte budgets this
|
|
84
|
+
// provider computes for large prompts, and surfaced as if the engine
|
|
85
|
+
// had died. See patient-fetch.ts.
|
|
86
|
+
fetchImpl: patientFetch(),
|
|
87
|
+
...(defaultModelId ? { defaultModel: defaultModelId } : {}),
|
|
88
|
+
...(concurrency ? { concurrency } : {}),
|
|
89
|
+
...(affinity !== undefined ? { affinity } : {}),
|
|
90
|
+
...(numCtx ? { numCtx } : {}),
|
|
91
|
+
};
|
|
92
|
+
if (externalBaseUrl) {
|
|
93
|
+
return new MlxProvider({ baseUrl: externalBaseUrl, ...baseProviderOpts });
|
|
94
|
+
}
|
|
95
|
+
// ── Platform gate ──
|
|
96
|
+
// MLX has no CPU / CUDA / Vulkan path — if we're not on darwin-arm64,
|
|
97
|
+
// the model can't load even if mlx-lm is somehow installed.
|
|
98
|
+
if (process.platform !== 'darwin' || process.arch !== 'arm64') {
|
|
99
|
+
const err = new Error('MLX runs on Apple Silicon Macs only. Switch to llama in Settings → On-device (llama).');
|
|
100
|
+
err.isActionable = true;
|
|
101
|
+
throw err;
|
|
102
|
+
}
|
|
103
|
+
if (!opts.uvRuntime) {
|
|
104
|
+
const err = new Error('MLX provider: Python runtime not configured. Open Settings → On-device (MLX) and ensure Python or uv is available.');
|
|
105
|
+
err.isActionable = true;
|
|
106
|
+
throw err;
|
|
107
|
+
}
|
|
108
|
+
// Model dir: explicit config/env wins; otherwise pick the first
|
|
109
|
+
// catalog-installed MLX model. Pool-driven path (`modelOverride`
|
|
110
|
+
// set) skips env/config override — caller already decided which
|
|
111
|
+
// modelId to load — and refuses to fall back to a different
|
|
112
|
+
// installed model if `resolveModel(modelId)` misses.
|
|
113
|
+
const explicitPath = opts.modelOverride
|
|
114
|
+
? undefined
|
|
115
|
+
: (process.env.GEZEL_MLX_MODEL ?? config.mlxModelPath);
|
|
116
|
+
let modelDir = explicitPath;
|
|
117
|
+
let modelCatalogInfo = null;
|
|
118
|
+
if (!modelDir && opts.mlxModels) {
|
|
119
|
+
if (defaultModelId) {
|
|
120
|
+
modelCatalogInfo = await opts.mlxModels.resolveModel(defaultModelId);
|
|
121
|
+
}
|
|
122
|
+
if (!modelCatalogInfo && !opts.modelOverride) {
|
|
123
|
+
modelCatalogInfo = await opts.mlxModels.resolveDefaultModel();
|
|
124
|
+
}
|
|
125
|
+
if (modelCatalogInfo)
|
|
126
|
+
modelDir = modelCatalogInfo.modelDir;
|
|
127
|
+
}
|
|
128
|
+
if (!modelDir) {
|
|
129
|
+
// Distinguish "a specific model is selected but isn't installed" from
|
|
130
|
+
// "nothing is downloaded at all". The former is a stale selection — a
|
|
131
|
+
// model ID saved in config (or pinned on the session) that no longer
|
|
132
|
+
// maps to an installed model, e.g. after the model was deleted or the
|
|
133
|
+
// catalog ID changed. Naming the ID tells the user exactly which saved
|
|
134
|
+
// selection to fix rather than implying nothing is downloaded.
|
|
135
|
+
// See the llama.cpp twin: a first run downloads a multi-gigabyte model and
|
|
136
|
+
// the user chats while waiting. Say what is happening rather than telling
|
|
137
|
+
// them to start a download that is already running.
|
|
138
|
+
const activeInstall = () => opts.mlxModels?.getActiveInstalls().find((i) => i.phase !== undefined) ?? null;
|
|
139
|
+
if (defaultModelId && !modelCatalogInfo) {
|
|
140
|
+
const installed = opts.mlxModels ? await opts.mlxModels.listInstalled() : [];
|
|
141
|
+
if (installed.length > 0) {
|
|
142
|
+
const err = new Error(`Apple MLX: the selected model "${defaultModelId}" is no longer available. ` +
|
|
143
|
+
`Pick a local model in Settings → This Mac (${installed
|
|
144
|
+
.map((m) => m.id)
|
|
145
|
+
.join(', ')}), or download "${defaultModelId}" again.`);
|
|
146
|
+
err.isActionable = true;
|
|
147
|
+
throw err;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
throw notReadyError(noModelYetMessage('Apple MLX', activeInstall()), 'model-not-ready');
|
|
151
|
+
}
|
|
152
|
+
// Text-only until a request carries pixels — see vision-mode.ts for why the
|
|
153
|
+
// vision tower is not simply loaded whenever the checkpoint has one.
|
|
154
|
+
const visionMode = new MlxVisionMode(resolveMlxVisionPolicy({
|
|
155
|
+
preference: nativeVisionPreferenceFor(config.nativeVision, modelCatalogInfo?.id ?? defaultModelId),
|
|
156
|
+
hasVisionTower: await hasMlxVisionTower(modelDir),
|
|
157
|
+
}), modelCatalogInfo?.id ?? defaultModelId ?? modelDir);
|
|
158
|
+
// A per-model override below the host floor is deliberate user intent —
|
|
159
|
+
// lower the floor to the override instead of silently raising the request
|
|
160
|
+
// back to 64K. The machine-wide mlxNumCtx keeps its historical semantics.
|
|
161
|
+
const mlxContextFloor = perModelCtxOverride !== undefined
|
|
162
|
+
? Math.min(minViableLocalContextTokens(), perModelCtxOverride)
|
|
163
|
+
: minViableLocalContextTokens();
|
|
164
|
+
let effectiveNumCtx = resolveMlxEffectiveNumCtx({
|
|
165
|
+
...(modelCatalogInfo?.contextWindow
|
|
166
|
+
? { modelContextWindow: modelCatalogInfo.contextWindow }
|
|
167
|
+
: {}),
|
|
168
|
+
...(numCtx ? { configuredLimit: numCtx } : {}),
|
|
169
|
+
minViableContextTokens: mlxContextFloor,
|
|
170
|
+
});
|
|
171
|
+
// Ensure the mlx venv + mlx-vlm package exist. We use `mlx-vlm`
|
|
172
|
+
// (not `mlx-lm`) as the backend because our "This Mac" catalog is
|
|
173
|
+
// anchored on Gemma 4 E-series, a vision-language-audio model
|
|
174
|
+
// whose weights ship wrapped in a `language_model.*` / `vision_tower.*`
|
|
175
|
+
// namespace. mlx_lm's text-only loader rejects that wrapper; mlx_vlm
|
|
176
|
+
// handles it natively and also serves the same OpenAI-compatible
|
|
177
|
+
// `/v1/chat/completions` endpoint for text-only chat. The venv spec
|
|
178
|
+
// (name + package list, including the `torch`/`torchvision` pins) is
|
|
179
|
+
// centralized in `mlx/venv.ts` so this lazy first-chat path and the
|
|
180
|
+
// parallel warm fired at model-install time request an identical
|
|
181
|
+
// list — `ensureVenv`'s fast-path keys on the package set, so any
|
|
182
|
+
// drift would make this call reinstall instead of hitting the warmed
|
|
183
|
+
// venv. `config.mlxPackageSpec` lets advanced users override the pin
|
|
184
|
+
// in Settings → This Mac → Advanced.
|
|
185
|
+
const mlxPackageSpec = config.mlxPackageSpec ?? MLX_DEFAULT_PACKAGE_SPEC;
|
|
186
|
+
// Publish provisioning status so the UI pill can show "MLX warming
|
|
187
|
+
// up" while uv resolves + installs torch / mlx-vlm wheels (1–5 min on
|
|
188
|
+
// first install). On the common path the install-time warm has
|
|
189
|
+
// already finished, so `ensureVenv` returns near-instantly via its
|
|
190
|
+
// manifest fast-path; we still flip to 'provisioning' briefly so the
|
|
191
|
+
// pill updates correctly if the venv was deleted out from under us.
|
|
192
|
+
opts.mlxRuntimeStatus?.publish({
|
|
193
|
+
phase: 'provisioning',
|
|
194
|
+
message: `Installing ${mlxPackageSpec} + torch wheels (one-time, ~1–5 min)…`,
|
|
195
|
+
});
|
|
196
|
+
let venv;
|
|
197
|
+
try {
|
|
198
|
+
venv = await opts.uvRuntime.ensureVenv({
|
|
199
|
+
name: MLX_VENV_NAME,
|
|
200
|
+
packages: mlxVenvPackages(config.mlxPackageSpec),
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
catch (err) {
|
|
204
|
+
opts.mlxRuntimeStatus?.publish({
|
|
205
|
+
phase: 'error',
|
|
206
|
+
error: err instanceof Error ? err.message : String(err),
|
|
207
|
+
});
|
|
208
|
+
throw err;
|
|
209
|
+
}
|
|
210
|
+
opts.mlxRuntimeStatus?.publish({
|
|
211
|
+
phase: 'ready',
|
|
212
|
+
message: `Python ${venv.pythonVersion ?? '?'} via ${venv.source}`,
|
|
213
|
+
});
|
|
214
|
+
// Persist a read-only snapshot of the resolved Python runtime so the
|
|
215
|
+
// Settings UI can show it without re-probing.
|
|
216
|
+
await store
|
|
217
|
+
.writeConfig({
|
|
218
|
+
pythonRuntime: {
|
|
219
|
+
source: venv.source,
|
|
220
|
+
...(venv.pythonVersion ? { pythonVersion: venv.pythonVersion } : {}),
|
|
221
|
+
...(venv.uvVersion ? { uvVersion: venv.uvVersion } : {}),
|
|
222
|
+
installerPath: venv.venvRoot,
|
|
223
|
+
resolvedAt: new Date().toISOString(),
|
|
224
|
+
},
|
|
225
|
+
})
|
|
226
|
+
.catch(() => { });
|
|
227
|
+
// We spawn our own wrapped server (`gezel_mlx_server.py`, Phase 2)
|
|
228
|
+
// instead of upstream `mlx_vlm.server`. The wrapper:
|
|
229
|
+
// - Owns the prompt-cache lifecycle (preserves cache across
|
|
230
|
+
// requests when a `cache_id` is supplied — upstream clears every
|
|
231
|
+
// stream's cache in its `finally`, forcing full re-prefill per
|
|
232
|
+
// turn).
|
|
233
|
+
// - Exposes `/v1/cache/{stats,evict,warm}` for the
|
|
234
|
+
// SessionCacheController to manage warm sessions.
|
|
235
|
+
// - Reuses mlx-vlm as a *library* (model loading, chat templating,
|
|
236
|
+
// PromptCacheState, stream_generate) — no reimplementation of
|
|
237
|
+
// anything that's stable upstream.
|
|
238
|
+
// The Python file is copied alongside dist/ at build time (see
|
|
239
|
+
// tsup.config.ts); `pythonServerPath` resolves it relative to this
|
|
240
|
+
// bundle so dev and packaged modes both work without env wiring.
|
|
241
|
+
//
|
|
242
|
+
// The bundle layout is one of:
|
|
243
|
+
// - `dist/index.js` → embedded import via package main
|
|
244
|
+
// - `dist/bin/gezeld.js` → CLI/daemon entrypoint
|
|
245
|
+
// - `<root>/packages/service/src/chat/manager.ts` (raw-source, dev)
|
|
246
|
+
// In all three the python file lands at `dist/providers/mlx/python/...`
|
|
247
|
+
// (tsup's `publicDir` copies it once into the dist root). We walk up
|
|
248
|
+
// from the current module's directory looking for the providers tree
|
|
249
|
+
// so the resolution is bundle-shape-agnostic — without this, the
|
|
250
|
+
// `dist/bin/` path fails because the loop would otherwise just take
|
|
251
|
+
// `<distDir>/providers/...` and miss the up-one-level case.
|
|
252
|
+
const { fileURLToPath } = await import('node:url');
|
|
253
|
+
const { existsSync: existsSyncForPy } = await import('node:fs');
|
|
254
|
+
const pythonServerPath = (() => {
|
|
255
|
+
const here = fileURLToPath(import.meta.url);
|
|
256
|
+
const startDir = here.replace(/[\\/][^\\/]+$/, '');
|
|
257
|
+
// Try the current dir, then walk up to the dist root. Cap at 4
|
|
258
|
+
// levels (dist/bin is the deepest case in practice; dev raw-source
|
|
259
|
+
// would never look here anyway because evals always run from dist).
|
|
260
|
+
let dir = startDir;
|
|
261
|
+
for (let i = 0; i < 4; i++) {
|
|
262
|
+
const candidate = join(dir, 'providers', 'mlx', 'python', 'gezel_mlx_server.py');
|
|
263
|
+
if (existsSyncForPy(candidate))
|
|
264
|
+
return candidate;
|
|
265
|
+
const parent = dir.replace(/[\\/][^\\/]+$/, '');
|
|
266
|
+
if (parent === dir)
|
|
267
|
+
break;
|
|
268
|
+
dir = parent;
|
|
269
|
+
}
|
|
270
|
+
throw new Error(`gezel_mlx_server.py not found relative to ${startDir}. Build output may be corrupt — try \`pnpm --filter @bendyline/gezel-service build\` and verify dist/providers/mlx/python/gezel_mlx_server.py exists.`);
|
|
271
|
+
})();
|
|
272
|
+
const venvPython = venv.binPath('python');
|
|
273
|
+
// KV cache quantization. **Opt-in only.** Originally defaulted to 4 bits but
|
|
274
|
+
// backed out after `RotatingKVCache Quantization NYI` crashed mid-prefill on
|
|
275
|
+
// a session whose prompt approached the model's context limit. That class
|
|
276
|
+
// now implements `to_quantized` upstream, and `maybe_quantize_kv_cache`
|
|
277
|
+
// skips any layer still lacking it rather than raising — so the crash is
|
|
278
|
+
// gone, but so is any signal that a layer went unquantized.
|
|
279
|
+
//
|
|
280
|
+
// Which is the whole difficulty: quantization lands on the SERIAL path only.
|
|
281
|
+
// mlx-lm's BatchGenerator builds `BatchKVCache` layers, which have no
|
|
282
|
+
// `to_quantized` and are silently skipped. Planning KV at q8 while the
|
|
283
|
+
// engine runs f16 would under-reserve by ~45%, and an MLX overcommit is not
|
|
284
|
+
// a soft failure — a Metal command-buffer OOM SIGABRTs the whole process.
|
|
285
|
+
//
|
|
286
|
+
// So the flags always go to the engine (a wave that collapses to serial
|
|
287
|
+
// still gets the saving, which only ever over-reserves), while PLANNING
|
|
288
|
+
// always prices KV at f16. Every slot the engine owns is a slot the
|
|
289
|
+
// BatchGenerator may batch across, so there is no configuration in which the
|
|
290
|
+
// q8 discount is safe to plan against — and under-reserving here is the
|
|
291
|
+
// failure that SIGABRTs the whole python process.
|
|
292
|
+
const kvBits = config.mlxKvBits ?? 0;
|
|
293
|
+
const kvQuantArgs = kvBits > 0 ? ['--kv-bits', String(kvBits), '--kv-quant-scheme', 'uniform'] : [];
|
|
294
|
+
// Speculative decoding is on whenever a drafter for this model exists
|
|
295
|
+
// (see spec-drafter.ts). Resolved before the memory figures because a
|
|
296
|
+
// drafter is a second resident model: leaving its ~0.8 GB out of the
|
|
297
|
+
// weights term is the over-commit that aborts the python process.
|
|
298
|
+
const specDrafter = resolveSpecDrafter({
|
|
299
|
+
...(modelDir ? { modelDir } : {}),
|
|
300
|
+
configuredPath: config.mlxSpecDraftModelPath ?? null,
|
|
301
|
+
enabled: config.mlxSpeculativeDecoding ?? null,
|
|
302
|
+
});
|
|
303
|
+
// ── MTP speculative decoding ──
|
|
304
|
+
// Arms the sidecar's spec wave. Every safety lives sidecar-side — the
|
|
305
|
+
// capability probe, the mlx-vlm >= 0.6.17 exactness gate, per-request
|
|
306
|
+
// routing (greedy vs the processed/positioned assisted path), `[spec]`
|
|
307
|
+
// fingerprints — so an incompatible drafter degrades to normal serving
|
|
308
|
+
// with a logged reason, never a launch failure.
|
|
309
|
+
const specArgs = specDrafter
|
|
310
|
+
? [
|
|
311
|
+
'--spec-draft-model',
|
|
312
|
+
specDrafter.dir,
|
|
313
|
+
...(config.mlxSpecBlockSize ? ['--spec-block-size', String(config.mlxSpecBlockSize)] : []),
|
|
314
|
+
]
|
|
315
|
+
: [];
|
|
316
|
+
if (specDrafter) {
|
|
317
|
+
log.info(`[mlx] speculative decoding armed (${specDrafter.source}): ${specDrafter.dir} ` +
|
|
318
|
+
`(+${Math.round(specDrafter.bytes / 1024 ** 2)}MB resident, priced into the memory plan)`);
|
|
319
|
+
}
|
|
320
|
+
else if (modelDir && config.mlxSpeculativeDecoding !== false) {
|
|
321
|
+
// Default-on makes silence the wrong answer: without this line a launch
|
|
322
|
+
// that quietly found no drafter is indistinguishable from one that armed,
|
|
323
|
+
// which is exactly how an entire 11-scenario eval measured speculation
|
|
324
|
+
// OFF while reporting a speculation gate.
|
|
325
|
+
log.info(`[mlx] speculative decoding off — no drafter at ${drafterDirFor(modelDir)} (build one to enable; nothing else is required)`);
|
|
326
|
+
}
|
|
327
|
+
// ── Memory-aware batch sizing ──
|
|
328
|
+
// Size concurrent slots to what actually fits GPU memory, not just a tiered
|
|
329
|
+
// default. This is the fix for the width-4-on-a-27B Metal abort: a Metal
|
|
330
|
+
// command-buffer OOM aborts the WHOLE python process (SIGABRT — the "Python
|
|
331
|
+
// quit unexpectedly" dialog), not just the offending request, so over-slotting
|
|
332
|
+
// MLX is fatal in a way an over-slotted llama-server (which fails one slot)
|
|
333
|
+
// is not. MLX runs KV in f16 by default, so the ceiling must NOT take a q8
|
|
334
|
+
// discount. An explicit `providerConcurrency.mlx` still wins verbatim
|
|
335
|
+
// (documented opt-in to the risk), mirroring llama-cpp's configuredSlots.
|
|
336
|
+
const { CapacityBroker: MlxCapacityBroker, computeCapacityBudget, defaultLocalEngineSlots, localEngineSlotCeiling, localEngineKvBudgetBytes, fastMemoryBudgetBytes, } = await import('../native/capacity-broker.js');
|
|
337
|
+
const mlxWeightsBytes = (modelCatalogInfo?.approxSizeBytes ?? 8 * 1024 ** 3) + (specDrafter?.bytes ?? 0);
|
|
338
|
+
// A catalog measurement is authoritative and, for Qwen4, reflects the
|
|
339
|
+
// 0.7.1 external-PLE view rather than the much larger on-disk checkpoint.
|
|
340
|
+
// Keep the fallback byte-identical to CapacityBroker for older manifests.
|
|
341
|
+
const mlxWeightsResidentBytes = (modelCatalogInfo?.residentBytes ??
|
|
342
|
+
MlxCapacityBroker.estimateResidentBytes('mlx', modelCatalogInfo?.approxSizeBytes ?? 8 * 1024 ** 3)) + (specDrafter?.bytes ?? 0);
|
|
343
|
+
const mlxBrokerSnap = opts.broker?.committed();
|
|
344
|
+
// Fast memory, not the admission budget — same reason as the llama path.
|
|
345
|
+
// MLX only runs on unified-memory Macs today, where the two are equal.
|
|
346
|
+
const mlxBudgetBytes = mlxBrokerSnap?.enforced
|
|
347
|
+
? (opts.broker?.fastBudgetBytes() ?? mlxBrokerSnap.pools.fastBytes)
|
|
348
|
+
: fastMemoryBudgetBytes();
|
|
349
|
+
const mlxCommittedOther = mlxBrokerSnap?.enforced ? mlxBrokerSnap.committedBytes : 0;
|
|
350
|
+
// Always f16 — see the KV-quantization note above. The engine still gets
|
|
351
|
+
// `--kv-bits` when the user set it; only PLANNING refuses the discount.
|
|
352
|
+
const mlxKvCacheType = 'f16';
|
|
353
|
+
const mlxKvBudgetBytes = localEngineKvBudgetBytes({
|
|
354
|
+
engine: 'mlx',
|
|
355
|
+
budgetBytes: mlxBudgetBytes,
|
|
356
|
+
weightsBytes: mlxWeightsBytes,
|
|
357
|
+
weightsResidentBytes: mlxWeightsResidentBytes,
|
|
358
|
+
committedOtherBytes: mlxCommittedOther,
|
|
359
|
+
});
|
|
360
|
+
// Header-exact per-slot KV from the model dir's config.json (M4) —
|
|
361
|
+
// before this, MLX memory math could only use the weights heuristic,
|
|
362
|
+
// which under-prices small dense models ~3× and over-prices hybrids.
|
|
363
|
+
const mlxGeometry = modelDir ? readMlxModelGeometry(modelDir) : undefined;
|
|
364
|
+
// Read once per provider build: whether the chat template leaves a reasoning
|
|
365
|
+
// block open, so a streamed turn starts mid-thought.
|
|
366
|
+
const opensReasoning = modelDir ? templateOpensReasoning(modelDir) : undefined;
|
|
367
|
+
const mlxExactPerSlotKvF16 = mlxGeometry
|
|
368
|
+
? estimateExactPerSlotKvBytesF16(mlxGeometry, effectiveNumCtx)
|
|
369
|
+
: undefined;
|
|
370
|
+
// No readable geometry means no honest KV price: the weights-scaled
|
|
371
|
+
// heuristic under-prices a dense model's KV ~3x, and over-slotting MLX
|
|
372
|
+
// SIGABRTs the whole process rather than failing one request. Stay serial
|
|
373
|
+
// instead of guessing. (An inflated weights multiplier used to mask this
|
|
374
|
+
// by accident; now that the weights figure is the measured one, the guard
|
|
375
|
+
// has to be stated.) An explicit `providerConcurrency.mlx` still wins.
|
|
376
|
+
const mlxSlotCeiling = mlxExactPerSlotKvF16 === undefined
|
|
377
|
+
? 1
|
|
378
|
+
: localEngineSlotCeiling({
|
|
379
|
+
engine: 'mlx',
|
|
380
|
+
budgetBytes: mlxBudgetBytes,
|
|
381
|
+
sizingBudgetBytes: mlxBrokerSnap?.enforced
|
|
382
|
+
? mlxBrokerSnap.pools.concurrencySizingBytes
|
|
383
|
+
: computeCapacityBudget().concurrencySizingBytes,
|
|
384
|
+
weightsBytes: mlxWeightsBytes,
|
|
385
|
+
weightsResidentBytes: mlxWeightsResidentBytes,
|
|
386
|
+
perTurnCtxTokens: effectiveNumCtx,
|
|
387
|
+
kvCacheType: mlxKvCacheType,
|
|
388
|
+
committedOtherBytes: mlxCommittedOther,
|
|
389
|
+
exactPerSlotKvBytesF16: mlxExactPerSlotKvF16,
|
|
390
|
+
});
|
|
391
|
+
const mlxRequestedSlots = concurrency ?? defaultLocalEngineSlots(mlxBudgetBytes);
|
|
392
|
+
let mlxSlots = concurrency ?? Math.min(mlxRequestedSlots, mlxSlotCeiling);
|
|
393
|
+
if (mlxSlots < mlxRequestedSlots) {
|
|
394
|
+
log.info(`[mlx] memory ceiling clamped concurrency ${mlxRequestedSlots} → ${mlxSlots} ` +
|
|
395
|
+
`(model ~${Math.round(mlxWeightsBytes / 1024 ** 3)}GB weights, ctx ${effectiveNumCtx}, ` +
|
|
396
|
+
`kv ${mlxKvCacheType}, ~${Math.round(mlxKvBudgetBytes / 1024 ** 3)}GB free for KV)`);
|
|
397
|
+
}
|
|
398
|
+
// Memory-priced context admission (M4): MLX previously launched at the
|
|
399
|
+
// model's NATIVE window with no admission at all — its lazily-growing
|
|
400
|
+
// cache meant the OOM arrived mid-generation instead of at launch, and
|
|
401
|
+
// the UI advertised a window memory could never back. Same ladder as
|
|
402
|
+
// llama-cpp (deny below min(native, 64K) → shed slots → clamp), priced
|
|
403
|
+
// with the config.json-exact KV when readable. MLX has no eval-env
|
|
404
|
+
// bypass; an explicit `config.mlxNumCtx` still sets the REQUEST, not an
|
|
405
|
+
// admission exemption.
|
|
406
|
+
let mlxPlannedReservationBytes;
|
|
407
|
+
if (mlxGeometry && mlxExactPerSlotKvF16 !== undefined) {
|
|
408
|
+
const { CapacityBroker, kvQuantScale, planCtxTokensForMemory, resolveLocalContextRequirement } = await import('../native/capacity-broker.js');
|
|
409
|
+
const requirement = resolveLocalContextRequirement({
|
|
410
|
+
...(modelCatalogInfo?.contextWindow
|
|
411
|
+
? { modelContextWindow: modelCatalogInfo.contextWindow }
|
|
412
|
+
: {}),
|
|
413
|
+
requestedContextWindow: effectiveNumCtx,
|
|
414
|
+
minViableContextTokens: mlxContextFloor,
|
|
415
|
+
});
|
|
416
|
+
const kvBytesPerToken = (mlxExactPerSlotKvF16 / Math.max(1, effectiveNumCtx)) * kvQuantScale(mlxKvCacheType);
|
|
417
|
+
const weightsResident = mlxWeightsResidentBytes;
|
|
418
|
+
const admission = planCtxTokensForMemory({
|
|
419
|
+
requestedPerTurnCtxTokens: effectiveNumCtx,
|
|
420
|
+
slots: mlxSlots,
|
|
421
|
+
minimumPerTurnCtxTokens: requirement.minimumPerTurnCtxTokens,
|
|
422
|
+
kvBytesPerToken,
|
|
423
|
+
weightsResidentBytes: weightsResident,
|
|
424
|
+
budgetBytes: mlxBrokerSnap?.enforced ? mlxBrokerSnap.budgetBytes : mlxBudgetBytes,
|
|
425
|
+
committedOtherBytes: mlxCommittedOther,
|
|
426
|
+
freeSystemRamBytes: availableSystemRamBytes(),
|
|
427
|
+
vramBytes: 0,
|
|
428
|
+
});
|
|
429
|
+
if (!admission.minimumSatisfied) {
|
|
430
|
+
log.warn(`[mlx] ${formatContextCapacityDenial({
|
|
431
|
+
modelLabel: modelCatalogInfo?.name ?? defaultModelId ?? 'this MLX model',
|
|
432
|
+
plan: admission,
|
|
433
|
+
})}`);
|
|
434
|
+
throw new CapacityDeniedError(NOT_ENOUGH_MEMORY_MESSAGE);
|
|
435
|
+
}
|
|
436
|
+
if (admission.slots < mlxSlots) {
|
|
437
|
+
log.info(`[mlx] ${modelCatalogInfo?.id ?? 'model'}: reducing concurrency ${mlxSlots} -> ${admission.slots} to preserve at least ${requirement.minimumPerTurnCtxTokens} context tokens per turn`);
|
|
438
|
+
mlxSlots = admission.slots;
|
|
439
|
+
}
|
|
440
|
+
if (admission.clamped) {
|
|
441
|
+
log.warn(`[mlx] ${modelCatalogInfo?.id ?? 'model'}: ${admission.reason}`);
|
|
442
|
+
effectiveNumCtx = admission.perTurnCtxTokens;
|
|
443
|
+
}
|
|
444
|
+
mlxPlannedReservationBytes = Math.round(weightsResident + kvBytesPerToken * effectiveNumCtx * mlxSlots);
|
|
445
|
+
}
|
|
446
|
+
// One width: the memory-ceiling-clamped slot count we reserved KV for is
|
|
447
|
+
// exactly what `--max-concurrency` opens. `providerConcurrency.mlx = 1` is
|
|
448
|
+
// the way to ask for a serial engine, and it shrinks the reservation too.
|
|
449
|
+
const mlxBatchMaxConcurrency = mlxSlots;
|
|
450
|
+
const providerHolder = { current: null };
|
|
451
|
+
// Persistent stdout/stderr trail from the wrapped python server.
|
|
452
|
+
// Routes the supervisor's per-line output to disk at
|
|
453
|
+
// `<logs>/mlx-server-YYYY-MM-DD.log` so the cache lines (`[cache]
|
|
454
|
+
// miss/hit/saved`), prefill progress, and `[stream] client
|
|
455
|
+
// disconnected` events survive past gezeld restarts. Without this,
|
|
456
|
+
// the python child's prints land only on console.log and are
|
|
457
|
+
// invisible to anyone diagnosing "why is prefill happening 3 times
|
|
458
|
+
// in a row?". Mirrors the llama-cpp `logFile` wiring two functions
|
|
459
|
+
// up.
|
|
460
|
+
const { MlxLogFile } = await import('./log.js');
|
|
461
|
+
const mlxLogFile = new MlxLogFile(gezelPaths(store.homePath).logs);
|
|
462
|
+
let cachedPort;
|
|
463
|
+
// In-engine cache budget. Operator override via
|
|
464
|
+
// `config.cacheBudgetMb.mlx`; otherwise we read system RAM and pick
|
|
465
|
+
// a tier (1/2/4/8 GB). This caps the wrapped server's in-process
|
|
466
|
+
// prompt-cache; the controller-side LRU manages the same pool from
|
|
467
|
+
// outside via `/v1/cache/{stats,evict}` polling. Both layers needed:
|
|
468
|
+
// the in-engine bound is the safety net against OOM if the
|
|
469
|
+
// controller's view drifts from engine reality between reconciles.
|
|
470
|
+
const { totalmem } = await import('node:os');
|
|
471
|
+
const ramAwareDefaultMb = (await import('../../cache/budget.js')).defaultCacheBudgetMb(totalmem());
|
|
472
|
+
// Clamp the in-engine prompt-cache budget to the post-weights KV headroom
|
|
473
|
+
// (the same number the slot ceiling uses). The RAM-tier default is model-blind
|
|
474
|
+
// — an 8 GB cache budget behind a 28 GB model on a 64 GB box is ~4× the actual
|
|
475
|
+
// headroom, and a fat resident cache of idle-session KV pushed the 27B session
|
|
476
|
+
// over the Metal working set alongside the concurrent slots. The 256 MB floor
|
|
477
|
+
// keeps ≥1 session cacheable (the server never evicts its last entry) so a
|
|
478
|
+
// single-session user doesn't cold re-prefill every turn.
|
|
479
|
+
const mlxKvHeadroomMb = Math.max(256, Math.floor(mlxKvBudgetBytes / (1024 * 1024)));
|
|
480
|
+
const cacheBudgetMb = Math.min(config.cacheBudgetMb?.mlx ?? ramAwareDefaultMb, mlxKvHeadroomMb);
|
|
481
|
+
// ── Disk-persisted prompt cache ──
|
|
482
|
+
// The wrapped server writes evicted entries (and warmed prefixes) to
|
|
483
|
+
// `<home>/engines/mlx/cache/<fingerprint>/<cache_id>.safetensors`.
|
|
484
|
+
// On miss, the server tries disk before falling back to fresh
|
|
485
|
+
// prefill. Fingerprint segmentation prevents wrong-shape KV state
|
|
486
|
+
// from loading into a different model — change the model and the
|
|
487
|
+
// path changes, the disk-LRU eventually prunes the orphaned tree.
|
|
488
|
+
//
|
|
489
|
+
// The fingerprint is a cheap stable hash of fields that change only
|
|
490
|
+
// on (re-)install: catalog id, catalog version, install timestamp,
|
|
491
|
+
// resolved model directory. Reinstalling the same model with no
|
|
492
|
+
// catalog bump produces the same fingerprint — caches survive minor
|
|
493
|
+
// catalog republishes that don't change weights. A catalog version
|
|
494
|
+
// bump or a switch to a different model path produces a different
|
|
495
|
+
// fingerprint, so old caches are never accidentally loaded against
|
|
496
|
+
// new weights. The launch's tower segments it further — see
|
|
497
|
+
// `mlxCacheFingerprint` — while the PLE view below keys on the weights alone.
|
|
498
|
+
// Replica isolation: replica 0 keeps the canonical cache root; 1+
|
|
499
|
+
// get a `replica-N` sibling subdir so concurrent MLX wrappers
|
|
500
|
+
// don't collide on each other's disk-cache writes. The python
|
|
501
|
+
// wrapper hashes (model-fingerprint, cache_id) into the on-disk
|
|
502
|
+
// filename, so a different `--persist-dir` per replica is
|
|
503
|
+
// sufficient isolation.
|
|
504
|
+
const mlxReplicaSuffix = opts.modelOverride && opts.modelOverride.replicaIdx > 0
|
|
505
|
+
? `replica-${opts.modelOverride.replicaIdx}`
|
|
506
|
+
: '';
|
|
507
|
+
const cacheRoot = mlxReplicaSuffix
|
|
508
|
+
? join(store.homePath, 'engines', 'mlx', 'cache', mlxReplicaSuffix)
|
|
509
|
+
: join(store.homePath, 'engines', 'mlx', 'cache');
|
|
510
|
+
const { createHash } = await import('node:crypto');
|
|
511
|
+
const fingerprintInput = [
|
|
512
|
+
modelCatalogInfo?.id ?? defaultModelId ?? modelDir,
|
|
513
|
+
modelCatalogInfo?.catalogVersion ?? '',
|
|
514
|
+
modelCatalogInfo?.installedAt ?? '',
|
|
515
|
+
modelDir,
|
|
516
|
+
].join('::');
|
|
517
|
+
const modelFingerprint = createHash('sha256')
|
|
518
|
+
.update(fingerprintInput, 'utf8')
|
|
519
|
+
.digest('hex')
|
|
520
|
+
.slice(0, 24);
|
|
521
|
+
const diskCacheBudgetMb = config.mlxDiskCacheBudgetMb ?? 8192;
|
|
522
|
+
// Two-stage idle (Phase 2.5): freeze at half the default idle
|
|
523
|
+
// budget, SIGTERM at the full budget. Freeze flushes warm cache
|
|
524
|
+
// entries to disk via /admin/flush while the model is still
|
|
525
|
+
// resident, so the SIGKILL window between Stage 1 and Stage 2
|
|
526
|
+
// can't lose them. MLX cold-start is ~1–3 min so the staged
|
|
527
|
+
// approach is especially valuable here vs llama.cpp.
|
|
528
|
+
const mlxIdleMs = config.localEngineIdleTimeoutMs ?? DEFAULT_LOCAL_ENGINE_IDLE_TIMEOUT_MS;
|
|
529
|
+
const mlxFreezeMs = Math.floor(mlxIdleMs / 2);
|
|
530
|
+
// Python+MLX cold-start (PyTorch imports, MLX metal shaders JIT) is
|
|
531
|
+
// slower than llama.cpp's Metal compile. 300s headroom covers the
|
|
532
|
+
// first-ever launch on a cold machine; warm launches are seconds. But a
|
|
533
|
+
// truly cold machine also has to BUILD the mlx-vlm/torch venv on the
|
|
534
|
+
// first turn (uv installs ~70 packages, ~10 min) before the engine even
|
|
535
|
+
// spawns — which blows past 300s and times the first turn out. Honor
|
|
536
|
+
// `GEZEL_MLX_STARTUP_TIMEOUT_MS` (mirrors `GEZEL_LLAMA_STARTUP_TIMEOUT_MS`)
|
|
537
|
+
// so a cold first MLX turn can wait out the venv build without recompiling.
|
|
538
|
+
const mlxStartupTimeoutMs = (() => {
|
|
539
|
+
const env = process.env.GEZEL_MLX_STARTUP_TIMEOUT_MS;
|
|
540
|
+
if (env) {
|
|
541
|
+
const n = Number.parseInt(env, 10);
|
|
542
|
+
if (Number.isFinite(n) && n > 0)
|
|
543
|
+
return n;
|
|
544
|
+
}
|
|
545
|
+
return 300_000;
|
|
546
|
+
})();
|
|
547
|
+
const supervisor = new NativeEngineSupervisor({
|
|
548
|
+
capacity: {
|
|
549
|
+
home: opts.store.homePath,
|
|
550
|
+
priority: () => (providerHolder.current?.queue.describe().runningInteractive ?? 0) > 0
|
|
551
|
+
? 'interactive'
|
|
552
|
+
: 'background',
|
|
553
|
+
requirement: () => mlxPlannedReservationBytes !== undefined
|
|
554
|
+
? { bytes: mlxPlannedReservationBytes }
|
|
555
|
+
: undefined,
|
|
556
|
+
},
|
|
557
|
+
logPrefix: '[mlx]',
|
|
558
|
+
startupTimeoutMs: mlxStartupTimeoutMs,
|
|
559
|
+
idleTimeoutMs: mlxIdleMs,
|
|
560
|
+
freezeTimeoutMs: mlxFreezeMs,
|
|
561
|
+
isBusy: () => providerHolder.current?.isEngineBusy() ?? false,
|
|
562
|
+
...(opts.arbiter
|
|
563
|
+
? {
|
|
564
|
+
memoryPressure: () => opts.arbiter.getMemoryPressureStatus(),
|
|
565
|
+
pressureIdleTimeoutMs: pressureIdleGraceMs(),
|
|
566
|
+
}
|
|
567
|
+
: {}),
|
|
568
|
+
onFreeze: async () => {
|
|
569
|
+
await providerHolder.current?.getCacheAdapter()?.flushAll();
|
|
570
|
+
},
|
|
571
|
+
// A deliberate stop (quit, restart, model switch, pressure) persists
|
|
572
|
+
// the sessions' KV while the engine can still answer: the sidecar's own
|
|
573
|
+
// shutdown flush races a SIGKILL three seconds later and lost a
|
|
574
|
+
// 98k-token session that way, so the next boot re-prefilled it.
|
|
575
|
+
beforeStop: async ({ baseUrl }) => {
|
|
576
|
+
await providerHolder.current?.getCacheAdapter()?.flushAll({ baseUrl, settleMs: 5_000 });
|
|
577
|
+
},
|
|
578
|
+
onLog: (line) => {
|
|
579
|
+
log.info(line);
|
|
580
|
+
mlxLogFile.write(line);
|
|
581
|
+
},
|
|
582
|
+
onRawLine: (line) => providerHolder.current?.onStdoutLine(line),
|
|
583
|
+
resolveLaunch: async () => {
|
|
584
|
+
const vision = visionMode.takeLaunch();
|
|
585
|
+
const port = cachedPort ?? (await pickFreePort());
|
|
586
|
+
cachedPort = port;
|
|
587
|
+
return {
|
|
588
|
+
// Spawn the wrapper via the venv's python so all mlx-vlm
|
|
589
|
+
// imports resolve. The .py file path is bundle-relative — see
|
|
590
|
+
// pythonServerPath derivation above. `--cache-budget-mb` caps
|
|
591
|
+
// the in-engine cache size; the Phase-3 controller manages
|
|
592
|
+
// policy from outside via `/v1/cache/{stats,evict}`.
|
|
593
|
+
command: venvPython,
|
|
594
|
+
args: [
|
|
595
|
+
pythonServerPath,
|
|
596
|
+
'--model',
|
|
597
|
+
modelDir,
|
|
598
|
+
...(vision ? ['--vision'] : []),
|
|
599
|
+
'--external-ple-dir',
|
|
600
|
+
join(store.homePath, 'engines', 'mlx', 'views', modelCatalogInfo?.id ?? 'explicit', `${modelFingerprint}-qwen4-ple`),
|
|
601
|
+
'--host',
|
|
602
|
+
'127.0.0.1',
|
|
603
|
+
'--port',
|
|
604
|
+
String(port),
|
|
605
|
+
'--cache-budget-mb',
|
|
606
|
+
String(cacheBudgetMb),
|
|
607
|
+
'--persist-dir',
|
|
608
|
+
cacheRoot,
|
|
609
|
+
'--model-fingerprint',
|
|
610
|
+
mlxCacheFingerprint(modelFingerprint, vision),
|
|
611
|
+
'--disk-cache-budget-mb',
|
|
612
|
+
String(diskCacheBudgetMb),
|
|
613
|
+
// Tunable prefill chunk size — only forwarded when the
|
|
614
|
+
// operator overrides; otherwise the python wrapper's own
|
|
615
|
+
// default (2048) lands.
|
|
616
|
+
...(config.mlxPrefillStepSize
|
|
617
|
+
? ['--prefill-step-size', String(config.mlxPrefillStepSize)]
|
|
618
|
+
: []),
|
|
619
|
+
// BatchGenerator width. Every positive value uses the snapshot-safe
|
|
620
|
+
// path; 1 is a singleton wave, N>1 batches co-arriving sequences.
|
|
621
|
+
// Only an explicit 0 selects the legacy serial fallback.
|
|
622
|
+
'--max-concurrency',
|
|
623
|
+
String(mlxBatchMaxConcurrency),
|
|
624
|
+
// This engine's unified-memory SHARE (weights + KV + compute): the
|
|
625
|
+
// budget minus what co-resident models already hold. Each engine is a
|
|
626
|
+
// separate process, so the in-engine admission guard must gate on this
|
|
627
|
+
// process's share, not the whole-device budget, or two engines
|
|
628
|
+
// collectively overshoot. The server further caps at Metal's
|
|
629
|
+
// recommended working set (whichever is tighter). Singleton path:
|
|
630
|
+
// committedOther = 0 → full budget.
|
|
631
|
+
// Opt-in structured tool-call streaming (GEZEL_MLX_STREAM_TOOL_CALLS=1).
|
|
632
|
+
// Off by default: without a matching mlx_vlm tool parser the server
|
|
633
|
+
// falls back to streaming markup as content, which is the path the
|
|
634
|
+
// gezel-side salvage layer has always handled. On, the client gets a
|
|
635
|
+
// real call boundary and can end a turn once the write is usable.
|
|
636
|
+
...(process.env.GEZEL_MLX_STREAM_TOOL_CALLS === '1' ? ['--stream-tool-calls'] : []),
|
|
637
|
+
'--gpu-memory-limit-mb',
|
|
638
|
+
String(Math.max(0, Math.floor((mlxBudgetBytes - mlxCommittedOther) / (1024 * 1024)))),
|
|
639
|
+
// What this engine may PIN, as distinct from what it may use. Wiring
|
|
640
|
+
// is not reclaimable by the OS, so the ceiling above is the wrong
|
|
641
|
+
// number to pass Metal: a 27B on a 128 GB Mac wired its whole 96 GiB
|
|
642
|
+
// share, held ~103 GB against a ~45 GB working set, and drove the
|
|
643
|
+
// machine to 155 MB free. The planned resident set (weights + the
|
|
644
|
+
// KV its slots will actually hold) is what steady-state inference
|
|
645
|
+
// needs kept out of the pager. Omitted when geometry was unreadable
|
|
646
|
+
// — the server then leaves the wired limit alone rather than guessing.
|
|
647
|
+
...(mlxPlannedReservationBytes !== undefined
|
|
648
|
+
? [
|
|
649
|
+
'--wired-limit-mb',
|
|
650
|
+
String(Math.max(1, Math.floor(mlxPlannedReservationBytes / (1024 * 1024)))),
|
|
651
|
+
]
|
|
652
|
+
: []),
|
|
653
|
+
...kvQuantArgs,
|
|
654
|
+
...specArgs,
|
|
655
|
+
],
|
|
656
|
+
env: {
|
|
657
|
+
// Force the engine to operate purely off-disk. We've already
|
|
658
|
+
// downloaded every file MlxModelManager declared via the
|
|
659
|
+
// catalog manifest, and any "needed file is missing" should
|
|
660
|
+
// raise a clean FileNotFoundError naming the file — NOT
|
|
661
|
+
// silently fall back to fetching `https://huggingface.co/<gibberish>`
|
|
662
|
+
// and leaving the user staring at a 401. The huggingface_hub
|
|
663
|
+
// and transformers offline switches together cover every
|
|
664
|
+
// auto-fetch path inside mlx_vlm.server.
|
|
665
|
+
HF_HUB_OFFLINE: '1',
|
|
666
|
+
TRANSFORMERS_OFFLINE: '1',
|
|
667
|
+
HF_HUB_DISABLE_TELEMETRY: '1',
|
|
668
|
+
TRANSFORMERS_NO_ADVISORY_WARNINGS: '1',
|
|
669
|
+
},
|
|
670
|
+
baseUrl: `http://127.0.0.1:${port}`,
|
|
671
|
+
};
|
|
672
|
+
},
|
|
673
|
+
});
|
|
674
|
+
const provider = new MlxProvider({
|
|
675
|
+
supervisor,
|
|
676
|
+
vision: visionMode,
|
|
677
|
+
...baseProviderOpts,
|
|
678
|
+
// Weights + KV at the admitted window — the broker-ledger reservation
|
|
679
|
+
// the pool should hold for this replica (M1).
|
|
680
|
+
...(mlxPlannedReservationBytes !== undefined
|
|
681
|
+
? { plannedReservationBytes: mlxPlannedReservationBytes }
|
|
682
|
+
: {}),
|
|
683
|
+
// Engine batch width — matches the server's `--max-concurrency`. Widens
|
|
684
|
+
// the provider's queue + engine gate to N (1 = singleton BatchGenerator).
|
|
685
|
+
// Supervised path only; external-baseUrl MLX stays at one in-flight
|
|
686
|
+
// request because we don't control that server's width.
|
|
687
|
+
batchMaxConcurrency: mlxBatchMaxConcurrency,
|
|
688
|
+
// mlx_vlm.server's `/v1/chat/completions` keys its in-memory cache
|
|
689
|
+
// on `request.model` and reloads when it doesn't match what was
|
|
690
|
+
// preloaded via `--model` (`PRELOAD_MODEL` env). The reload path
|
|
691
|
+
// calls `huggingface_hub.snapshot_download(<request.model>)` —
|
|
692
|
+
// which fails offline with a `LocalEntryNotFoundError` ("Cannot
|
|
693
|
+
// find an appropriate cached snapshot folder…") when the request
|
|
694
|
+
// value is a catalog id like `gemma4-e4b-mlx` rather than the
|
|
695
|
+
// on-disk path. Sending the absolute model dir keeps the cache
|
|
696
|
+
// warm and avoids the offline-fetch attempt entirely.
|
|
697
|
+
defaultModel: modelDir,
|
|
698
|
+
numCtx: effectiveNumCtx,
|
|
699
|
+
...(opensReasoning ? { templateOpensReasoning: opensReasoning } : {}),
|
|
700
|
+
...(opts.mlxModels ? { modelManager: opts.mlxModels } : {}),
|
|
701
|
+
...(modelCatalogInfo ? { modelDisplayName: modelCatalogInfo.name } : {}),
|
|
702
|
+
// Catalog id, distinct from `defaultModel` (the on-disk path).
|
|
703
|
+
// Surfaced via `getEffectiveModelId()` so the chat manager can
|
|
704
|
+
// recover a tier-classifiable model id when neither `record.model`
|
|
705
|
+
// nor `config.defaultModel.mlx` was set — without this the user's
|
|
706
|
+
// session uses an auto-picked model and lands in `tier:tiny`.
|
|
707
|
+
// Falls back to `defaultModelId` (config-resolved id) when the
|
|
708
|
+
// catalog lookup didn't fire (explicit `mlxModelPath` env override).
|
|
709
|
+
...(modelCatalogInfo
|
|
710
|
+
? { catalogModelId: modelCatalogInfo.id }
|
|
711
|
+
: defaultModelId
|
|
712
|
+
? { catalogModelId: defaultModelId }
|
|
713
|
+
: {}),
|
|
714
|
+
});
|
|
715
|
+
providerHolder.current = provider;
|
|
716
|
+
return provider;
|
|
717
|
+
}
|