@qvac/sdk 0.7.1 → 0.8.1

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 (257) hide show
  1. package/NOTICE +73 -10
  2. package/README.md +4 -4
  3. package/bare-imports.json +9 -0
  4. package/dist/client/api/cancel.d.ts +9 -0
  5. package/dist/client/api/cancel.js +9 -0
  6. package/dist/client/api/completion-stream.d.ts +2 -1
  7. package/dist/client/api/completion-stream.js +2 -1
  8. package/dist/client/api/download-asset.d.ts +3 -2
  9. package/dist/client/api/download-asset.js +4 -3
  10. package/dist/client/api/embed.d.ts +5 -2
  11. package/dist/client/api/embed.js +2 -2
  12. package/dist/client/api/get-model-info.d.ts +1 -1
  13. package/dist/client/api/heartbeat.d.ts +30 -0
  14. package/dist/client/api/heartbeat.js +38 -0
  15. package/dist/client/api/index.d.ts +1 -1
  16. package/dist/client/api/index.js +1 -1
  17. package/dist/client/api/invoke-plugin.d.ts +3 -2
  18. package/dist/client/api/invoke-plugin.js +4 -4
  19. package/dist/client/api/load-model.d.ts +12 -10
  20. package/dist/client/api/load-model.js +3 -3
  21. package/dist/client/api/rag.d.ts +10 -10
  22. package/dist/client/api/rag.js +21 -21
  23. package/dist/client/api/text-to-speech.d.ts +2 -2
  24. package/dist/client/api/text-to-speech.js +3 -3
  25. package/dist/client/api/transcribe.d.ts +5 -3
  26. package/dist/client/api/transcribe.js +6 -4
  27. package/dist/client/api/translate.d.ts +2 -2
  28. package/dist/client/api/translate.js +3 -3
  29. package/dist/client/rpc/node-rpc-client.d.ts +2 -7
  30. package/dist/client/rpc/node-rpc-client.js +2 -39
  31. package/dist/client/rpc/profiling/index.d.ts +2 -0
  32. package/dist/client/rpc/profiling/index.js +1 -0
  33. package/dist/client/rpc/profiling/profiler.d.ts +27 -0
  34. package/dist/client/rpc/profiling/profiler.js +139 -0
  35. package/dist/client/rpc/rpc-client.d.ts +2 -2
  36. package/dist/client/rpc/rpc-client.js +174 -12
  37. package/dist/examples/delegated-inference/consumer-profiled.d.ts +2 -0
  38. package/dist/examples/delegated-inference/consumer-profiled.js +67 -0
  39. package/dist/examples/embed-p2p.d.ts +2 -0
  40. package/dist/examples/llamacpp-multimodal.js +1 -1
  41. package/dist/examples/llamacpp-p2p.d.ts +2 -0
  42. package/dist/examples/parallel-download.js +45 -13
  43. package/dist/examples/profiling/basic.d.ts +2 -0
  44. package/dist/examples/profiling/basic.js +71 -0
  45. package/dist/examples/profiling/per-call.d.ts +2 -0
  46. package/dist/examples/profiling/per-call.js +30 -0
  47. package/dist/examples/seed-p2p.d.ts +2 -0
  48. package/dist/examples/transcription/parakeet-ctc-filesystem.d.ts +2 -0
  49. package/dist/examples/transcription/parakeet-ctc-filesystem.js +40 -0
  50. package/dist/examples/transcription/parakeet-microphone-record.d.ts +2 -0
  51. package/dist/examples/transcription/parakeet-microphone-record.js +95 -0
  52. package/dist/examples/transcription/parakeet-sortformer.d.ts +2 -0
  53. package/dist/examples/transcription/parakeet-sortformer.js +115 -0
  54. package/dist/examples/transcription/parakeet-tdt-filesystem.d.ts +2 -0
  55. package/dist/examples/transcription/parakeet-tdt-filesystem.js +44 -0
  56. package/dist/examples/translation/translation-bergamot-pivot.d.ts +2 -0
  57. package/dist/examples/translation/translation-bergamot-pivot.js +73 -0
  58. package/dist/examples/translation/translation-llm-afriquegemma.d.ts +2 -0
  59. package/dist/examples/translation/translation-llm-afriquegemma.js +39 -0
  60. package/dist/index.d.ts +4 -2
  61. package/dist/index.js +3 -1
  62. package/dist/logging/index.d.ts +1 -1
  63. package/dist/logging/index.js +1 -1
  64. package/dist/logging/namespaces.d.ts +3 -9
  65. package/dist/logging/namespaces.js +2 -8
  66. package/dist/logging/registry.js +15 -1
  67. package/dist/models/registry/models.d.ts +1671 -310
  68. package/dist/models/registry/models.js +2116 -710
  69. package/dist/models/update-models/codegen.js +2 -2
  70. package/dist/models/update-models/history.d.ts +11 -0
  71. package/dist/models/update-models/history.js +24 -5
  72. package/dist/models/update-models/index.js +17 -16
  73. package/dist/models/update-models/naming.js +56 -0
  74. package/dist/profiling/aggregator.d.ts +15 -0
  75. package/dist/profiling/aggregator.js +100 -0
  76. package/dist/profiling/clock.d.ts +12 -0
  77. package/dist/profiling/clock.js +51 -0
  78. package/dist/profiling/controller.d.ts +33 -0
  79. package/dist/profiling/controller.js +123 -0
  80. package/dist/profiling/envelope.d.ts +10 -0
  81. package/dist/profiling/envelope.js +36 -0
  82. package/dist/profiling/events.d.ts +20 -0
  83. package/dist/profiling/events.js +37 -0
  84. package/dist/profiling/exporters.d.ts +10 -0
  85. package/dist/profiling/exporters.js +236 -0
  86. package/dist/profiling/index.d.ts +36 -0
  87. package/dist/profiling/index.js +31 -0
  88. package/dist/profiling/ring-buffer.d.ts +19 -0
  89. package/dist/profiling/ring-buffer.js +83 -0
  90. package/dist/profiling/types.d.ts +47 -0
  91. package/dist/profiling/types.js +1 -0
  92. package/dist/schemas/cancel.d.ts +12 -0
  93. package/dist/schemas/cancel.js +2 -0
  94. package/dist/schemas/common.d.ts +1927 -135
  95. package/dist/schemas/common.js +6 -3
  96. package/dist/schemas/completion-stream.d.ts +31 -0
  97. package/dist/schemas/completion-stream.js +13 -0
  98. package/dist/schemas/delegate.d.ts +8 -0
  99. package/dist/schemas/delegate.js +5 -2
  100. package/dist/schemas/download-asset.d.ts +14 -3
  101. package/dist/schemas/download-asset.js +3 -1
  102. package/dist/schemas/engine-addon-map.js +9 -6
  103. package/dist/schemas/get-model-info.d.ts +2 -0
  104. package/dist/schemas/get-model-info.js +1 -0
  105. package/dist/schemas/heartbeat.d.ts +17 -0
  106. package/dist/schemas/heartbeat.js +10 -0
  107. package/dist/schemas/index.d.ts +3 -2
  108. package/dist/schemas/index.js +3 -2
  109. package/dist/schemas/llamacpp-config.d.ts +140 -14
  110. package/dist/schemas/llamacpp-config.js +11 -7
  111. package/dist/schemas/load-model.d.ts +9762 -2515
  112. package/dist/schemas/load-model.js +142 -182
  113. package/dist/schemas/model-src-utils.d.ts +10 -2
  114. package/dist/schemas/model-types.d.ts +19 -1
  115. package/dist/schemas/model-types.js +11 -0
  116. package/dist/schemas/ocr.d.ts +37 -0
  117. package/dist/schemas/ocr.js +5 -0
  118. package/dist/schemas/plugin.d.ts +51 -5
  119. package/dist/schemas/plugin.js +26 -0
  120. package/dist/schemas/profiling.d.ts +105 -0
  121. package/dist/schemas/profiling.js +66 -0
  122. package/dist/schemas/registry.d.ts +18 -0
  123. package/dist/schemas/registry.js +2 -0
  124. package/dist/schemas/reload-config.d.ts +126 -6
  125. package/dist/schemas/reload-config.js +1 -1
  126. package/dist/schemas/sdk-config.d.ts +2280 -24
  127. package/dist/schemas/sdk-config.js +6 -1
  128. package/dist/schemas/sdk-errors-client.d.ts +1 -0
  129. package/dist/schemas/sdk-errors-client.js +7 -0
  130. package/dist/schemas/sdk-errors-server.d.ts +3 -0
  131. package/dist/schemas/sdk-errors-server.js +15 -0
  132. package/dist/schemas/text-to-speech.d.ts +90 -68
  133. package/dist/schemas/text-to-speech.js +16 -33
  134. package/dist/schemas/transcription-config.d.ts +383 -0
  135. package/dist/schemas/{whispercpp-config.js → transcription-config.js} +29 -1
  136. package/dist/schemas/translation-config.d.ts +463 -8
  137. package/dist/schemas/translation-config.js +35 -2
  138. package/dist/server/bare/delegate-rpc-client.js +52 -11
  139. package/dist/server/bare/ops/load-model.d.ts +7 -1
  140. package/dist/server/bare/ops/load-model.js +41 -42
  141. package/dist/server/bare/ops/transcribe.d.ts +3 -0
  142. package/dist/server/bare/ops/transcribe.js +75 -0
  143. package/dist/server/bare/ops/translate.d.ts +2 -0
  144. package/dist/server/bare/ops/translate.js +12 -4
  145. package/dist/server/bare/plugins/index.d.ts +1 -0
  146. package/dist/server/bare/plugins/index.js +1 -0
  147. package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.d.ts +2 -1
  148. package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.js +8 -6
  149. package/dist/server/bare/plugins/llamacpp-completion/plugin.d.ts +108 -3
  150. package/dist/server/bare/plugins/llamacpp-completion/plugin.js +19 -6
  151. package/dist/server/bare/plugins/llamacpp-embedding/plugin.d.ts +32 -2
  152. package/dist/server/bare/plugins/llamacpp-embedding/plugin.js +31 -17
  153. package/dist/server/bare/plugins/nmtcpp-translation/plugin.d.ts +325 -3
  154. package/dist/server/bare/plugins/nmtcpp-translation/plugin.js +117 -13
  155. package/dist/server/bare/plugins/onnx-ocr/plugin.d.ts +50 -2
  156. package/dist/server/bare/plugins/onnx-ocr/plugin.js +46 -5
  157. package/dist/server/bare/plugins/onnx-tts/plugin.d.ts +351 -4
  158. package/dist/server/bare/plugins/onnx-tts/plugin.js +81 -61
  159. package/dist/server/bare/plugins/parakeet-transcription/plugin.d.ts +317 -0
  160. package/dist/server/bare/plugins/parakeet-transcription/plugin.js +154 -0
  161. package/dist/server/bare/plugins/whispercpp-transcription/plugin.d.ts +209 -3
  162. package/dist/server/bare/plugins/whispercpp-transcription/plugin.js +21 -9
  163. package/dist/server/bare/rag-hyperdb/rag-workspace-manager.js +2 -2
  164. package/dist/server/bare/registry/model-config-utils.js +3 -1
  165. package/dist/server/bare/registry/model-registry.d.ts +2 -0
  166. package/dist/server/bare/registry/model-registry.js +2 -1
  167. package/dist/server/bare/utils/audio-input.d.ts +10 -0
  168. package/dist/server/bare/utils/audio-input.js +33 -0
  169. package/dist/server/error-handlers.d.ts +3 -2
  170. package/dist/server/error-handlers.js +11 -8
  171. package/dist/server/plugins/registry.js +5 -1
  172. package/dist/server/rpc/delegate-transport.d.ts +11 -3
  173. package/dist/server/rpc/delegate-transport.js +214 -38
  174. package/dist/server/rpc/delegate-utils.d.ts +2 -0
  175. package/dist/server/rpc/delegate-utils.js +5 -0
  176. package/dist/server/rpc/handle-request.js +43 -4
  177. package/dist/server/rpc/handler-registry.js +33 -4
  178. package/dist/server/rpc/handler-utils.d.ts +5 -4
  179. package/dist/server/rpc/handler-utils.js +114 -31
  180. package/dist/server/rpc/handlers/cancel-delegated.d.ts +4 -0
  181. package/dist/server/rpc/handlers/cancel-delegated.js +71 -0
  182. package/dist/server/rpc/handlers/completion-stream-delegated.d.ts +3 -1
  183. package/dist/server/rpc/handlers/completion-stream-delegated.js +13 -4
  184. package/dist/server/rpc/handlers/download-asset.js +55 -3
  185. package/dist/server/rpc/handlers/heartbeat-delegated.d.ts +4 -0
  186. package/dist/server/rpc/handlers/heartbeat-delegated.js +32 -0
  187. package/dist/server/rpc/handlers/heartbeat.d.ts +3 -0
  188. package/dist/server/rpc/handlers/heartbeat.js +3 -0
  189. package/dist/server/rpc/handlers/index.d.ts +2 -2
  190. package/dist/server/rpc/handlers/index.js +2 -2
  191. package/dist/server/rpc/handlers/load-model/download-stats.d.ts +6 -0
  192. package/dist/server/rpc/handlers/load-model/download-stats.js +87 -0
  193. package/dist/server/rpc/handlers/load-model/handler.js +108 -123
  194. package/dist/server/rpc/handlers/load-model/http.d.ts +2 -1
  195. package/dist/server/rpc/handlers/load-model/http.js +21 -5
  196. package/dist/server/rpc/handlers/load-model/hyperdrive.d.ts +2 -1
  197. package/dist/server/rpc/handlers/load-model/hyperdrive.js +19 -14
  198. package/dist/server/rpc/handlers/load-model/registry.d.ts +2 -1
  199. package/dist/server/rpc/handlers/load-model/registry.js +113 -136
  200. package/dist/server/rpc/handlers/load-model/resolve.d.ts +2 -0
  201. package/dist/server/rpc/handlers/load-model/resolve.js +55 -22
  202. package/dist/server/rpc/handlers/load-model/types.d.ts +29 -0
  203. package/dist/server/rpc/handlers/load-model/types.js +1 -0
  204. package/dist/server/rpc/handlers/load-model-delegated.d.ts +5 -1
  205. package/dist/server/rpc/handlers/load-model-delegated.js +41 -11
  206. package/dist/server/rpc/handlers/plugin-dispatch.js +15 -10
  207. package/dist/server/rpc/handlers/plugin-invoke.js +56 -51
  208. package/dist/server/rpc/handlers/rag.js +24 -0
  209. package/dist/server/rpc/handlers/unload-model-delegated.d.ts +3 -0
  210. package/dist/server/rpc/handlers/unload-model-delegated.js +32 -0
  211. package/dist/server/rpc/profiling/context.d.ts +18 -0
  212. package/dist/server/rpc/profiling/context.js +38 -0
  213. package/dist/server/rpc/profiling/delegation-profiler.d.ts +32 -0
  214. package/dist/server/rpc/profiling/delegation-profiler.js +154 -0
  215. package/dist/server/rpc/profiling/index.d.ts +5 -0
  216. package/dist/server/rpc/profiling/index.js +4 -0
  217. package/dist/server/rpc/profiling/operation-metrics.d.ts +25 -0
  218. package/dist/server/rpc/profiling/operation-metrics.js +199 -0
  219. package/dist/server/rpc/profiling/operation-wrappers.d.ts +18 -0
  220. package/dist/server/rpc/profiling/operation-wrappers.js +124 -0
  221. package/dist/server/rpc/profiling/profiler.d.ts +13 -0
  222. package/dist/server/rpc/profiling/profiler.js +97 -0
  223. package/dist/server/utils/cache.d.ts +2 -1
  224. package/dist/server/utils/cache.js +5 -1
  225. package/dist/server/utils/checksum.d.ts +2 -0
  226. package/dist/server/utils/checksum.js +7 -0
  227. package/dist/server/utils/formatting.d.ts +6 -0
  228. package/dist/server/utils/formatting.js +35 -0
  229. package/dist/server/worker.js +2 -1
  230. package/dist/utils/errors-client.d.ts +3 -0
  231. package/dist/utils/errors-client.js +6 -0
  232. package/dist/utils/errors-server.d.ts +9 -0
  233. package/dist/utils/errors-server.js +15 -0
  234. package/dist/utils/global-singleton.d.ts +2 -0
  235. package/dist/utils/global-singleton.js +10 -0
  236. package/package.json +22 -18
  237. package/dist/client/api/ping.d.ts +0 -11
  238. package/dist/client/api/ping.js +0 -19
  239. package/dist/examples/embed-hyperdrive.d.ts +0 -2
  240. package/dist/examples/llamacpp-hyperdrive.d.ts +0 -2
  241. package/dist/examples/seed-hyperdrive.d.ts +0 -2
  242. package/dist/schemas/ping.d.ts +0 -11
  243. package/dist/schemas/ping.js +0 -8
  244. package/dist/schemas/whispercpp-config.d.ts +0 -70
  245. package/dist/server/bare/plugins/whispercpp-transcription/ops/transcribe-stream.d.ts +0 -3
  246. package/dist/server/bare/plugins/whispercpp-transcription/ops/transcribe-stream.js +0 -81
  247. package/dist/server/rpc/handlers/ping.d.ts +0 -3
  248. package/dist/server/rpc/handlers/ping.js +0 -3
  249. /package/dist/examples/{embed-hyperdrive.js → embed-p2p.js} +0 -0
  250. /package/dist/examples/{llamacpp-hyperdrive.js → llamacpp-p2p.js} +0 -0
  251. /package/dist/examples/{seed-hyperdrive.js → seed-p2p.js} +0 -0
  252. /package/dist/examples/{whispercpp-filesystem.d.ts → transcription/whispercpp-filesystem.d.ts} +0 -0
  253. /package/dist/examples/{whispercpp-filesystem.js → transcription/whispercpp-filesystem.js} +0 -0
  254. /package/dist/examples/{whispercpp-microphone-record.d.ts → transcription/whispercpp-microphone-record.d.ts} +0 -0
  255. /package/dist/examples/{whispercpp-microphone-record.js → transcription/whispercpp-microphone-record.js} +0 -0
  256. /package/dist/examples/{whispercpp-prompt.d.ts → transcription/whispercpp-prompt.d.ts} +0 -0
  257. /package/dist/examples/{whispercpp-prompt.js → transcription/whispercpp-prompt.js} +0 -0
package/NOTICE CHANGED
@@ -37,12 +37,36 @@ Additional requirements per license Section 1.b.i:
37
37
  must prominently display "Built with Llama" on a related website,
38
38
  user interface, blog post, about page, or product documentation.
39
39
 
40
+ # Model Use Restrictions (Open RAIL++-M)
41
+
42
+ As a user of the QVAC SDK and its associated model registry, you agree not to use the Model or its Derivatives:
43
+
44
+ 1. **Illegal Acts:** In any way that violates any applicable national, federal, state, local or international law or regulation.
45
+ 2. **Harm to Minors:** For the purpose of exploiting, harming or attempting to exploit or harm minors in any way.
46
+ 3. **Malicious Content:** To generate or disseminate verifiably false information and/or content with the purpose of harming others.
47
+ 4. **Personal Data:** To generate or disseminate personal identifiable information that can be used to harm an individual.
48
+ 5. **Defamation & Harassment:** To defame, disparage or otherwise harass others.
49
+ 6. **Automated Decisions:** For fully automated decision making that adversely impacts an individual's legal rights or otherwise creates or modifies a binding, enforceable obligation.
50
+ 7. **Discrimination:** For any use intended to or which has the effect of discriminating against or harming individuals or groups based on online or offline social behavior or known or predicted personal or personality characteristics.
51
+ 8. **Exploitation:** To exploit any of the vulnerabilities of a specific group of persons based on their age, social, physical or mental characteristics, in order to materially distort the behavior of a person pertaining to such group in a manner that causes or is likely to cause that person or another person physical or psychological harm.
52
+ 9. **Medical Advice:** To provide medical advice and medical results interpretation.
53
+ 10. **Justice & Law Enforcement:** To generate or disseminate information for use by administration of justice, law enforcement, immigration or asylum processes, such as predicting an individual will commit fraud/crime commitment (e.g. by text profiling, drawing causal relationships between assertions made in documents, indiscriminate and untargeted scraping).
54
+
55
+ ---
56
+ *Note: These restrictions must be included in any distribution of the Model or Derivatives thereof to your end-users.*
57
+
40
58
  =========================================================================
41
59
  Third-Party Model Licenses
42
60
  =========================================================================
43
61
 
44
62
  --- apache-2.0 (Apache License 2.0) ---
45
63
 
64
+ crnn_mobilenet_v3_small
65
+ https://github.com/felixdittrich92/OnnxTR
66
+ db_mobilenet_v3_large
67
+ https://github.com/felixdittrich92/OnnxTR
68
+ db_resnet50
69
+ https://github.com/felixdittrich92/OnnxTR
46
70
  de-tiny-ggml-model-f16
47
71
  https://huggingface.co/primeline/whisper-tiny-german-1224
48
72
  detector_craft
@@ -51,6 +75,10 @@ Third-Party Model Licenses
51
75
  https://huggingface.co/jmb95/laser-dolphin-mixtral-2x7b-dpo-GGUF
52
76
  en-base-ggml-model-f16
53
77
  https://huggingface.co/openai/whisper-base
78
+ FLUX.2-klein-4B
79
+ https://huggingface.co/black-forest-labs/FLUX.2-klein-4B
80
+ FLUX.2-klein-4B-GGUF
81
+ https://huggingface.co/unsloth/FLUX.2-klein-4B-GGUF
54
82
  fr-base-ggml-model-f16
55
83
  https://huggingface.co/personalizedrefrigerator/whisper-base-fr
56
84
  fr-tiny-ggml-model-f16
@@ -95,6 +123,8 @@ Third-Party Model Licenses
95
123
  https://huggingface.co/Helsinki-NLP/opus-mt-roa-en
96
124
  ggml-opus-roa-en
97
125
  https://huggingface.co/Helsinki-NLP/opus-mt-roa-en
126
+ gpt-oss-120b-Q4_K_M-00001-of-00002
127
+ https://huggingface.co/unsloth/gpt-oss-120b-GGUF
98
128
  gpt-oss-20b-GGUF
99
129
  https://huggingface.co/unsloth/gpt-oss-20b-GGUF
100
130
  it-base-ggml-model-f16
@@ -107,10 +137,14 @@ Third-Party Model Licenses
107
137
  https://huggingface.co/CheeLi03/whisper-tiny-ja-puct-4k
108
138
  laser-dolphin-mixtral-2x7b-dpo-GGUF
109
139
  https://huggingface.co/jmb95/laser-dolphin-mixtral-2x7b-dpo-GGUF
140
+ LightOnOCR-2-1B-ocr-soup-GGUF
141
+ https://huggingface.co/noctrex/LightOnOCR-2-1B-ocr-soup-GGUF
110
142
  Llama_3.2_1B_Intruct_Tool_Calling_V2-GGUF
111
143
  https://huggingface.co/mav23/Llama_3.2_1B_Intruct_Tool_Calling_V2-GGUF
112
144
  nb-tiny-ggml-model
113
145
  https://huggingface.co/NbAiLab/nb-whisper-tiny
146
+ parseq
147
+ https://github.com/felixdittrich92/OnnxTR
114
148
  pt-base-ggml-model-f16
115
149
  https://huggingface.co/mariana-coelho-9/whisper-base-pt
116
150
  Qwen3-0.6B-GGUF
@@ -119,6 +153,8 @@ Third-Party Model Licenses
119
153
  https://huggingface.co/unsloth/Qwen3-1.7B-GGUF
120
154
  Qwen3-1.7B-Q4_0-00001-of-00005
121
155
  https://huggingface.co/unsloth/Qwen3-1.7B-GGUF
156
+ Qwen3-4B-GGUF
157
+ https://huggingface.co/unsloth/Qwen3-4B-GGUF
122
158
  Qwen3-4B-Q4_0-00001-of-00005
123
159
  https://huggingface.co/unsloth/Qwen3-4B-GGUF
124
160
  Qwen3-4B-Q4_K_M
@@ -168,8 +204,16 @@ Third-Party Model Licenses
168
204
 
169
205
  --- cc-by-4.0 (Creative Commons Attribution 4.0 International) ---
170
206
 
207
+ AfriqueGemma-4B-GGUF
208
+ https://huggingface.co/mradermacher/AfriqueGemma-4B-GGUF
209
+ decoder_joint_int8
210
+ https://huggingface.co/nasedkinpv/parakeet-tdt-0.6b-v3-onnx-int8
171
211
  decoder_joint-model
172
212
  https://huggingface.co/istupakov/parakeet-tdt-0.6b-v3-onnx
213
+ diar_streaming_sortformer_4spk-v2-onnx
214
+ https://huggingface.co/cgus/diar_streaming_sortformer_4spk-v2-onnx
215
+ encoder_int8
216
+ https://huggingface.co/nasedkinpv/parakeet-tdt-0.6b-v3-onnx-int8
173
217
  encoder-model
174
218
  https://huggingface.co/istupakov/parakeet-tdt-0.6b-v3-onnx
175
219
  ggml-opus-en-de
@@ -180,10 +224,16 @@ Third-Party Model Licenses
180
224
  https://huggingface.co/Helsinki-NLP/opus-mt-ru-en
181
225
  ggml-opus-zh-en
182
226
  https://huggingface.co/Helsinki-NLP/opus-mt-zh-en
227
+ parakeet-ctc-0.6b-ONNX
228
+ https://huggingface.co/onnx-community/parakeet-ctc-0.6b-ONNX
229
+ parakeet-rs
230
+ https://huggingface.co/altunenes/parakeet-rs
183
231
  parakeet-tdt-0.6b-v3-onnx
184
232
  https://huggingface.co/istupakov/parakeet-tdt-0.6b-v3-onnx
185
233
  preprocessor
186
234
  https://huggingface.co/istupakov/parakeet-tdt-0.6b-v3-onnx
235
+ sortformer_int8
236
+ https://huggingface.co/nvidia/diar_streaming_sortformer_4spk-v2
187
237
 
188
238
  --- gemma (Gemma Terms of Use) ---
189
239
 
@@ -208,6 +258,12 @@ Third-Party Model Licenses
208
258
 
209
259
  --- mit (MIT License) ---
210
260
 
261
+ bitnet_b1_58-3B-TQ2_0
262
+ https://huggingface.co/1bitLLM/bitnet_b1_58-3B
263
+ bitnet_b1_58-large-TQ2_0
264
+ https://huggingface.co/1bitLLM/bitnet_b1_58-large
265
+ bitnet_b1_58-xl-TQ2_0
266
+ https://huggingface.co/1bitLLM/bitnet_b1_58-xl
211
267
  chatterbox-multilingual-ONNX
212
268
  https://huggingface.co/onnx-community/chatterbox-multilingual-ONNX
213
269
  chatterbox-turbo-ONNX
@@ -287,6 +343,13 @@ Third-Party Model Licenses
287
343
  Supertonic-TTS-ONNX
288
344
  https://huggingface.co/onnx-community/Supertonic-TTS-ONNX
289
345
 
346
+ --- openrail++ ---
347
+
348
+ stable-diffusion-v2-1-GGUF
349
+ https://huggingface.co/gpustack/stable-diffusion-v2-1-GGUF
350
+ stable-diffusion-xl-base-1.0-GGUF
351
+ https://huggingface.co/gpustack/stable-diffusion-xl-base-1.0-GGUF
352
+
290
353
  =========================================================================
291
354
  Modification Notice
292
355
  =========================================================================
@@ -312,26 +375,28 @@ JavaScript Dependencies
312
375
  @qvac/dl-base@0.2.0
313
376
  @qvac/dl-filesystem@0.2.0
314
377
  @qvac/dl-hyperdrive@0.2.0
315
- @qvac/embed-llamacpp@0.10.7
378
+ @qvac/embed-llamacpp@0.12.0
316
379
  https://github.com/tetherto/qvac-lib-infer-llamacpp-embed
317
380
  @qvac/error@0.1.1
318
381
  @qvac/infer-base@0.1.1
319
382
  @qvac/infer-base@0.2.2
320
383
  @qvac/langdetect-text@0.1.1
321
- @qvac/llm-llamacpp@0.8.9
384
+ @qvac/llm-llamacpp@0.12.2
322
385
  https://github.com/tetherto/qvac-lib-infer-llamacpp-llm
323
386
  @qvac/logging@0.1.0
324
- @qvac/ocr-onnx@0.1.7
387
+ @qvac/ocr-onnx@0.2.0
325
388
  https://github.com/tetherto/qvac-lib-inference-addon-onnx-ocr-fasttext
326
389
  @qvac/rag@0.4.2
327
- @qvac/registry-client@0.2.0
390
+ @qvac/registry-client@0.2.1
328
391
  @qvac/registry-schema@0.1.1
329
392
  @qvac/response@0.1.2
330
- @qvac/transcription-whispercpp@0.3.18
331
- https://github.com/tetherto/qvac-lib-infer-whispercpp
332
- @qvac/translation-nmtcpp@0.3.9
393
+ @qvac/transcription-parakeet@0.2.0
394
+ https://github.com/tetherto/qvac
395
+ @qvac/transcription-whispercpp@0.5.0
396
+ https://github.com/tetherto/qvac
397
+ @qvac/translation-nmtcpp@0.6.1
333
398
  https://github.com/tetherto/qvac-lib-infer-nmtcpp
334
- @qvac/tts-onnx@0.5.4
399
+ @qvac/tts-onnx@0.6.1
335
400
  adaptive-timeout@1.0.1
336
401
  https://github.com/holepunchto/adaptive-timeout
337
402
  b4a@1.7.5
@@ -502,8 +567,6 @@ JavaScript Dependencies
502
567
 
503
568
  --- isc (ISC License) ---
504
569
 
505
- @qvac/util-transcription@0.1.5
506
- https://github.com/tetherto/qvac-util-transcription
507
570
  bits-to-bytes@1.3.0
508
571
  https://github.com/holepunchto/bits-to-bytes
509
572
  compact-encoding-bitfield@1.0.0
package/README.md CHANGED
@@ -167,7 +167,7 @@ bun run examples/path/to/example.ts
167
167
  ### Completion
168
168
 
169
169
  - `llama.cpp` with local files: [`examples/llamacpp-filesystem.ts`](examples/llamacpp-filesystem.ts)
170
- - `llama.cpp` with Hyperdrive: [`examples/llamacpp-hyperdrive.ts`](examples/llamacpp-hyperdrive.ts)
170
+ - `llama.cpp` with P2P registry: [`examples/llamacpp-p2p.ts`](examples/llamacpp-p2p.ts)
171
171
  - `llama.cpp` with HTTP: [`examples/llamacpp-http.ts`](examples/llamacpp-http.ts)
172
172
  - `llama.cpp` with tools/function calls: [`examples/llamacpp-native-tools.ts`](examples/llamacpp-native-tools.ts)
173
173
  - `llama.cpp` with multimodal inference: [`examples/llamacpp-multimodal.ts`](examples/llamacpp-multimodal.ts)
@@ -180,7 +180,7 @@ bun run examples/path/to/example.ts
180
180
 
181
181
  ### Embeddings
182
182
 
183
- - Single and batch embeddings: [`examples/embed-hyperdrive.ts`](examples/embed-hyperdrive.ts)
183
+ - Single and batch embeddings: [`examples/embed-p2p.ts`](examples/embed-p2p.ts)
184
184
 
185
185
  **RAG with HyperDB** (cross-platform):
186
186
 
@@ -478,10 +478,10 @@ bun run build # or `watch` for hotreload
478
478
  bun run build:pack
479
479
  ```
480
480
 
481
- This outputs a tarball under `dist/qvac-sdk-{version}.tgz` that you can install in your project, e.g.:
481
+ This outputs a tarball under `dist/sdk-{version}.tgz` that you can install in your project, e.g.:
482
482
 
483
483
  ```bash
484
- npm i path/to/qvac-sdk-0.3.0.tgz
484
+ npm i path/to/sdk-0.3.0.tgz
485
485
  ```
486
486
 
487
487
  ## More Resources
package/bare-imports.json CHANGED
@@ -31,5 +31,14 @@
31
31
  "readline": {
32
32
  "bare": "bare-readline",
33
33
  "default": "readline"
34
+ },
35
+ "url": {
36
+ "bare": "bare-url",
37
+ "default": "url"
38
+ },
39
+ "node:url": {
40
+ "bare": "bare-url",
41
+ "default": "node:url"
34
42
  }
35
43
  }
44
+
@@ -7,6 +7,7 @@ import { type CancelParams } from "../../schemas/index";
7
7
  * @param params.modelId - The model ID (required for inference cancellation)
8
8
  * @param params.downloadKey - The download key (required for download cancellation)
9
9
  * @param params.clearCache - If true, deletes the partial download file (default: false)
10
+ * @param params.delegate - Delegation target for remote download cancellation (optional)
10
11
  * @param params.workspace - The RAG workspace to cancel (optional, defaults to "default")
11
12
  * @throws {QvacErrorBase} When the response type is invalid or when the cancellation fails
12
13
  *
@@ -23,6 +24,14 @@ import { type CancelParams } from "../../schemas/index";
23
24
  * await cancel({ operation: "downloadAsset", downloadKey: "download-key", clearCache: true });
24
25
  *
25
26
  * @example
27
+ * // Cancel delegated remote download
28
+ * await cancel({
29
+ * operation: "downloadAsset",
30
+ * downloadKey: "download-key",
31
+ * delegate: { topic: "topicHex", providerPublicKey: "peerHex" },
32
+ * });
33
+ *
34
+ * @example
26
35
  * // Cancel RAG operation on default workspace
27
36
  * await cancel({ operation: "rag" });
28
37
  *
@@ -9,6 +9,7 @@ import { InvalidResponseError, CancelFailedError } from "../../utils/errors-clie
9
9
  * @param params.modelId - The model ID (required for inference cancellation)
10
10
  * @param params.downloadKey - The download key (required for download cancellation)
11
11
  * @param params.clearCache - If true, deletes the partial download file (default: false)
12
+ * @param params.delegate - Delegation target for remote download cancellation (optional)
12
13
  * @param params.workspace - The RAG workspace to cancel (optional, defaults to "default")
13
14
  * @throws {QvacErrorBase} When the response type is invalid or when the cancellation fails
14
15
  *
@@ -25,6 +26,14 @@ import { InvalidResponseError, CancelFailedError } from "../../utils/errors-clie
25
26
  * await cancel({ operation: "downloadAsset", downloadKey: "download-key", clearCache: true });
26
27
  *
27
28
  * @example
29
+ * // Cancel delegated remote download
30
+ * await cancel({
31
+ * operation: "downloadAsset",
32
+ * downloadKey: "download-key",
33
+ * delegate: { topic: "topicHex", providerPublicKey: "peerHex" },
34
+ * });
35
+ *
36
+ * @example
28
37
  * // Cancel RAG operation on default workspace
29
38
  * await cancel({ operation: "rag" });
30
39
  *
@@ -1,8 +1,9 @@
1
- import { type CompletionClientParams, type CompletionStats, type McpClientInput, type Tool, type ToolCallEvent, type ToolCallWithCall } from "../../schemas/index";
1
+ import { type CompletionClientParams, type CompletionStats, type McpClientInput, type Tool, type ToolCallEvent, type ToolCallWithCall, type RPCOptions } from "../../schemas/index";
2
2
  import { type ToolInput } from "../../utils/tool-helpers";
3
3
  type CompletionParams = Omit<CompletionClientParams, "tools"> & {
4
4
  tools?: Tool[] | ToolInput[];
5
5
  mcp?: McpClientInput[];
6
+ rpcOptions?: RPCOptions;
6
7
  };
7
8
  /**
8
9
  * Generates completion from a language model based on conversation history.
@@ -112,8 +112,9 @@ export function completion(params) {
112
112
  kvCache: params.kvCache,
113
113
  tools: allTools.length > 0 ? allTools : undefined,
114
114
  stream: params.stream ?? true,
115
+ generationParams: params.generationParams,
115
116
  };
116
- const responses = streamRpc(request);
117
+ const responses = streamRpc(request, params.rpcOptions);
117
118
  for await (const response of responses) {
118
119
  if (response &&
119
120
  typeof response === "object" &&
@@ -1,4 +1,4 @@
1
- import { type DownloadAssetOptions as BaseDownloadAssetOptions } from "../../schemas/index";
1
+ import { type DownloadAssetOptions as BaseDownloadAssetOptions, type RPCOptions } from "../../schemas/index";
2
2
  export type DownloadAssetOptions = BaseDownloadAssetOptions;
3
3
  /**
4
4
  * Downloads an asset (model file) without loading it into memory.
@@ -11,6 +11,7 @@ export type DownloadAssetOptions = BaseDownloadAssetOptions;
11
11
  * - assetSrc: The location from which the asset is downloaded (local path, remote URL, or Hyperdrive URL)
12
12
  * - seed: Optional boolean for hyperdrive seeding
13
13
  * - onProgress: Optional callback for download progress
14
+ * @param rpcOptions - Optional RPC options including per-call profiling configuration
14
15
  *
15
16
  * @returns Promise that resolves to the asset ID (either the provided assetSrc or a generated ID)
16
17
  *
@@ -35,5 +36,5 @@ export type DownloadAssetOptions = BaseDownloadAssetOptions;
35
36
  * });
36
37
  * ```
37
38
  */
38
- export declare function downloadAsset(options: DownloadAssetOptions): Promise<string>;
39
+ export declare function downloadAsset(options: DownloadAssetOptions, rpcOptions?: RPCOptions): Promise<string>;
39
40
  //# sourceMappingURL=download-asset.d.ts.map
@@ -12,6 +12,7 @@ import { DownloadAssetFailedError, StreamEndedError, InvalidResponseError, } fro
12
12
  * - assetSrc: The location from which the asset is downloaded (local path, remote URL, or Hyperdrive URL)
13
13
  * - seed: Optional boolean for hyperdrive seeding
14
14
  * - onProgress: Optional callback for download progress
15
+ * @param rpcOptions - Optional RPC options including per-call profiling configuration
15
16
  *
16
17
  * @returns Promise that resolves to the asset ID (either the provided assetSrc or a generated ID)
17
18
  *
@@ -36,11 +37,11 @@ import { DownloadAssetFailedError, StreamEndedError, InvalidResponseError, } fro
36
37
  * });
37
38
  * ```
38
39
  */
39
- export async function downloadAsset(options) {
40
+ export async function downloadAsset(options, rpcOptions) {
40
41
  const request = downloadAssetOptionsToRequestSchema.parse(options);
41
42
  if (options.onProgress) {
42
43
  // Use streaming for progress updates
43
- for await (const response of stream(request)) {
44
+ for await (const response of stream(request, rpcOptions)) {
44
45
  if (response.type === "modelProgress") {
45
46
  options.onProgress(response);
46
47
  }
@@ -55,7 +56,7 @@ export async function downloadAsset(options) {
55
56
  }
56
57
  else {
57
58
  // Use regular send for simple downloading
58
- const response = await send(request);
59
+ const response = await send(request, rpcOptions);
59
60
  if (response.type !== "downloadAsset") {
60
61
  throw new InvalidResponseError("downloadAsset");
61
62
  }
@@ -1,25 +1,28 @@
1
+ import { type RPCOptions } from "../../schemas/index";
1
2
  /**
2
3
  * Generates embeddings for a single text using a specified model.
3
4
  *
4
5
  * @param params - The parameters for the embedding
5
6
  * @param params.modelId - The identifier of the embedding model to use
6
7
  * @param params.text - The input text to embed
8
+ * @param options - Optional RPC options including per-call profiling
7
9
  * @throws {QvacErrorBase} When the response type is invalid or when the embedding fails
8
10
  */
9
11
  export declare function embed(params: {
10
12
  modelId: string;
11
13
  text: string;
12
- }): Promise<number[]>;
14
+ }, options?: RPCOptions): Promise<number[]>;
13
15
  /**
14
16
  * Generates embeddings for multiple texts using a specified model.
15
17
  *
16
18
  * @param params - The parameters for the embedding
17
19
  * @param params.modelId - The identifier of the embedding model to use
18
20
  * @param params.text - The input texts to embed
21
+ * @param options - Optional RPC options including per-call profiling
19
22
  * @throws {QvacErrorBase} When the response type is invalid or when the embedding fails
20
23
  */
21
24
  export declare function embed(params: {
22
25
  modelId: string;
23
26
  text: string[];
24
- }): Promise<number[][]>;
27
+ }, options?: RPCOptions): Promise<number[][]>;
25
28
  //# sourceMappingURL=embed.d.ts.map
@@ -1,12 +1,12 @@
1
1
  import { send } from "../rpc/rpc-client.js";
2
2
  import {} from "../../schemas/index.js";
3
3
  import { InvalidResponseError } from "../../utils/errors-client.js";
4
- export async function embed(params) {
4
+ export async function embed(params, options) {
5
5
  const request = {
6
6
  type: "embed",
7
7
  ...params,
8
8
  };
9
- const response = await send(request);
9
+ const response = await send(request, options);
10
10
  if (response.type !== "embed") {
11
11
  throw new InvalidResponseError("embed");
12
12
  }
@@ -4,7 +4,7 @@ export declare function getModelInfo(params: GetModelInfoParams): Promise<{
4
4
  modelId: string;
5
5
  expectedSize: number;
6
6
  sha256Checksum: string;
7
- addon: "llm" | "whisper" | "embeddings" | "nmt" | "tts" | "ocr" | "vad" | "other";
7
+ addon: "llm" | "whisper" | "embeddings" | "nmt" | "parakeet" | "tts" | "ocr" | "vad" | "other";
8
8
  isCached: boolean;
9
9
  isLoaded: boolean;
10
10
  cacheFiles: {
@@ -0,0 +1,30 @@
1
+ import { type HeartbeatResponse } from "../../schemas/index";
2
+ import type { DelegateBase } from "../../schemas/delegate";
3
+ /**
4
+ * Checks if a delegated provider is online by sending a heartbeat round-trip.
5
+ * Can also be used to check if the local SDK worker is responsive.
6
+ *
7
+ * @param params - Delegation target to check
8
+ * @param params.delegate - The provider to check (topic + publicKey + optional timeout)
9
+ * @returns A promise that resolves to a heartbeat response if the provider is reachable.
10
+ * @throws {QvacErrorBase} When the provider is unreachable or the response is invalid.
11
+ *
12
+ * @example
13
+ * // Check if a delegated provider is online
14
+ * try {
15
+ * await heartbeat({
16
+ * delegate: { topic: "topicHex", providerPublicKey: "peerHex", timeout: 3000 },
17
+ * });
18
+ * console.log("Provider is online");
19
+ * } catch {
20
+ * console.log("Provider is offline");
21
+ * }
22
+ *
23
+ * @example
24
+ * // Check if the local SDK worker is responsive
25
+ * await heartbeat();
26
+ */
27
+ export declare function heartbeat(params?: {
28
+ delegate?: DelegateBase;
29
+ }): Promise<HeartbeatResponse>;
30
+ //# sourceMappingURL=heartbeat.d.ts.map
@@ -0,0 +1,38 @@
1
+ import {} from "../../schemas/index.js";
2
+ import { send } from "../rpc/rpc-client.js";
3
+ import { InvalidResponseError } from "../../utils/errors-client.js";
4
+ /**
5
+ * Checks if a delegated provider is online by sending a heartbeat round-trip.
6
+ * Can also be used to check if the local SDK worker is responsive.
7
+ *
8
+ * @param params - Delegation target to check
9
+ * @param params.delegate - The provider to check (topic + publicKey + optional timeout)
10
+ * @returns A promise that resolves to a heartbeat response if the provider is reachable.
11
+ * @throws {QvacErrorBase} When the provider is unreachable or the response is invalid.
12
+ *
13
+ * @example
14
+ * // Check if a delegated provider is online
15
+ * try {
16
+ * await heartbeat({
17
+ * delegate: { topic: "topicHex", providerPublicKey: "peerHex", timeout: 3000 },
18
+ * });
19
+ * console.log("Provider is online");
20
+ * } catch {
21
+ * console.log("Provider is offline");
22
+ * }
23
+ *
24
+ * @example
25
+ * // Check if the local SDK worker is responsive
26
+ * await heartbeat();
27
+ */
28
+ export async function heartbeat(params) {
29
+ const request = {
30
+ type: "heartbeat",
31
+ ...(params?.delegate && { delegate: params.delegate }),
32
+ };
33
+ const response = await send(request);
34
+ if (response.type !== "heartbeat") {
35
+ throw new InvalidResponseError("heartbeat");
36
+ }
37
+ return response;
38
+ }
@@ -4,7 +4,7 @@ export { completion } from "./completion-stream";
4
4
  export { deleteCache } from "./delete-cache";
5
5
  export { unloadModel } from "./unload-model";
6
6
  export { loggingStream } from "./logging-stream";
7
- export { ping } from "./ping";
7
+ export { heartbeat } from "./heartbeat";
8
8
  export { transcribe, transcribeStream } from "./transcribe";
9
9
  export { embed } from "./embed";
10
10
  export { translate } from "./translate";
@@ -4,7 +4,7 @@ export { completion } from "./completion-stream.js";
4
4
  export { deleteCache } from "./delete-cache.js";
5
5
  export { unloadModel } from "./unload-model.js";
6
6
  export { loggingStream } from "./logging-stream.js";
7
- export { ping } from "./ping.js";
7
+ export { heartbeat } from "./heartbeat.js";
8
8
  export { transcribe, transcribeStream } from "./transcribe.js";
9
9
  export { embed } from "./embed.js";
10
10
  export { translate } from "./translate.js";
@@ -1,3 +1,4 @@
1
+ import type { RPCOptions } from "../../schemas/index";
1
2
  export interface InvokePluginOptions<TParams = unknown> {
2
3
  modelId: string;
3
4
  handler: string;
@@ -6,9 +7,9 @@ export interface InvokePluginOptions<TParams = unknown> {
6
7
  /**
7
8
  * Invoke a non-streaming plugin handler.
8
9
  */
9
- export declare function invokePlugin<TResponse = unknown, TParams = unknown>(options: InvokePluginOptions<TParams>): Promise<TResponse>;
10
+ export declare function invokePlugin<TResponse = unknown, TParams = unknown>(options: InvokePluginOptions<TParams>, rpcOptions?: RPCOptions): Promise<TResponse>;
10
11
  /**
11
12
  * Invoke a streaming plugin handler.
12
13
  */
13
- export declare function invokePluginStream<TResponse = unknown, TParams = unknown>(options: InvokePluginOptions<TParams>): AsyncGenerator<TResponse>;
14
+ export declare function invokePluginStream<TResponse = unknown, TParams = unknown>(options: InvokePluginOptions<TParams>, rpcOptions?: RPCOptions): AsyncGenerator<TResponse>;
14
15
  //# sourceMappingURL=invoke-plugin.d.ts.map
@@ -3,14 +3,14 @@ import { InvalidResponseError } from "../../utils/errors-client.js";
3
3
  /**
4
4
  * Invoke a non-streaming plugin handler.
5
5
  */
6
- export async function invokePlugin(options) {
6
+ export async function invokePlugin(options, rpcOptions) {
7
7
  const request = {
8
8
  type: "pluginInvoke",
9
9
  modelId: options.modelId,
10
10
  handler: options.handler,
11
11
  params: options.params,
12
12
  };
13
- const response = await send(request);
13
+ const response = await send(request, rpcOptions);
14
14
  if (response.type !== "pluginInvoke") {
15
15
  throw new InvalidResponseError("pluginInvoke");
16
16
  }
@@ -19,14 +19,14 @@ export async function invokePlugin(options) {
19
19
  /**
20
20
  * Invoke a streaming plugin handler.
21
21
  */
22
- export async function* invokePluginStream(options) {
22
+ export async function* invokePluginStream(options, rpcOptions) {
23
23
  const request = {
24
24
  type: "pluginInvokeStream",
25
25
  modelId: options.modelId,
26
26
  handler: options.handler,
27
27
  params: options.params,
28
28
  };
29
- for await (const chunk of stream(request)) {
29
+ for await (const chunk of stream(request, rpcOptions)) {
30
30
  const response = chunk;
31
31
  if (response.type !== "pluginInvokeStream") {
32
32
  throw new InvalidResponseError("pluginInvokeStream");
@@ -1,4 +1,4 @@
1
- import { type LoadModelOptions, type ReloadConfigOptions } from "../../schemas/index";
1
+ import { type LoadModelOptions, type ReloadConfigOptions, type RPCOptions } from "../../schemas/index";
2
2
  /**
3
3
  * Loads a machine learning model from a local path, remote URL, or Hyperdrive key.
4
4
  *
@@ -11,11 +11,10 @@ import { type LoadModelOptions, type ReloadConfigOptions } from "../../schemas/i
11
11
  * @param options - An object that defines all configuration parameters required for loading the model, including:
12
12
  * - modelSrc: The location from which the model weights are fetched (local path, remote URL, or Hyperdrive URL)
13
13
  * - modelType: The type of model ("llm", "whisper", "embeddings", "nmt", or "tts")
14
- * - modelConfig: Model-specific configuration options
15
- * - projectionModelSrc: (LLM only) Projection model source for multimodal models
16
- * - vadModelSrc: (Whisper only) VAD model source for voice activity detection
14
+ * - modelConfig: Model-specific configuration options (companion sources, model parameters, etc.)
17
15
  * - onProgress: Callback for download progress updates
18
16
  * - logger: Logger instance for model operation logs
17
+ * @param rpcOptions - Optional RPC options including per-call profiling configuration
19
18
  *
20
19
  * @returns Promise that resolves to the model ID (either the provided modelSrc or a generated ID)
21
20
  *
@@ -58,8 +57,10 @@ import { type LoadModelOptions, type ReloadConfigOptions } from "../../schemas/i
58
57
  * const multimodalId = await loadModel({
59
58
  * modelSrc: "https://huggingface.co/.../main-model.gguf",
60
59
  * modelType: "llm",
61
- * projectionModelSrc: "https://huggingface.co/.../projection-model.gguf",
62
- * modelConfig: { ctx_size: 512 },
60
+ * modelConfig: {
61
+ * ctx_size: 512,
62
+ * projectionModelSrc: "https://huggingface.co/.../projection-model.gguf"
63
+ * },
63
64
  * onProgress: (progress) => {
64
65
  * console.log(`Loading: ${progress.percentage}%`);
65
66
  * }
@@ -69,12 +70,12 @@ import { type LoadModelOptions, type ReloadConfigOptions } from "../../schemas/i
69
70
  * const whisperId = await loadModel({
70
71
  * modelSrc: "https://huggingface.co/.../whisper-model.gguf",
71
72
  * modelType: "whisper",
72
- * vadModelSrc: "https://huggingface.co/.../vad-model.bin",
73
73
  * modelConfig: {
74
74
  * mode: "caption",
75
75
  * output_format: "plaintext",
76
76
  * min_seconds: 2,
77
- * max_seconds: 6
77
+ * max_seconds: 6,
78
+ * vadModelSrc: "https://huggingface.co/.../vad-model.bin"
78
79
  * }
79
80
  * });
80
81
  *
@@ -89,7 +90,7 @@ import { type LoadModelOptions, type ReloadConfigOptions } from "../../schemas/i
89
90
  * });
90
91
  * ```
91
92
  */
92
- export declare function loadModel(options: LoadModelOptions): Promise<string>;
93
+ export declare function loadModel(options: LoadModelOptions, rpcOptions?: RPCOptions): Promise<string>;
93
94
  /**
94
95
  * Hot-reloads configuration on an already loaded model.
95
96
  *
@@ -97,6 +98,7 @@ export declare function loadModel(options: LoadModelOptions): Promise<string>;
97
98
  * - modelId: The ID of an existing loaded model
98
99
  * - modelType: The type of model (must match the loaded model)
99
100
  * - modelConfig: New configuration to apply
101
+ * @param rpcOptions - Optional RPC options including per-call profiling configuration
100
102
  *
101
103
  * @returns Promise that resolves to the model ID
102
104
  *
@@ -120,5 +122,5 @@ export declare function loadModel(options: LoadModelOptions): Promise<string>;
120
122
  * });
121
123
  * ```
122
124
  */
123
- export declare function loadModel(options: ReloadConfigOptions): Promise<string>;
125
+ export declare function loadModel(options: ReloadConfigOptions, rpcOptions?: RPCOptions): Promise<string>;
124
126
  //# sourceMappingURL=load-model.d.ts.map
@@ -4,7 +4,7 @@ import { loadModelOptionsToRequestSchema, reloadConfigOptionsToRequestSchema, is
4
4
  import { ModelLoadFailedError, StreamEndedError, InvalidResponseError, } from "../../utils/errors-client.js";
5
5
  import { getClientLogger } from "../../logging/index.js";
6
6
  const logger = getClientLogger();
7
- export async function loadModel(options) {
7
+ export async function loadModel(options, rpcOptions) {
8
8
  const isReloadConfig = "modelId" in options && !("modelSrc" in options);
9
9
  // Warn about deprecated alias usage
10
10
  if (!isReloadConfig && isModelTypeAlias(options.modelType)) {
@@ -18,7 +18,7 @@ export async function loadModel(options) {
18
18
  const onProgress = isReloadConfig ? undefined : options.onProgress;
19
19
  if (onProgress) {
20
20
  // Use streaming for progress updates
21
- for await (const response of stream(request)) {
21
+ for await (const response of stream(request, rpcOptions)) {
22
22
  if (response.type === "modelProgress") {
23
23
  onProgress(response);
24
24
  }
@@ -42,7 +42,7 @@ export async function loadModel(options) {
42
42
  throw new StreamEndedError();
43
43
  }
44
44
  // Use regular send for simple loading
45
- const response = await send(request);
45
+ const response = await send(request, rpcOptions);
46
46
  if (response.type !== "loadModel") {
47
47
  throw new InvalidResponseError("loadModel");
48
48
  }