@qvac/inference 0.21.1 → 0.22.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.
Files changed (246) hide show
  1. package/NOTICE +30 -1
  2. package/README.md +44 -1
  3. package/dist/api/assess-model-fit.d.ts +4 -4
  4. package/dist/api/assess-model-fit.js +4 -4
  5. package/dist/api/audio-gen.d.ts +4 -1
  6. package/dist/api/audio-gen.js +4 -1
  7. package/dist/api/batch-completion.js +1 -1
  8. package/dist/api/completion-stream.js +1 -1
  9. package/dist/api/decide.d.ts +26 -0
  10. package/dist/api/decide.js +26 -0
  11. package/dist/api/get-model-info.d.ts +1 -1
  12. package/dist/api/index.d.ts +1 -0
  13. package/dist/api/index.js +1 -0
  14. package/dist/api/text-to-speech.d.ts +1 -0
  15. package/dist/api/text-to-speech.js +15 -19
  16. package/dist/api/transcribe.js +5 -2
  17. package/dist/api/video-request.d.ts +5 -5
  18. package/dist/api/video.d.ts +5 -4
  19. package/dist/api/video.js +5 -4
  20. package/dist/errors/index.d.ts +3 -0
  21. package/dist/errors/index.js +5 -0
  22. package/dist/handlers/assess-model-fit.d.ts +5 -3
  23. package/dist/handlers/assess-model-fit.js +80 -28
  24. package/dist/handlers/get-loaded-model-info.js +1 -2
  25. package/dist/handlers/load-model/safe-fetch.js +5 -6
  26. package/dist/handlers/registry.d.ts +3 -1
  27. package/dist/handlers/registry.js +3 -3
  28. package/dist/index.d.ts +1 -1
  29. package/dist/index.js +1 -1
  30. package/dist/logging/logger.js +1 -1
  31. package/dist/logging/utils.js +1 -1
  32. package/dist/models/registry/models.d.ts +563 -816
  33. package/dist/models/registry/models.js +2873 -3110
  34. package/dist/models/registry/resource-profiles.d.ts +1 -2
  35. package/dist/models/registry/resource-profiles.js +203 -2
  36. package/dist/plugins/builtin/asr-ggml/config.d.ts +7 -1
  37. package/dist/plugins/builtin/asr-ggml/config.js +6 -0
  38. package/dist/plugins/builtin/asr-ggml/logging.d.ts +1 -1
  39. package/dist/plugins/builtin/audiogen-ggml/config.d.ts +1 -0
  40. package/dist/plugins/builtin/audiogen-ggml/ops/audio-edit-stream.js +28 -10
  41. package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-input.d.ts +27 -0
  42. package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-input.js +23 -0
  43. package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-stream.js +6 -27
  44. package/dist/plugins/builtin/audiogen-ggml/plugin.d.ts +147 -60
  45. package/dist/plugins/builtin/audiogen-ggml/plugin.js +1 -0
  46. package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.d.ts +40 -24
  47. package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.js +1 -1
  48. package/dist/plugins/builtin/ggml-classification/plugin.d.ts +4 -4
  49. package/dist/plugins/builtin/ggml-ocr/params.d.ts +18 -0
  50. package/dist/plugins/builtin/ggml-ocr/params.js +37 -0
  51. package/dist/plugins/builtin/ggml-ocr/plugin.d.ts +18 -10
  52. package/dist/plugins/builtin/ggml-ocr/plugin.js +16 -38
  53. package/dist/plugins/builtin/ggml-vla/plugin.d.ts +21 -14
  54. package/dist/plugins/builtin/ggml-vla/plugin.js +1 -1
  55. package/dist/plugins/builtin/index.d.ts +2 -0
  56. package/dist/plugins/builtin/index.js +2 -0
  57. package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.d.ts +9 -7
  58. package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.js +109 -189
  59. package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-session.d.ts +32 -90
  60. package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-session.js +60 -211
  61. package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-state.d.ts +2 -49
  62. package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-state.js +2 -46
  63. package/dist/plugins/builtin/llamacpp-completion/plugin.d.ts +185 -87
  64. package/dist/plugins/builtin/llamacpp-completion/plugin.js +4 -5
  65. package/dist/plugins/builtin/llamacpp-completion/transform.js +1 -1
  66. package/dist/plugins/builtin/llamacpp-decision/helpers.d.ts +6 -0
  67. package/dist/plugins/builtin/llamacpp-decision/helpers.js +97 -0
  68. package/dist/plugins/builtin/llamacpp-decision/ops/decide.d.ts +91 -0
  69. package/dist/plugins/builtin/llamacpp-decision/ops/decide.js +129 -0
  70. package/dist/plugins/builtin/llamacpp-decision/plugin.d.ts +216 -0
  71. package/dist/plugins/builtin/llamacpp-decision/plugin.js +43 -0
  72. package/dist/plugins/builtin/llamacpp-embedding/plugin.d.ts +12 -5
  73. package/dist/plugins/builtin/llamacpp-embedding/plugin.js +1 -1
  74. package/dist/plugins/builtin/llamacpp-embedding/transform.js +3 -0
  75. package/dist/plugins/builtin/moss-transcribe/plugin.d.ts +143 -0
  76. package/dist/plugins/builtin/moss-transcribe/plugin.js +96 -0
  77. package/dist/plugins/builtin/nmtcpp-translation/load-files.d.ts +6 -0
  78. package/dist/plugins/builtin/nmtcpp-translation/load-files.js +70 -0
  79. package/dist/plugins/builtin/nmtcpp-translation/plugin.d.ts +25 -13
  80. package/dist/plugins/builtin/nmtcpp-translation/plugin.js +9 -73
  81. package/dist/plugins/builtin/parakeet-transcription/plugin.d.ts +52 -31
  82. package/dist/plugins/builtin/parakeet-transcription/plugin.js +18 -3
  83. package/dist/plugins/builtin/sdcpp-generation/ops/video.js +10 -6
  84. package/dist/plugins/builtin/sdcpp-generation/ops/world.d.ts +2 -2
  85. package/dist/plugins/builtin/sdcpp-generation/ops/world.js +1 -1
  86. package/dist/plugins/builtin/sdcpp-generation/plugin.d.ts +59 -33
  87. package/dist/plugins/builtin/sdcpp-generation/plugin.js +12 -9
  88. package/dist/plugins/builtin/tts-ggml/ops/moss-options.d.ts +22 -0
  89. package/dist/plugins/builtin/tts-ggml/ops/moss-options.js +79 -0
  90. package/dist/plugins/builtin/tts-ggml/ops/text-to-speech-stream.js +4 -1
  91. package/dist/plugins/builtin/tts-ggml/ops/text-to-speech.js +17 -5
  92. package/dist/plugins/builtin/tts-ggml/plugin.d.ts +164 -29
  93. package/dist/plugins/builtin/tts-ggml/plugin.js +38 -1
  94. package/dist/plugins/builtin/whispercpp-transcription/plugin.d.ts +58 -35
  95. package/dist/plugins/builtin/whispercpp-transcription/plugin.js +6 -2
  96. package/dist/plugins/ops/kv-cache-utils.d.ts +1 -1
  97. package/dist/plugins/ops/kv-cache-utils.js +10 -25
  98. package/dist/plugins/ops/load-model.js +21 -16
  99. package/dist/plugins/ops/transcribe.js +17 -1
  100. package/dist/registry.js +1 -0
  101. package/dist/resources/model-fit/assess.d.ts +15 -23
  102. package/dist/resources/model-fit/assess.js +207 -271
  103. package/dist/resources/model-fit/fit-stub/fetch-fit-stub.d.ts +3 -1
  104. package/dist/resources/model-fit/fit-stub/fetch-fit-stub.js +6 -1
  105. package/dist/resources/model-fit/fit-stub/project-fit-from-load.js +2 -0
  106. package/dist/resources/model-fit/fit-stub/resolve-load-from-stubs.d.ts +5 -3
  107. package/dist/resources/model-fit/fit-stub/resolve-load-from-stubs.js +9 -1
  108. package/dist/resources/model-fit/floor.d.ts +10 -10
  109. package/dist/resources/model-fit/floor.js +13 -13
  110. package/dist/resources/model-fit/kv-cache.d.ts +23 -0
  111. package/dist/resources/model-fit/kv-cache.js +85 -0
  112. package/dist/resources/model-fit/native-probe/advisory-fit.d.ts +11 -6
  113. package/dist/resources/model-fit/native-probe/advisory-fit.js +12 -27
  114. package/dist/resources/model-fit/native-probe/child-engine-fit.js +8 -0
  115. package/dist/resources/model-fit/native-probe/classify-fit.js +32 -1
  116. package/dist/resources/model-fit/native-probe/create-fit-request.d.ts +4 -1
  117. package/dist/resources/model-fit/native-probe/create-fit-request.js +24 -14
  118. package/dist/resources/model-fit/native-probe/engine-fit.d.ts +14 -0
  119. package/dist/resources/model-fit/native-probe/engine-fit.js +1 -1
  120. package/dist/resources/model-fit/native-probe/engines/asr.d.ts +4 -0
  121. package/dist/resources/model-fit/native-probe/engines/asr.js +23 -0
  122. package/dist/resources/model-fit/native-probe/engines/audiogen.js +29 -1
  123. package/dist/resources/model-fit/native-probe/engines/diffusion.js +16 -6
  124. package/dist/resources/model-fit/native-probe/engines/llama.d.ts +0 -1
  125. package/dist/resources/model-fit/native-probe/engines/llama.js +19 -123
  126. package/dist/resources/model-fit/native-probe/engines/nmt.d.ts +8 -0
  127. package/dist/resources/model-fit/native-probe/engines/nmt.js +11 -0
  128. package/dist/resources/model-fit/native-probe/engines/ocr.d.ts +9 -0
  129. package/dist/resources/model-fit/native-probe/engines/ocr.js +13 -0
  130. package/dist/resources/model-fit/native-probe/engines/tts.d.ts +2 -0
  131. package/dist/resources/model-fit/native-probe/engines/tts.js +49 -3
  132. package/dist/resources/model-fit/native-probe/run-in-process-fit.d.ts +5 -3
  133. package/dist/resources/model-fit/native-probe/run-in-process-fit.js +38 -23
  134. package/dist/resources/model-fit/platform.d.ts +4 -4
  135. package/dist/resources/model-fit/platform.js +6 -8
  136. package/dist/resources/model-fit/types.d.ts +3 -117
  137. package/dist/rpc/inventory.js +5 -7
  138. package/dist/runtime/env.d.ts +0 -2
  139. package/dist/runtime/env.js +2 -9
  140. package/dist/runtime/model-config-utils.js +6 -1
  141. package/dist/runtime/request-context.d.ts +1 -1
  142. package/dist/runtime/request-context.js +8 -0
  143. package/dist/runtime/state.js +5 -0
  144. package/dist/schemas/assess-model-fit.d.ts +100 -43
  145. package/dist/schemas/assess-model-fit.js +66 -29
  146. package/dist/schemas/audio-gen.d.ts +186 -18
  147. package/dist/schemas/audio-gen.js +180 -48
  148. package/dist/schemas/batch-completion-stream.d.ts +202 -34
  149. package/dist/schemas/bci-config.d.ts +2 -0
  150. package/dist/schemas/bci.d.ts +23 -2
  151. package/dist/schemas/cancel.d.ts +5 -0
  152. package/dist/schemas/cancel.js +1 -0
  153. package/dist/schemas/common.d.ts +1083 -158
  154. package/dist/schemas/common.js +5 -2
  155. package/dist/schemas/completion-stream.d.ts +232 -37
  156. package/dist/schemas/completion-stream.js +64 -20
  157. package/dist/schemas/config.d.ts +477 -12
  158. package/dist/schemas/config.js +21 -1
  159. package/dist/schemas/decision.d.ts +602 -0
  160. package/dist/schemas/decision.js +205 -0
  161. package/dist/schemas/download-asset.d.ts +7 -3
  162. package/dist/schemas/engine-addon-map.d.ts +7 -0
  163. package/dist/schemas/engine-addon-map.js +23 -3
  164. package/dist/schemas/errors.d.ts +1 -0
  165. package/dist/schemas/errors.js +5 -0
  166. package/dist/schemas/index.d.ts +2 -0
  167. package/dist/schemas/index.js +2 -0
  168. package/dist/schemas/llamacpp-config.d.ts +42 -2
  169. package/dist/schemas/llamacpp-config.js +27 -0
  170. package/dist/schemas/load-model.d.ts +5247 -1309
  171. package/dist/schemas/load-model.js +88 -9
  172. package/dist/schemas/model-config-schemas.d.ts +233 -8
  173. package/dist/schemas/model-config-schemas.js +4 -1
  174. package/dist/schemas/model-fit-policy.d.ts +17 -0
  175. package/dist/schemas/model-fit-policy.js +17 -0
  176. package/dist/schemas/model-info.d.ts +20 -2
  177. package/dist/schemas/model-info.js +2 -1
  178. package/dist/schemas/model-resource-profile.d.ts +3 -4
  179. package/dist/schemas/model-resource-profile.js +1 -4
  180. package/dist/schemas/model-src-utils.d.ts +10 -2
  181. package/dist/schemas/model-types.d.ts +10 -1
  182. package/dist/schemas/model-types.js +3 -0
  183. package/dist/schemas/ocr.d.ts +74 -0
  184. package/dist/schemas/ocr.js +42 -0
  185. package/dist/schemas/plugin.d.ts +8 -2
  186. package/dist/schemas/plugin.js +6 -0
  187. package/dist/schemas/profiling.d.ts +4 -4
  188. package/dist/schemas/registry.d.ts +26 -0
  189. package/dist/schemas/registry.js +3 -0
  190. package/dist/schemas/reload-config.d.ts +10 -2
  191. package/dist/schemas/rpc-server.js +3 -3
  192. package/dist/schemas/sdcpp-config.d.ts +26 -0
  193. package/dist/schemas/sdcpp-config.js +8 -7
  194. package/dist/schemas/system-resources.d.ts +4 -4
  195. package/dist/schemas/text-to-speech.d.ts +402 -3
  196. package/dist/schemas/text-to-speech.js +129 -11
  197. package/dist/schemas/tools.d.ts +13 -4
  198. package/dist/schemas/tools.js +18 -6
  199. package/dist/schemas/transcription-config.d.ts +15 -0
  200. package/dist/schemas/transcription-config.js +38 -3
  201. package/dist/schemas/transcription.d.ts +46 -4
  202. package/dist/schemas/transcription.js +51 -4
  203. package/dist/schemas/translation-config.d.ts +30 -10
  204. package/dist/schemas/vla.d.ts +9 -2
  205. package/dist/schemas/vla.js +9 -5
  206. package/dist/surface.d.ts +1 -1
  207. package/dist/surface.js +1 -1
  208. package/dist/utils/addon-responses.d.ts +1 -0
  209. package/dist/utils/asr-events.d.ts +1 -0
  210. package/dist/utils/asr-events.js +2 -1
  211. package/dist/utils/cache/types.d.ts +7 -0
  212. package/dist/utils/mcp-adapter.js +12 -8
  213. package/dist/utils/tool-helpers.d.ts +1 -1
  214. package/dist/utils/tool-helpers.js +20 -52
  215. package/dist/utils/tools/parsers/dsml.js +8 -5
  216. package/dist/utils/tools/parsers/qwen35.js +7 -4
  217. package/dist/utils/tools/shared.d.ts +3 -0
  218. package/dist/utils/tools/shared.js +62 -0
  219. package/dist/utils/transcribe-metadata.d.ts +8 -1
  220. package/dist/utils/transcribe-metadata.js +13 -3
  221. package/dist/utils/tts-stats.d.ts +1 -0
  222. package/package.json +41 -32
  223. package/dist/resources/model-fit/calibration/darwin-arm64.d.ts +0 -8
  224. package/dist/resources/model-fit/calibration/darwin-arm64.js +0 -36
  225. package/dist/resources/model-fit/calibration/darwin-x64.d.ts +0 -8
  226. package/dist/resources/model-fit/calibration/darwin-x64.js +0 -38
  227. package/dist/resources/model-fit/calibration/fit.d.ts +0 -73
  228. package/dist/resources/model-fit/calibration/fit.js +0 -152
  229. package/dist/resources/model-fit/calibration/index.d.ts +0 -37
  230. package/dist/resources/model-fit/calibration/index.js +0 -75
  231. package/dist/resources/model-fit/calibration/linux-arm64.d.ts +0 -8
  232. package/dist/resources/model-fit/calibration/linux-arm64.js +0 -38
  233. package/dist/resources/model-fit/calibration/linux-x64-vulkan.d.ts +0 -8
  234. package/dist/resources/model-fit/calibration/linux-x64-vulkan.js +0 -39
  235. package/dist/resources/model-fit/calibration/linux-x64.d.ts +0 -8
  236. package/dist/resources/model-fit/calibration/linux-x64.js +0 -38
  237. package/dist/resources/model-fit/calibration/win32-x64-vulkan-shared.d.ts +0 -8
  238. package/dist/resources/model-fit/calibration/win32-x64-vulkan-shared.js +0 -39
  239. package/dist/resources/model-fit/calibration/win32-x64-vulkan.d.ts +0 -8
  240. package/dist/resources/model-fit/calibration/win32-x64-vulkan.js +0 -36
  241. package/dist/resources/model-fit/calibration/win32-x64.d.ts +0 -8
  242. package/dist/resources/model-fit/calibration/win32-x64.js +0 -38
  243. package/dist/resources/model-fit/estimators/llm.d.ts +0 -46
  244. package/dist/resources/model-fit/estimators/llm.js +0 -222
  245. package/dist/resources/model-fit/estimators/whisper.d.ts +0 -10
  246. package/dist/resources/model-fit/estimators/whisper.js +0 -76
package/NOTICE CHANGED
@@ -135,6 +135,18 @@ Third-Party Model Licenses
135
135
  https://huggingface.co/jmb95/laser-dolphin-mixtral-2x7b-dpo-GGUF
136
136
  latin_g2
137
137
  https://www.jaided.ai/easyocr/modelhub/
138
+ laya-f16
139
+ https://huggingface.co/convaiinnovations/laya
140
+ laya-multilingual-f16
141
+ https://huggingface.co/convaiinnovations/laya-multilingual
142
+ laya-multilingual-Q8_0
143
+ https://huggingface.co/convaiinnovations/laya-multilingual
144
+ laya-Q8_0
145
+ https://huggingface.co/convaiinnovations/laya
146
+ laya-typed-decisions-f16
147
+ https://huggingface.co/convaiinnovations/laya-typed-decisions
148
+ laya-typed-decisions-Q8_0
149
+ https://huggingface.co/convaiinnovations/laya-typed-decisions
138
150
  LightOnOCR-2-1B-ocr-soup-GGUF
139
151
  https://huggingface.co/noctrex/LightOnOCR-2-1B-ocr-soup-GGUF
140
152
  Llama_3.2_1B_Intruct_Tool_Calling_V2-GGUF
@@ -153,8 +165,20 @@ Third-Party Model Licenses
153
165
  https://huggingface.co/OpenMOSS-Team/MOSS-TTS
154
166
  moss-codec-encoder-f16
155
167
  https://huggingface.co/OpenMOSS-Team/MOSS-TTS
168
+ moss-sfx-v2-f16
169
+ https://huggingface.co/OpenMOSS-Team/MOSS-SoundEffect-v2.0
170
+ moss-speech-bf16
171
+ https://huggingface.co/OpenMOSS-Team/MOSS-Speech
172
+ moss-speech-codec-f16
173
+ https://huggingface.co/OpenMOSS-Team/MOSS-Speech-Codec
174
+ moss-speech-q8_0
175
+ https://huggingface.co/OpenMOSS-Team/MOSS-Speech
176
+ moss-transcribe-diarize-f16
177
+ https://huggingface.co/OpenMOSS-Team/MOSS-Transcribe-Diarize
156
178
  moss-tts-delay-f16
157
179
  https://huggingface.co/OpenMOSS-Team/MOSS-TTS
180
+ moss-ttsd-f16
181
+ https://huggingface.co/OpenMOSS-Team/MOSS-TTSD-v1.0
158
182
  nb-tiny-ggml-model
159
183
  https://huggingface.co/NbAiLab/nb-whisper-tiny
160
184
  parler-indic-f16
@@ -707,6 +731,11 @@ Third-Party Model Licenses
707
731
  weight
708
732
  https://huggingface.co/nvidia/parakeet-unified-en-0.6b
709
733
 
734
+ --- openmdw-1.1 ---
735
+
736
+ Nemotron-3-Diarization.q8_0
737
+ https://huggingface.co/nvidia/Nemotron-3-Diarization
738
+
710
739
  --- openrail ---
711
740
 
712
741
  supertonic
@@ -1058,6 +1087,6 @@ JavaScript Dependencies
1058
1087
  https://github.com/mafintosh/xache
1059
1088
  z32@1.1.0
1060
1089
  https://github.com/mafintosh/z32
1061
- zod@4.6.7
1090
+ zod@4.6.5
1062
1091
  https://github.com/colinhacks/zod
1063
1092
 
package/README.md CHANGED
@@ -60,7 +60,7 @@ const run = completion({ modelId, history: [{ role: 'user', content: 'Hi' }] })
60
60
  Model operations require a registered model plugin. RPC discovery needs no model plugin or server provider; serving requires an explicitly registered server provider.
61
61
 
62
62
  The [Bare serving example](examples/rpc-server.ts)
63
- shows explicit registration and cleanup with `@qvac/ggml-rpc-server@0.1.0`.
63
+ shows explicit registration and cleanup with `@qvac/ggml-rpc-server@0.5.1`.
64
64
 
65
65
  ## Capability to addon package
66
66
 
@@ -78,10 +78,53 @@ shows explicit registration and cleanup with `@qvac/ggml-rpc-server@0.1.0`.
78
78
  | `@qvac/inference/ggml-vla/plugin` | `@qvac/vla-ggml` |
79
79
  | `@qvac/inference/ggml-classification/plugin` | `@qvac/classification-ggml` |
80
80
 
81
+ ## MOSS engines and memory fit
82
+
83
+ `@qvac/tts-ggml` carries two desktop batch engines for `textToSpeech`.
84
+ Load MOSS-SoundEffect with `modelType: 'tts-ggml'` and
85
+ `modelConfig: { ttsEngine: 'moss-sfx' }`; the primary source is its single
86
+ GGUF. With an `AUDIOGEN_MOSS_SFX_V2_*` constant, pass its `.src` URL as
87
+ `modelSrc`, because the full descriptor selects the audiogen plugin. To assess
88
+ its fit, pass a downloaded local file with explicit `modelType` and
89
+ `ttsEngine`. Use a text description, with optional `seconds`
90
+ (up to 30), `negativePrompt`, `steps`, `guidance` and `shift`. These controls
91
+ can also be load defaults. The output is 48 kHz.
92
+
93
+ Load MOSS-Speech with `modelConfig: { ttsEngine: 'moss-speech',
94
+ mossSpeechCodecModelSrc: <codec source> }` and the language-model GGUF as
95
+ `modelSrc`. Use either `text`, or `audio` plus
96
+ `sampleRate`. Audio is a JSON array of normalized mono samples in [-1, 1].
97
+ Earlier turns go in `messages`; each turn has a `role` and either `text` or
98
+ `audio` plus `sampleRate`. Per-call controls include `systemPrompt`,
99
+ `replyVoice` plus `replyVoiceSampleRate`, `maxReplySeconds`, `maxNewTokens`,
100
+ `textReply`, `greedy`, `temperature`, `topP` and `topK`. Consume `bufferStream` in the default streaming mode, or await `buffer` with
101
+ `stream: false`, then await `result.text` for any reply text.
102
+ Spoken mode can return an audio-only reply; use `textReply: true` when text is required.
103
+ Spoken replies are 24 kHz; `textReply: true` returns text with an empty audio
104
+ buffer. Omitting `maxNewTokens` preserves the addon's remaining-context budget.
105
+ Both engines run one native batch job. The default `stream: true` emits the completed audio as one chunk; `stream: false` collects it in `buffer`. Neither supports sentence streaming or duplex text input.
106
+
107
+ `assessModelFit` supports metadata-only MOSS-TTS/TTSD and MOSS-SoundEffect
108
+ projections. Add `ttsWorkload` beside `modelConfig` on the assessment candidate:
109
+ `{ promptRows, referenceSamples, streaming }` for MOSS, or
110
+ `{ prompt, seconds }` for sound effects. MOSS needs its backbone and codec
111
+ decoder; reference encoding also needs the codec encoder. Prompt rows must
112
+ cover the complete native prompt, including dialogue and reference rows.
113
+ Missing workloads return an unknown assessment rather than guessing.
114
+ MOSS-Speech has no native fitter and assesses as unknown. Workloads are
115
+ fit-only: loading a MOSS model does not accept them, so the fit check before a
116
+ MOSS load is unknown.
117
+
118
+ The CLI configuration picker includes both engines. Their conversation and
119
+ sound-effect request controls are library-only because the OpenAI speech
120
+ endpoint cannot represent those requests.
121
+
81
122
  ## Configuration
82
123
 
83
124
  The engine resolves a `qvac.config.js` or `qvac.config.json` from the current working directory, or from the path in `QVAC_CONFIG_PATH`. The resolved config applies on the first API call.
84
125
 
126
+ The `includeAudioDecoder` setting is read by the SDK bundler. Set it to `false` when packaging a worker that only receives raw PCM or streaming audio; `audiogen-ggml` can also use PCM or WAV output without FFmpeg. Compressed audio file decoding and compressed audiogen output formats require `bare-ffmpeg` to be bundled.
127
+
85
128
  ## System resource diagnostics
86
129
 
87
130
  Use `getSystemResources` to inspect locally observed CPU, system-memory, GPU, and driver capabilities. Pass `sample: true` only when you also need a fresh usage sample. Register a model plugin or RPC server provider before requesting diagnostics:
@@ -8,10 +8,10 @@ import { type AssessModelFitInput, type AssessModelFitResult } from '../schemas/
8
8
  * the available evidence does not support a verdict either way, and callers
9
9
  * should treat it as "cannot say", not "no".
10
10
  *
11
- * For a single candidate it fetches the registry's weightless description of
12
- * the artifact — tens of KB, never the weights — and runs the engine's own
13
- * fitter against it, reported as `native-fit` evidence. Where that is
14
- * unavailable, and for a set of candidates, the calibrated estimate stands.
11
+ * For each candidate it fetches the registry's weightless description of the
12
+ * artifact — tens of KB, never the weights — and runs the engine's own fitter
13
+ * against it, reported as `native-fit` evidence. Where that is unavailable the
14
+ * computed floor stands, which can refuse a model but never confirm one.
15
15
  *
16
16
  * @param input - Candidates with their intended workloads, the declared
17
17
  * execution mode, and the headroom policy.
@@ -10,10 +10,10 @@ import { InvalidResponseError } from '../errors/index.js';
10
10
  * the available evidence does not support a verdict either way, and callers
11
11
  * should treat it as "cannot say", not "no".
12
12
  *
13
- * For a single candidate it fetches the registry's weightless description of
14
- * the artifact — tens of KB, never the weights — and runs the engine's own
15
- * fitter against it, reported as `native-fit` evidence. Where that is
16
- * unavailable, and for a set of candidates, the calibrated estimate stands.
13
+ * For each candidate it fetches the registry's weightless description of the
14
+ * artifact — tens of KB, never the weights — and runs the engine's own fitter
15
+ * against it, reported as `native-fit` evidence. Where that is unavailable the
16
+ * computed floor stands, which can refuse a model but never confirm one.
17
17
  *
18
18
  * @param input - Candidates with their intended workloads, the declared
19
19
  * execution mode, and the headroom policy.
@@ -23,7 +23,10 @@ export declare function audioGen(params: AudioGenClientParams): AudioGenResult;
23
23
  * array order. The source is interleaved stereo 48 kHz PCM — a file path
24
24
  * decoded server-side, or raw Float32 LE bytes in `[-1, 1]`.
25
25
  *
26
- * @param params - Loaded model ID, the source audio, the ordered `operations`, and an optional `seed`.
26
+ * @param params - Loaded model ID, the source audio, the ordered `operations`, and optional run
27
+ * controls that apply to every operation: `seed`, a timbre `referenceAudio`, the prompt
28
+ * metadata (`vocalLanguage`, `bpm`, `keyscale`, `timesignature`, `augmentCaptionWithMetadata`),
29
+ * the Repaint DCW controls, and per-run `inferenceSteps` and `shift`.
27
30
  * @returns The same run shape as `audioGen()`: `requestId`, `progressStream`, `audio`, `stats`, and `diagnostics`.
28
31
  *
29
32
  * @example
@@ -47,7 +47,10 @@ export function audioGen(params) {
47
47
  * array order. The source is interleaved stereo 48 kHz PCM — a file path
48
48
  * decoded server-side, or raw Float32 LE bytes in `[-1, 1]`.
49
49
  *
50
- * @param params - Loaded model ID, the source audio, the ordered `operations`, and an optional `seed`.
50
+ * @param params - Loaded model ID, the source audio, the ordered `operations`, and optional run
51
+ * controls that apply to every operation: `seed`, a timbre `referenceAudio`, the prompt
52
+ * metadata (`vocalLanguage`, `bpm`, `keyscale`, `timesignature`, `augmentCaptionWithMetadata`),
53
+ * the Repaint DCW controls, and per-run `inferenceSteps` and `shift`.
51
54
  * @returns The same run shape as `audioGen()`: `requestId`, `progressStream`, `audio`, `stats`, and `diagnostics`.
52
55
  *
53
56
  * @example
@@ -51,7 +51,7 @@ async function resolveBatchPrompts(prompts) {
51
51
  resolvedHandlers.push(handlers);
52
52
  resolvedPrompts.push({
53
53
  ...(prompt.id !== undefined && { id: prompt.id }),
54
- history: prompt.history,
54
+ history: prompt.history.map((message) => ({ ...message, content: message.content ?? '' })),
55
55
  ...(prompt.generationParams && {
56
56
  generationParams: prompt.generationParams
57
57
  }),
@@ -181,7 +181,7 @@ export function completion(params) {
181
181
  const request = {
182
182
  type: 'completionStream',
183
183
  modelId: params.modelId,
184
- history: params.history,
184
+ history: params.history.map((message) => ({ ...message, content: message.content ?? '' })),
185
185
  kvCache: params.kvCache,
186
186
  tools: allTools.length > 0 ? allTools : undefined,
187
187
  stream: params.stream ?? true,
@@ -0,0 +1,26 @@
1
+ import { type DecideParams, type DecisionResult, type DecisionResponse, type RPCOptions } from '../schemas/index.js';
2
+ /**
3
+ * Answers typed decision questions about one state or a batch of states.
4
+ *
5
+ * @param params - Model ID, states, questions, and optional token budgets.
6
+ * @param options - Dispatch options.
7
+ * @returns A promise with a synchronous requestId for cancel(). One state
8
+ * resolves to one result; a batch resolves to results in input order.
9
+ * @throws {RequestValidationFailedError} If the request is invalid.
10
+ * @throws {InferenceCancelledError} If the request is cancelled.
11
+ * @throws {RequestRejectedByPolicyError} If this model's decision queue is full.
12
+ * @throws {InvalidResponseError} If the handler returns a malformed result.
13
+ */
14
+ export declare function decide(params: Extract<DecideParams, {
15
+ state: unknown;
16
+ }>, options?: RPCOptions): Promise<DecisionResult> & {
17
+ requestId: string;
18
+ };
19
+ export declare function decide(params: Extract<DecideParams, {
20
+ states: unknown;
21
+ }>, options?: RPCOptions): Promise<DecisionResult[]> & {
22
+ requestId: string;
23
+ };
24
+ export declare function decide(params: DecideParams, options?: RPCOptions): Promise<DecisionResponse> & {
25
+ requestId: string;
26
+ };
@@ -0,0 +1,26 @@
1
+ import { send } from '../dispatch.js';
2
+ import { decideParamsSchema, decideResponseSchema } from '../schemas/index.js';
3
+ import { InvalidResponseError } from '../errors/index.js';
4
+ import { decoratePromise } from '../utils/decorate-promise.js';
5
+ import { generateRequestId } from '../runtime/request-id.js';
6
+ import { parseClientInput } from './parse-input.js';
7
+ export function decide(params, options) {
8
+ const requestId = generateRequestId();
9
+ return decoratePromise(runDecide(params, requestId, options), { requestId });
10
+ }
11
+ async function runDecide(params, requestId, options) {
12
+ const input = parseClientInput(decideParamsSchema, params);
13
+ const response = await send({ ...input, type: 'decide', requestId }, options);
14
+ if (response.type !== 'decide')
15
+ throw new InvalidResponseError('decide');
16
+ const parsed = decideResponseSchema.safeParse(response);
17
+ if (!parsed.success)
18
+ throw new InvalidResponseError('decide', parsed.error);
19
+ const { result } = parsed.data;
20
+ if ('states' in input
21
+ ? !Array.isArray(result) || result.length !== input.states.length
22
+ : Array.isArray(result)) {
23
+ throw new InvalidResponseError('decide');
24
+ }
25
+ return result;
26
+ }
@@ -12,7 +12,7 @@ export declare function getModelInfo(params: GetModelInfoParams): Promise<{
12
12
  modelId: string;
13
13
  expectedSize: number;
14
14
  sha256Checksum: string;
15
- addon: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | "other";
15
+ addon: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "moss-transcribe" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | "other";
16
16
  isCached: boolean;
17
17
  isLoaded: boolean;
18
18
  cacheFiles: {
@@ -36,3 +36,4 @@ export { state } from './state.js';
36
36
  export { vla, vlaHparams, vlaSetEmbodiment } from './vla.js';
37
37
  export { vlaPreprocessImage, vlaPadState, VLA_DEFAULT_IMAGE_SIZE } from './vla-helpers.js';
38
38
  export { startRpcServer, stopRpcServer, discoverRpcServers } from './rpc-server.js';
39
+ export { decide } from './decide.js';
package/dist/api/index.js CHANGED
@@ -35,3 +35,4 @@ export { state } from './state.js';
35
35
  export { vla, vlaHparams, vlaSetEmbodiment } from './vla.js';
36
36
  export { vlaPreprocessImage, vlaPadState, VLA_DEFAULT_IMAGE_SIZE } from './vla-helpers.js';
37
37
  export { startRpcServer, stopRpcServer, discoverRpcServers } from './rpc-server.js';
38
+ export { decide } from './decide.js';
@@ -83,6 +83,7 @@ export declare function textToSpeech(params: TtsClientParamsInput, options?: RPC
83
83
  * so `await result.sampleRate` can never hang or reject on its own.
84
84
  */
85
85
  export type TtsSideChannel = {
86
+ text: Promise<string | undefined>;
86
87
  sampleRate: Promise<number | undefined>;
87
88
  stats: Promise<TtsStats | undefined>;
88
89
  stopReason: Promise<'completed' | 'cancelled' | undefined>;
@@ -132,29 +132,12 @@ export class TtsMulticast {
132
132
  }
133
133
  function buildTtsRequest(params, requestId) {
134
134
  return {
135
+ ...params,
135
136
  type: 'textToSpeech',
136
- modelId: params.modelId,
137
137
  requestId,
138
138
  inputType: params.inputType ?? 'text',
139
- text: params.text,
140
139
  stream: params.stream ?? true,
141
- sentenceStream: params.sentenceStream ?? false,
142
- ...(params.sentenceStreamLocale !== undefined && {
143
- sentenceStreamLocale: params.sentenceStreamLocale
144
- }),
145
- ...(params.sentenceStreamMaxChunkScalars !== undefined && {
146
- sentenceStreamMaxChunkScalars: params.sentenceStreamMaxChunkScalars
147
- }),
148
- ...(params.description !== undefined && { description: params.description }),
149
- ...(params.voiceDescription !== undefined && { voiceDescription: params.voiceDescription }),
150
- ...(params.voice !== undefined && { voice: params.voice }),
151
- ...(params.emotion !== undefined && { emotion: params.emotion }),
152
- ...(params.pitch !== undefined && { pitch: params.pitch }),
153
- ...(params.pace !== undefined && { pace: params.pace }),
154
- ...(params.expressivity !== undefined && { expressivity: params.expressivity }),
155
- ...(params.noise !== undefined && { noise: params.noise }),
156
- ...(params.reverb !== undefined && { reverb: params.reverb }),
157
- ...(params.quality !== undefined && { quality: params.quality })
140
+ sentenceStream: params.sentenceStream ?? false
158
141
  };
159
142
  }
160
143
  function buildTextToSpeechStreamRequest(params, requestId) {
@@ -253,6 +236,11 @@ export function textToSpeech(params, options) {
253
236
  }
254
237
  /** Exported for test use; not part of the public API surface. */
255
238
  export function createTtsSideChannel() {
239
+ let resolveText;
240
+ const text = new Promise((resolve) => {
241
+ resolveText = resolve;
242
+ });
243
+ let seenText;
256
244
  let resolveSampleRate;
257
245
  let resolveStats;
258
246
  let resolveStopReason;
@@ -270,10 +258,13 @@ export function createTtsSideChannel() {
270
258
  let seenStopReason;
271
259
  let settled = false;
272
260
  return {
261
+ text,
273
262
  sampleRate,
274
263
  stats,
275
264
  stopReason,
276
265
  observe(response) {
266
+ if (response.text !== undefined)
267
+ seenText = response.text;
277
268
  // Resolve on the FIRST frame that carries a rate, not at end of stream:
278
269
  // a caller opening an audio device wants it before draining the audio.
279
270
  // Promise resolution is idempotent, so settle() can still resolve the
@@ -291,6 +282,7 @@ export function createTtsSideChannel() {
291
282
  if (settled)
292
283
  return;
293
284
  settled = true;
285
+ resolveText(seenText);
294
286
  resolveSampleRate(seenSampleRate);
295
287
  resolveStats(latestStats);
296
288
  resolveStopReason(seenStopReason);
@@ -331,6 +323,7 @@ function sentenceStreamTts(request, options) {
331
323
  buffer: Promise.resolve([]),
332
324
  done: multicast.done,
333
325
  requestId: request.requestId,
326
+ text: side.text,
334
327
  sampleRate: side.sampleRate,
335
328
  stats: side.stats,
336
329
  stopReason: side.stopReason
@@ -379,6 +372,7 @@ function plainStreamTts(request, options) {
379
372
  buffer: Promise.resolve([]),
380
373
  done,
381
374
  requestId: request.requestId,
375
+ text: side.text,
382
376
  sampleRate: side.sampleRate,
383
377
  stats: side.stats,
384
378
  stopReason: side.stopReason
@@ -431,6 +425,7 @@ function collectTts(request, options) {
431
425
  buffer: collectTtsBuffer(request, options, resolveDone, rejectDone, side),
432
426
  done,
433
427
  requestId: request.requestId,
428
+ text: side.text,
434
429
  sampleRate: side.sampleRate,
435
430
  stats: side.stats,
436
431
  stopReason: side.stopReason
@@ -449,6 +444,7 @@ async function collectTtsBuffer(request, options, resolveDone, rejectDone, side)
449
444
  buffer = buffer.concat(response.buffer);
450
445
  if (response.done) {
451
446
  resolveDone(true);
447
+ break;
452
448
  }
453
449
  }
454
450
  return buffer;
@@ -12,7 +12,9 @@ function buildTranscribeRequest(params, requestId) {
12
12
  audioChunk: typeof params.audioChunk === 'string'
13
13
  ? { type: 'filePath', value: params.audioChunk }
14
14
  : { type: 'base64', value: params.audioChunk.toString('base64') },
15
- ...(params.prompt && { prompt: params.prompt }),
15
+ ...(params.prompt !== undefined && params.prompt !== null && { prompt: params.prompt }),
16
+ ...(params.hotwords !== undefined && { hotwords: params.hotwords }),
17
+ ...(params.maxNewTokens !== undefined && { maxNewTokens: params.maxNewTokens }),
16
18
  ...(params.metadata === true && { metadata: true }),
17
19
  requestId
18
20
  };
@@ -297,7 +299,8 @@ export function processLineConversation(line, wantsMetadata, onTerminal) {
297
299
  type: 'vad',
298
300
  speaking: response.vad.speaking,
299
301
  probability: response.vad.probability,
300
- ...(response.vad.source && { source: response.vad.source })
302
+ ...(response.vad.source && { source: response.vad.source }),
303
+ ...(response.vad.speakerId !== undefined && { speakerId: response.vad.speakerId })
301
304
  };
302
305
  }
303
306
  if (response.endOfTurn) {
@@ -9,10 +9,10 @@ export declare function createVideoStreamRequest(params: VideoClientParams, requ
9
9
  prompt: string;
10
10
  seed?: number | undefined;
11
11
  vae_tiling?: boolean | undefined;
12
+ steps?: number | undefined;
12
13
  negative_prompt?: string | undefined;
13
14
  width?: number | undefined;
14
15
  height?: number | undefined;
15
- steps?: number | undefined;
16
16
  cfg_scale?: number | undefined;
17
17
  sampling_method?: "euler" | "euler_a" | "heun" | "dpm2" | "dpm++2m" | "dpm++2mv2" | "dpm++2s_a" | "lcm" | "ipndm" | "ipndm_v" | "ddim_trailing" | "tcd" | "res_multistep" | "res_2s" | undefined;
18
18
  scheduler?: "lcm" | "discrete" | "karras" | "exponential" | "ays" | "gits" | "sgm_uniform" | "simple" | "smoothstep" | "kl_optimal" | "bong_tangent" | "ltx2" | undefined;
@@ -50,10 +50,10 @@ export declare function createVideoStreamRequest(params: VideoClientParams, requ
50
50
  prompt: string;
51
51
  seed?: number | undefined;
52
52
  vae_tiling?: boolean | undefined;
53
+ steps?: number | undefined;
53
54
  negative_prompt?: string | undefined;
54
55
  width?: number | undefined;
55
56
  height?: number | undefined;
56
- steps?: number | undefined;
57
57
  cfg_scale?: number | undefined;
58
58
  sampling_method?: "euler" | "euler_a" | "heun" | "dpm2" | "dpm++2m" | "dpm++2mv2" | "dpm++2s_a" | "lcm" | "ipndm" | "ipndm_v" | "ddim_trailing" | "tcd" | "res_multistep" | "res_2s" | undefined;
59
59
  scheduler?: "lcm" | "discrete" | "karras" | "exponential" | "ays" | "gits" | "sgm_uniform" | "simple" | "smoothstep" | "kl_optimal" | "bong_tangent" | "ltx2" | undefined;
@@ -91,10 +91,10 @@ export declare function createVideoStreamRequest(params: VideoClientParams, requ
91
91
  prompt: string;
92
92
  seed?: number | undefined;
93
93
  vae_tiling?: boolean | undefined;
94
+ steps?: number | undefined;
94
95
  negative_prompt?: string | undefined;
95
96
  width?: number | undefined;
96
97
  height?: number | undefined;
97
- steps?: number | undefined;
98
98
  cfg_scale?: number | undefined;
99
99
  sampling_method?: "euler" | "euler_a" | "heun" | "dpm2" | "dpm++2m" | "dpm++2mv2" | "dpm++2s_a" | "lcm" | "ipndm" | "ipndm_v" | "ddim_trailing" | "tcd" | "res_multistep" | "res_2s" | undefined;
100
100
  scheduler?: "lcm" | "discrete" | "karras" | "exponential" | "ays" | "gits" | "sgm_uniform" | "simple" | "smoothstep" | "kl_optimal" | "bong_tangent" | "ltx2" | undefined;
@@ -132,10 +132,10 @@ export declare function createVideoStreamRequest(params: VideoClientParams, requ
132
132
  prompt: string;
133
133
  seed?: number | undefined;
134
134
  vae_tiling?: boolean | undefined;
135
+ steps?: number | undefined;
135
136
  negative_prompt?: string | undefined;
136
137
  width?: number | undefined;
137
138
  height?: number | undefined;
138
- steps?: number | undefined;
139
139
  cfg_scale?: number | undefined;
140
140
  sampling_method?: "euler" | "euler_a" | "heun" | "dpm2" | "dpm++2m" | "dpm++2mv2" | "dpm++2s_a" | "lcm" | "ipndm" | "ipndm_v" | "ddim_trailing" | "tcd" | "res_multistep" | "res_2s" | undefined;
141
141
  scheduler?: "lcm" | "discrete" | "karras" | "exponential" | "ays" | "gits" | "sgm_uniform" | "simple" | "smoothstep" | "kl_optimal" | "bong_tangent" | "ltx2" | undefined;
@@ -173,10 +173,10 @@ export declare function createVideoStreamRequest(params: VideoClientParams, requ
173
173
  prompt: string;
174
174
  seed?: number | undefined;
175
175
  vae_tiling?: boolean | undefined;
176
+ steps?: number | undefined;
176
177
  negative_prompt?: string | undefined;
177
178
  width?: number | undefined;
178
179
  height?: number | undefined;
179
- steps?: number | undefined;
180
180
  cfg_scale?: number | undefined;
181
181
  sampling_method?: "euler" | "euler_a" | "heun" | "dpm2" | "dpm++2m" | "dpm++2mv2" | "dpm++2s_a" | "lcm" | "ipndm" | "ipndm_v" | "ddim_trailing" | "tcd" | "res_multistep" | "res_2s" | undefined;
182
182
  scheduler?: "lcm" | "discrete" | "karras" | "exponential" | "ays" | "gits" | "sgm_uniform" | "simple" | "smoothstep" | "kl_optimal" | "bong_tangent" | "ltx2" | undefined;
@@ -16,13 +16,14 @@ export interface VideoResult {
16
16
  * @param params - Video request parameters (model, prompt, dimensions, frame count, fps, sampler, seed, etc.).
17
17
  * @returns A result object exposing `requestId` (stable identifier for this in-flight generation), `progressStream` (async iterator of `{ step, totalSteps, elapsedMs }`), `outputs` (promise of the generated video buffers, typically a single AVI file), and `stats` (promise of generation statistics).
18
18
  *
19
- * Supports `txt2vid` (text-to-video) and `img2vid` (image-to-video) for both the
20
- * Wan and LTX-2 layouts. For Wan `img2vid`, load the pipeline with
19
+ * Supports `txt2vid` (text-to-video) and `img2vid` (image-to-video) for the Wan,
20
+ * LTX-2, and MiniMax-H3 layouts. For Wan `img2vid`, load the pipeline with
21
21
  * `modelConfig.clipVisionModelSrc` set to `clip_vision_h.safetensors`; LTX-2
22
22
  * `img2vid` conditions on the first frame through its video VAE and needs no
23
23
  * CLIP vision weights (the same LTX-2 model loaded for txt2vid also does
24
- * img2vid). On React Native, the bundled video diffusion models are too large
25
- * for typical mobile devices.
24
+ * img2vid). MiniMax-H3 also conditions through its video VAE and can optionally
25
+ * load `modelConfig.audioVaeModelSrc` for synchronized audio. On React Native,
26
+ * the bundled video diffusion models are too large for typical mobile devices.
26
27
  *
27
28
  * @example Basic txt2vid generation
28
29
  * ```typescript
package/dist/api/video.js CHANGED
@@ -9,13 +9,14 @@ import { decodeBase64 } from '../utils/encoding.js';
9
9
  * @param params - Video request parameters (model, prompt, dimensions, frame count, fps, sampler, seed, etc.).
10
10
  * @returns A result object exposing `requestId` (stable identifier for this in-flight generation), `progressStream` (async iterator of `{ step, totalSteps, elapsedMs }`), `outputs` (promise of the generated video buffers, typically a single AVI file), and `stats` (promise of generation statistics).
11
11
  *
12
- * Supports `txt2vid` (text-to-video) and `img2vid` (image-to-video) for both the
13
- * Wan and LTX-2 layouts. For Wan `img2vid`, load the pipeline with
12
+ * Supports `txt2vid` (text-to-video) and `img2vid` (image-to-video) for the Wan,
13
+ * LTX-2, and MiniMax-H3 layouts. For Wan `img2vid`, load the pipeline with
14
14
  * `modelConfig.clipVisionModelSrc` set to `clip_vision_h.safetensors`; LTX-2
15
15
  * `img2vid` conditions on the first frame through its video VAE and needs no
16
16
  * CLIP vision weights (the same LTX-2 model loaded for txt2vid also does
17
- * img2vid). On React Native, the bundled video diffusion models are too large
18
- * for typical mobile devices.
17
+ * img2vid). MiniMax-H3 also conditions through its video VAE and can optionally
18
+ * load `modelConfig.audioVaeModelSrc` for synchronized audio. On React Native,
19
+ * the bundled video diffusion models are too large for typical mobile devices.
19
20
  *
20
21
  * @example Basic txt2vid generation
21
22
  * ```typescript
@@ -66,6 +66,9 @@ export declare class ModelFileNotFoundError extends QvacErrorBase {
66
66
  export declare class ModelFileNotFoundInDirError extends QvacErrorBase {
67
67
  constructor(modelFile: string, modelDir: string, modelType: string, cause?: unknown);
68
68
  }
69
+ export declare class ModelFitRefusedError extends QvacErrorBase {
70
+ constructor(modelType: string, reason: string, detail?: string, cause?: unknown);
71
+ }
69
72
  export declare class ModelFileLocateFailedError extends QvacErrorBase {
70
73
  constructor(modelType: string, modelPath: string, cause?: unknown);
71
74
  }
@@ -117,6 +117,11 @@ export class ModelFileNotFoundInDirError extends QvacErrorBase {
117
117
  super(createErrorOptions(ERROR_CODES.MODEL_FILE_NOT_FOUND_IN_DIR, [modelFile, modelDir, modelType], cause));
118
118
  }
119
119
  }
120
+ export class ModelFitRefusedError extends QvacErrorBase {
121
+ constructor(modelType, reason, detail, cause) {
122
+ super(createErrorOptions(ERROR_CODES.MODEL_FIT_REFUSED, detail === undefined ? [modelType, reason] : [modelType, reason, detail], cause));
123
+ }
124
+ }
120
125
  export class ModelFileLocateFailedError extends QvacErrorBase {
121
126
  constructor(modelType, modelPath, cause) {
122
127
  super(createErrorOptions(ERROR_CODES.MODEL_FILE_LOCATE_FAILED, [modelType, modelPath], cause));
@@ -1,13 +1,13 @@
1
1
  import type { AssessModelFitRequest, AssessModelFitResponse, ModelFitCandidate, ModelFitEstimateTarget } from '../schemas/assess-model-fit.js';
2
+ import type { FitStubUnavailableReason } from '../resources/model-fit/fit-stub/fetch-fit-stub.js';
2
3
  /**
3
4
  * Runs a pre-download fit assessment worker-side.
4
5
  *
5
6
  * This lives on the worker because that is where the three things it needs
6
7
  * already are: the resource collector for a fresh memory sample, the runtime's
7
8
  * own platform/arch pair, and the registry client. No weights are read and
8
- * nothing is loaded — a single candidate additionally has the registry's
9
- * weightless description fetched, tens of KB, so the engine's own fitter can
10
- * answer instead of the coefficients modelling it.
9
+ * nothing is loaded — each candidate additionally has the registry's weightless
10
+ * description fetched, tens of KB, so the engine's own fitter can answer.
11
11
  */
12
12
  export declare function handleAssessModelFit(request: AssessModelFitRequest): Promise<AssessModelFitResponse>;
13
13
  /**
@@ -20,3 +20,5 @@ export declare function handleAssessModelFit(request: AssessModelFitRequest): Pr
20
20
  * type stands in as the label.
21
21
  */
22
22
  export declare function estimateTargetFor(candidate: ModelFitCandidate): ModelFitEstimateTarget;
23
+ /** Why a load with no description staged for it has no engine verdict. */
24
+ export declare function noStubDetail(reason: FitStubUnavailableReason, message?: string): string;