@qvac/inference 0.20.1 → 0.21.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 (212) hide show
  1. package/NOTICE +90 -24
  2. package/README.md +8 -5
  3. package/dist/api/bci-transcribe.d.ts +4 -1
  4. package/dist/api/index.d.ts +1 -0
  5. package/dist/api/index.js +1 -0
  6. package/dist/api/rpc-server.d.ts +19 -0
  7. package/dist/api/rpc-server.js +44 -0
  8. package/dist/api/text-to-speech.d.ts +9 -0
  9. package/dist/api/text-to-speech.js +9 -0
  10. package/dist/api/transcribe.d.ts +11 -7
  11. package/dist/api/transcribe.js +47 -15
  12. package/dist/api/video-request.d.ts +5 -5
  13. package/dist/dispatch.js +39 -7
  14. package/dist/errors/index.d.ts +7 -0
  15. package/dist/errors/index.js +15 -0
  16. package/dist/handlers/assess-model-fit.d.ts +8 -20
  17. package/dist/handlers/assess-model-fit.js +195 -77
  18. package/dist/handlers/completion-orchestrate.js +17 -0
  19. package/dist/handlers/get-loaded-model-info.js +4 -1
  20. package/dist/handlers/get-model-info.js +29 -1
  21. package/dist/handlers/load-model/coreml-sidecars.d.ts +25 -0
  22. package/dist/handlers/load-model/coreml-sidecars.js +274 -0
  23. package/dist/handlers/load-model/hyperdrive.js +2 -2
  24. package/dist/handlers/load-model/registry.js +59 -0
  25. package/dist/handlers/rpc-server.d.ts +23 -0
  26. package/dist/handlers/rpc-server.js +141 -0
  27. package/dist/index.d.ts +2 -1
  28. package/dist/index.js +2 -1
  29. package/dist/models/registry/models.d.ts +7731 -5672
  30. package/dist/models/registry/models.js +4652 -2526
  31. package/dist/models/registry/resource-profiles.js +481 -94
  32. package/dist/plugins/builtin/audiogen-ggml/plugin.d.ts +8 -6
  33. package/dist/plugins/builtin/audiogen-ggml/plugin.js +2 -1
  34. package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.d.ts +73 -1
  35. package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.js +37 -19
  36. package/dist/plugins/builtin/ggml-vla/plugin.d.ts +1 -1
  37. package/dist/plugins/builtin/llamacpp-completion/ops/batch-completion-stream.js +9 -5
  38. package/dist/plugins/builtin/llamacpp-completion/ops/completion-stats.d.ts +1 -1
  39. package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.js +16 -7
  40. package/dist/plugins/builtin/llamacpp-completion/plugin.d.ts +22 -11
  41. package/dist/plugins/builtin/llamacpp-completion/plugin.js +9 -3
  42. package/dist/plugins/builtin/llamacpp-embedding/plugin.d.ts +5 -3
  43. package/dist/plugins/builtin/llamacpp-embedding/plugin.js +2 -1
  44. package/dist/plugins/builtin/parakeet-transcription/plugin.d.ts +121 -0
  45. package/dist/plugins/builtin/parakeet-transcription/plugin.js +56 -27
  46. package/dist/plugins/builtin/sdcpp-generation/plugin.d.ts +8 -2
  47. package/dist/plugins/builtin/sdcpp-generation/plugin.js +7 -2
  48. package/dist/plugins/builtin/tts-ggml/ops/parler-options.d.ts +2 -0
  49. package/dist/plugins/builtin/tts-ggml/ops/parler-options.js +5 -1
  50. package/dist/plugins/builtin/tts-ggml/ops/text-to-speech.js +27 -10
  51. package/dist/plugins/builtin/tts-ggml/plugin.d.ts +181 -0
  52. package/dist/plugins/builtin/tts-ggml/plugin.js +84 -2
  53. package/dist/plugins/builtin/whispercpp-transcription/plugin.d.ts +136 -0
  54. package/dist/plugins/builtin/whispercpp-transcription/plugin.js +18 -7
  55. package/dist/plugins/ops/bci-transcribe.d.ts +6 -2
  56. package/dist/plugins/ops/bci-transcribe.js +18 -13
  57. package/dist/plugins/ops/load-model.js +2 -2
  58. package/dist/plugins/ops/transcribe.d.ts +4 -2
  59. package/dist/plugins/ops/transcribe.js +39 -2
  60. package/dist/plugins/ops/translate-stats.d.ts +2 -1
  61. package/dist/plugins/ops/translate-stats.js +64 -7
  62. package/dist/plugins/ops/translate.js +20 -4
  63. package/dist/profiling/operation-metrics.js +56 -0
  64. package/dist/registry.js +4 -0
  65. package/dist/resources/model-fit/assess.d.ts +37 -2
  66. package/dist/resources/model-fit/assess.js +24 -3
  67. package/dist/resources/model-fit/estimators/llm.js +2 -2
  68. package/dist/resources/model-fit/estimators/whisper.js +3 -4
  69. package/dist/resources/model-fit/fit-stub/fetch-fit-stub.d.ts +20 -1
  70. package/dist/resources/model-fit/fit-stub/fetch-fit-stub.js +126 -47
  71. package/dist/resources/model-fit/fit-stub/project-fit-from-load.d.ts +27 -0
  72. package/dist/resources/model-fit/fit-stub/project-fit-from-load.js +31 -0
  73. package/dist/resources/model-fit/fit-stub/resolve-load-from-stubs.d.ts +38 -0
  74. package/dist/resources/model-fit/fit-stub/resolve-load-from-stubs.js +138 -0
  75. package/dist/resources/model-fit/floor.js +2 -2
  76. package/dist/resources/model-fit/native-probe/advisory-fit.d.ts +9 -6
  77. package/dist/resources/model-fit/native-probe/advisory-fit.js +129 -80
  78. package/dist/resources/model-fit/native-probe/child-engine-fit.d.ts +2 -0
  79. package/dist/resources/model-fit/native-probe/child-engine-fit.js +41 -0
  80. package/dist/resources/model-fit/native-probe/classify-fit.d.ts +6 -0
  81. package/dist/resources/model-fit/native-probe/classify-fit.js +135 -0
  82. package/dist/resources/model-fit/native-probe/create-fit-request.d.ts +28 -0
  83. package/dist/resources/model-fit/native-probe/create-fit-request.js +51 -0
  84. package/dist/resources/model-fit/native-probe/engine-fit.d.ts +59 -0
  85. package/dist/resources/model-fit/native-probe/engine-fit.js +13 -0
  86. package/dist/resources/model-fit/native-probe/engines/asr.d.ts +10 -0
  87. package/dist/resources/model-fit/native-probe/engines/asr.js +103 -0
  88. package/dist/resources/model-fit/native-probe/engines/audiogen.d.ts +8 -0
  89. package/dist/resources/model-fit/native-probe/engines/audiogen.js +35 -0
  90. package/dist/resources/model-fit/native-probe/engines/diffusion.d.ts +7 -0
  91. package/dist/resources/model-fit/native-probe/engines/diffusion.js +55 -0
  92. package/dist/resources/model-fit/native-probe/engines/gpu.d.ts +10 -0
  93. package/dist/resources/model-fit/native-probe/engines/gpu.js +21 -0
  94. package/dist/resources/model-fit/native-probe/engines/llama.d.ts +13 -0
  95. package/dist/resources/model-fit/native-probe/engines/llama.js +145 -0
  96. package/dist/resources/model-fit/native-probe/engines/tts.d.ts +8 -0
  97. package/dist/resources/model-fit/native-probe/engines/tts.js +106 -0
  98. package/dist/resources/model-fit/native-probe/fit-outcome.d.ts +16 -0
  99. package/dist/resources/model-fit/native-probe/fit-outcome.js +1 -0
  100. package/dist/resources/model-fit/native-probe/fit-process.d.ts +27 -0
  101. package/dist/resources/model-fit/native-probe/fit-process.js +55 -0
  102. package/dist/resources/model-fit/native-probe/fit-runner.d.ts +1 -0
  103. package/dist/resources/model-fit/native-probe/fit-runner.js +58 -0
  104. package/dist/resources/model-fit/native-probe/run-fit.d.ts +24 -0
  105. package/dist/resources/model-fit/native-probe/run-fit.js +20 -0
  106. package/dist/resources/model-fit/native-probe/run-in-process-fit.d.ts +14 -34
  107. package/dist/resources/model-fit/native-probe/run-in-process-fit.js +55 -139
  108. package/dist/resources/model-fit/native-probe/run-isolated-fit.d.ts +5 -12
  109. package/dist/resources/model-fit/native-probe/run-isolated-fit.js +13 -8
  110. package/dist/resources/model-fit/platform.d.ts +9 -0
  111. package/dist/resources/model-fit/platform.js +28 -0
  112. package/dist/rpc/device-map.d.ts +13 -0
  113. package/dist/rpc/device-map.js +22 -0
  114. package/dist/rpc/discovery.d.ts +12 -0
  115. package/dist/rpc/discovery.js +225 -0
  116. package/dist/rpc/ggml-provider.d.ts +4 -0
  117. package/dist/rpc/ggml-provider.js +25 -0
  118. package/dist/rpc/index.d.ts +2 -0
  119. package/dist/rpc/index.js +1 -0
  120. package/dist/rpc/instance.d.ts +6 -0
  121. package/dist/rpc/instance.js +21 -0
  122. package/dist/rpc/inventory.d.ts +5 -0
  123. package/dist/rpc/inventory.js +144 -0
  124. package/dist/rpc/manager.d.ts +14 -0
  125. package/dist/rpc/manager.js +174 -0
  126. package/dist/rpc/network.d.ts +11 -0
  127. package/dist/rpc/network.js +85 -0
  128. package/dist/rpc/provider.d.ts +6 -0
  129. package/dist/rpc/provider.js +24 -0
  130. package/dist/runtime/lifecycle.js +31 -13
  131. package/dist/runtime/request-context.d.ts +1 -1
  132. package/dist/runtime/state.js +5 -0
  133. package/dist/schemas/assess-model-fit.d.ts +269 -85
  134. package/dist/schemas/assess-model-fit.js +78 -54
  135. package/dist/schemas/audio-gen.d.ts +6 -6
  136. package/dist/schemas/audio-gen.js +2 -2
  137. package/dist/schemas/batch-completion-stream.d.ts +13 -5
  138. package/dist/schemas/batch-completion-stream.js +5 -3
  139. package/dist/schemas/bci-config.js +1 -1
  140. package/dist/schemas/bci.d.ts +86 -1
  141. package/dist/schemas/bci.js +21 -2
  142. package/dist/schemas/cancel.d.ts +10 -0
  143. package/dist/schemas/cancel.js +2 -0
  144. package/dist/schemas/common.d.ts +708 -66
  145. package/dist/schemas/common.js +7 -0
  146. package/dist/schemas/completion-event.d.ts +6 -6
  147. package/dist/schemas/completion-stream.d.ts +27 -8
  148. package/dist/schemas/completion-stream.js +41 -4
  149. package/dist/schemas/config.d.ts +104 -36
  150. package/dist/schemas/config.js +10 -0
  151. package/dist/schemas/embed.d.ts +2 -2
  152. package/dist/schemas/error.js +13 -0
  153. package/dist/schemas/errors.d.ts +1 -0
  154. package/dist/schemas/errors.js +5 -0
  155. package/dist/schemas/index.d.ts +1 -0
  156. package/dist/schemas/index.js +1 -0
  157. package/dist/schemas/llamacpp-config.d.ts +25 -18
  158. package/dist/schemas/llamacpp-config.js +26 -16
  159. package/dist/schemas/load-model.d.ts +2608 -469
  160. package/dist/schemas/load-model.js +2 -2
  161. package/dist/schemas/mcp-adapter.d.ts +4 -0
  162. package/dist/schemas/model-config-schemas.d.ts +183 -6
  163. package/dist/schemas/model-info.d.ts +56 -0
  164. package/dist/schemas/model-info.js +5 -1
  165. package/dist/schemas/plugin.d.ts +8 -2
  166. package/dist/schemas/profiling.d.ts +4 -4
  167. package/dist/schemas/reload-config.d.ts +30 -0
  168. package/dist/schemas/rpc-server.d.ts +101 -0
  169. package/dist/schemas/rpc-server.js +87 -0
  170. package/dist/schemas/sdcpp-config.d.ts +7 -3
  171. package/dist/schemas/sdcpp-config.js +37 -2
  172. package/dist/schemas/system-resources.d.ts +4 -4
  173. package/dist/schemas/text-to-speech.d.ts +529 -1
  174. package/dist/schemas/text-to-speech.js +122 -12
  175. package/dist/schemas/tools.d.ts +2 -0
  176. package/dist/schemas/tools.js +8 -0
  177. package/dist/schemas/transcription-config.d.ts +5 -0
  178. package/dist/schemas/transcription-config.js +20 -2
  179. package/dist/schemas/transcription.d.ts +164 -0
  180. package/dist/schemas/transcription.js +71 -4
  181. package/dist/schemas/vla.d.ts +1 -1
  182. package/dist/surface.d.ts +4 -1
  183. package/dist/surface.js +3 -1
  184. package/dist/utils/addon-responses.d.ts +5 -1
  185. package/dist/utils/archive.js +5 -1
  186. package/dist/utils/asr-diagnostics.d.ts +12 -0
  187. package/dist/utils/asr-diagnostics.js +42 -0
  188. package/dist/utils/asr-events.d.ts +1 -0
  189. package/dist/utils/asr-events.js +3 -2
  190. package/dist/utils/cache/paths.js +3 -2
  191. package/dist/utils/mcp-adapter.js +7 -1
  192. package/dist/utils/multi-gpu-mobile.d.ts +1 -1
  193. package/dist/utils/multi-gpu-mobile.js +8 -6
  194. package/dist/utils/path-security.d.ts +5 -0
  195. package/dist/utils/path-security.js +14 -0
  196. package/dist/utils/tool-helpers.d.ts +4 -0
  197. package/dist/utils/tool-helpers.js +2 -0
  198. package/dist/utils/tools/defer.d.ts +93 -0
  199. package/dist/utils/tools/defer.js +290 -0
  200. package/dist/utils/tools/index.d.ts +1 -0
  201. package/dist/utils/tools/index.js +1 -0
  202. package/dist/utils/transcribe-metadata.d.ts +21 -7
  203. package/dist/utils/transcribe-metadata.js +24 -8
  204. package/dist/utils/tts-stats.d.ts +6 -0
  205. package/dist/utils/tts-stats.js +14 -1
  206. package/package.json +43 -29
  207. package/dist/resources/model-fit/fit-stub/index.d.ts +0 -2
  208. package/dist/resources/model-fit/fit-stub/index.js +0 -2
  209. package/dist/resources/model-fit/fit-stub/project-fit-from-stub.d.ts +0 -31
  210. package/dist/resources/model-fit/fit-stub/project-fit-from-stub.js +0 -36
  211. package/dist/resources/model-fit/native-probe/create-llama-fit-request.d.ts +0 -26
  212. package/dist/resources/model-fit/native-probe/create-llama-fit-request.js +0 -191
@@ -0,0 +1,85 @@
1
+ import net from 'bare-net';
2
+ import { createHash } from 'bare-crypto';
3
+ import { InferenceCancelledError } from '../errors/index.js';
4
+ export function rpcTopic(topic) {
5
+ return createHash('sha-256').update('qvac:ggml-rpc-discovery:v1\0').update(topic).digest();
6
+ }
7
+ // Native servers currently accept IPv4 only. Do not resolve announced hostnames.
8
+ export function privateEndpoint(url) {
9
+ const match = /^(\d+\.\d+\.\d+\.\d+):([1-9]\d{0,4})$/.exec(url);
10
+ if (!match)
11
+ return;
12
+ const host = match[1];
13
+ const octets = host.split('.').map(Number);
14
+ if (host.split('.').some((part, i) => String(octets[i]) !== part || octets[i] > 255))
15
+ return;
16
+ const [a, b] = octets;
17
+ if (!(a === 10 || (a === 172 && b >= 16 && b <= 31) || (a === 192 && b === 168)))
18
+ return;
19
+ const port = Number(match[2]);
20
+ if (port > 65535)
21
+ return;
22
+ return { host, port };
23
+ }
24
+ export function throwIfAborted(signal) {
25
+ if (signal.aborted)
26
+ throw new InferenceCancelledError('rpc');
27
+ }
28
+ export function delay(ms, signal) {
29
+ throwIfAborted(signal);
30
+ return new Promise((resolve, reject) => {
31
+ const timer = setTimeout(() => finish(), ms);
32
+ const abort = () => finish(new InferenceCancelledError('rpc'));
33
+ function finish(error) {
34
+ clearTimeout(timer);
35
+ signal.removeEventListener('abort', abort);
36
+ if (error)
37
+ reject(error);
38
+ else
39
+ resolve();
40
+ }
41
+ signal.addEventListener('abort', abort, { once: true });
42
+ });
43
+ }
44
+ export function probeTcp(host, port, timeoutMs, signal, scope) {
45
+ throwIfAborted(signal);
46
+ return new Promise((resolve, reject) => {
47
+ const socket = new net.Socket();
48
+ const timer = setTimeout(() => finish(false), timeoutMs);
49
+ const abort = () => finish(false, new InferenceCancelledError('rpc'));
50
+ let finished = false;
51
+ function finish(reachable, error) {
52
+ if (finished)
53
+ return;
54
+ finished = true;
55
+ clearTimeout(timer);
56
+ signal.removeEventListener('abort', abort);
57
+ socket.destroy();
58
+ if (error)
59
+ reject(error);
60
+ else
61
+ resolve(reachable);
62
+ }
63
+ signal.addEventListener('abort', abort, { once: true });
64
+ scope?.defer(() => finish(false));
65
+ socket.on('error', () => finish(false));
66
+ socket.on('close', () => finish(false));
67
+ socket.on('connect', () => finish(true));
68
+ try {
69
+ socket.connect(port, host);
70
+ }
71
+ catch {
72
+ finish(false);
73
+ }
74
+ });
75
+ }
76
+ export async function waitForReady(host, port, signal) {
77
+ const deadline = Date.now() + 10000;
78
+ const probeHost = host === '0.0.0.0' ? '127.0.0.1' : host;
79
+ while (Date.now() < deadline) {
80
+ if (await probeTcp(probeHost, port, Math.min(250, deadline - Date.now()), signal))
81
+ return;
82
+ await delay(Math.min(50, Math.max(0, deadline - Date.now())), signal);
83
+ }
84
+ throw new Error(`RPC server readiness timed out at ${host}:${port}`);
85
+ }
@@ -0,0 +1,6 @@
1
+ import type { RpcServerProvider } from '../schemas/rpc-server.js';
2
+ /** Register the native server implementation explicitly, without loading any model plugin. */
3
+ export declare function registerRpcServerProvider(value: RpcServerProvider): void;
4
+ export declare function hasRpcServerProvider(): boolean;
5
+ export declare function getRpcServerProvider(): RpcServerProvider;
6
+ export declare function clearRpcServerProvider(): void;
@@ -0,0 +1,24 @@
1
+ import { RpcServerOperationError } from '../errors/index.js';
2
+ let provider;
3
+ /** Register the native server implementation explicitly, without loading any model plugin. */
4
+ export function registerRpcServerProvider(value) {
5
+ if (!value || typeof value.start !== 'function') {
6
+ throw new RpcServerOperationError('registerRpcServerProvider', 'Provider must define start()');
7
+ }
8
+ if (provider) {
9
+ throw new RpcServerOperationError('registerRpcServerProvider', 'A provider is already registered');
10
+ }
11
+ provider = value;
12
+ }
13
+ export function hasRpcServerProvider() {
14
+ return provider !== undefined;
15
+ }
16
+ export function getRpcServerProvider() {
17
+ if (!provider) {
18
+ throw new RpcServerOperationError('startRpcServer', 'No RPC server provider registered. Register a provider in Bare or select rpcServerProvider when bundling the SDK worker.');
19
+ }
20
+ return provider;
21
+ }
22
+ export function clearRpcServerProvider() {
23
+ provider = undefined;
24
+ }
@@ -1,3 +1,4 @@
1
+ import { closeRpcResources } from '../handlers/rpc-server.js';
1
2
  import { initEnv } from './env.js';
2
3
  import { closeAllRagInstances } from '../rag/index.js';
3
4
  import { disposeAllVectorIndexes } from './vector-index-registry.js';
@@ -15,6 +16,7 @@ import { destroyResourceCollector, initializeResourceCollector } from '../resour
15
16
  // process signals or calls `Bare.exit`.
16
17
  let initialized = false;
17
18
  let cleanupRan = false;
19
+ let cleanupPromise = null;
18
20
  const logger = getEngineLogger();
19
21
  /**
20
22
  * Initialize the engine: start log buffering, read env, and acquire the cache
@@ -53,18 +55,30 @@ function clearRegistries() {
53
55
  * registry client). Idempotent. Does not release the cache lock.
54
56
  */
55
57
  async function runCleanup() {
58
+ if (cleanupPromise)
59
+ return cleanupPromise;
56
60
  if (cleanupRan)
57
61
  return;
58
- cleanupRan = true;
59
- destroyResourceCollector();
60
- clearRegistries();
61
- disposeAllVectorIndexes();
62
- await Promise.allSettled([
63
- closeAllRagInstances(),
64
- cleanupDownloads(),
65
- unloadAllModels(),
66
- closeRegistryClient()
67
- ]);
62
+ cleanupPromise = (async () => {
63
+ destroyResourceCollector();
64
+ clearRegistries();
65
+ disposeAllVectorIndexes();
66
+ await Promise.allSettled([
67
+ closeAllRagInstances(),
68
+ cleanupDownloads(),
69
+ unloadAllModels(),
70
+ closeRegistryClient()
71
+ ]);
72
+ // Models may own buffers on our RPC servers. Release them before closing their sockets.
73
+ await closeRpcResources();
74
+ cleanupRan = true;
75
+ })();
76
+ try {
77
+ await cleanupPromise;
78
+ }
79
+ finally {
80
+ cleanupPromise = null;
81
+ }
68
82
  }
69
83
  /**
70
84
  * Pre-terminate cleanup, callable while the isolate is still alive. Runs the
@@ -83,6 +97,7 @@ export async function cleanupForTerminate() {
83
97
  }
84
98
  catch (error) {
85
99
  logger.error('❌ Error during pre-terminate cleanup:', error);
100
+ throw error;
86
101
  }
87
102
  }
88
103
  /**
@@ -95,8 +110,11 @@ export async function close() {
95
110
  }
96
111
  catch (error) {
97
112
  logger.error('❌ Error during cleanup:', error);
113
+ throw error;
114
+ }
115
+ finally {
116
+ releaseCacheLock();
117
+ initialized = false;
118
+ cleanupRan = false;
98
119
  }
99
- releaseCacheLock();
100
- initialized = false;
101
- cleanupRan = false;
102
120
  }
@@ -11,7 +11,7 @@ import type { Logger } from '../logging/types.js';
11
11
  * The set is intentionally open-coded — adding a new kind is a one-line
12
12
  * change and the union surfaces in editor autocomplete at every call site.
13
13
  */
14
- export type RequestKind = 'completion' | 'batchCompletion' | 'embeddings' | 'transcribe' | 'translate' | 'diffusion' | 'world' | 'audiogen' | 'tts' | 'ocr' | 'vla' | 'finetune' | 'loadModel' | 'downloadAsset' | 'rag';
14
+ export type RequestKind = 'completion' | 'batchCompletion' | 'embeddings' | 'transcribe' | 'translate' | 'diffusion' | 'world' | 'audiogen' | 'tts' | 'ocr' | 'vla' | 'finetune' | 'loadModel' | 'downloadAsset' | 'rag' | 'rpcServer' | 'rpcDiscovery';
15
15
  /**
16
16
  * Lifecycle states a request transitions through. A new context starts in
17
17
  * `"running"`. `cancel(...)` flips it to `"cancelling"` and aborts the
@@ -19,6 +19,7 @@ const configRegistry = {
19
19
  requireSecureTransport: undefined,
20
20
  registryDownloadMaxRetries: undefined,
21
21
  registryStreamTimeoutMs: undefined,
22
+ fitStubBudgetMs: undefined,
22
23
  deviceDefaults: undefined,
23
24
  ragTurbovec: undefined
24
25
  };
@@ -88,6 +89,10 @@ export function setConfig(config) {
88
89
  configRegistry.registryStreamTimeoutMs = config.registryStreamTimeoutMs;
89
90
  logger.info(`✅ Registry stream timeout set to: ${config.registryStreamTimeoutMs}ms`);
90
91
  }
92
+ if (config.fitStubBudgetMs !== undefined && config.fitStubBudgetMs !== null) {
93
+ configRegistry.fitStubBudgetMs = config.fitStubBudgetMs;
94
+ logger.info(`✅ Fit stub budget set to: ${config.fitStubBudgetMs}ms`);
95
+ }
91
96
  if (config.deviceDefaults !== undefined && config.deviceDefaults !== null) {
92
97
  configRegistry.deviceDefaults = config.deviceDefaults;
93
98
  logger.info(`✅ Device defaults configured: ${config.deviceDefaults.length} pattern(s)`);
@@ -11,22 +11,17 @@ export declare const modelFitVerdictSchema: z.ZodEnum<{
11
11
  "likely-too-large": "likely-too-large";
12
12
  }>;
13
13
  /**
14
- * Normalized workload shapes. An engine's estimator declares which kinds it
15
- * supports; anything else assesses as `unknown`.
16
- *
17
- * Phase 1 covers LLM context and an audio window. Further kinds (fixed-cost
18
- * loads, text, image, video) are additive in later phases — a kind joins the
19
- * union only once an estimator actually handles it.
14
+ * What the estimator sizes a load by, read out of its config. An engine whose
15
+ * estimator declares no kind for it assesses as `unknown`.
20
16
  */
21
- export declare const modelFitWorkloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
22
- kind: z.ZodLiteral<"llm">;
23
- contextTokens: z.ZodNumber;
24
- }, z.core.$strip>, z.ZodObject<{
25
- kind: z.ZodLiteral<"audio">;
26
- windowMs: z.ZodNumber;
27
- streaming: z.ZodBoolean;
28
- batch: z.ZodOptional<z.ZodNumber>;
29
- }, z.core.$strip>], "kind">;
17
+ export type ModelFitWorkload = {
18
+ kind: 'llm';
19
+ contextTokens?: number;
20
+ } | {
21
+ kind: 'audio';
22
+ windowMs: number;
23
+ streaming: boolean;
24
+ };
30
25
  /**
31
26
  * The part of a model constant an assessment reads. Pass a catalog constant
32
27
  * directly — the extra fields are ignored.
@@ -42,36 +37,15 @@ export declare const modelFitModelRefSchema: z.ZodObject<{
42
37
  registrySource: z.ZodOptional<z.ZodString>;
43
38
  }, z.core.$strip>;
44
39
  /**
45
- * One model the caller is considering, with the workload it would run.
46
- *
47
- * @property model - A catalog model constant. The generated resource profile,
48
- * looked up by checksum, supplies the byte totals and transformer facts.
49
- * @property artifacts - Extra catalog constants a compound load needs (a VAD
50
- * model, a pivot model). Their artifact bytes are added to this candidate.
40
+ * What the estimator is given for one candidate: the catalog facts its checksum
41
+ * resolves to, and the workload read out of the load's config.
51
42
  */
52
- export declare const modelFitCandidateSchema: z.ZodObject<{
53
- model: z.ZodObject<{
54
- sha256Checksum: z.ZodString;
55
- name: z.ZodString;
56
- registryPath: z.ZodOptional<z.ZodString>;
57
- registrySource: z.ZodOptional<z.ZodString>;
58
- }, z.core.$strip>;
59
- artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
60
- sha256Checksum: z.ZodString;
61
- name: z.ZodString;
62
- registryPath: z.ZodOptional<z.ZodString>;
63
- registrySource: z.ZodOptional<z.ZodString>;
64
- }, z.core.$strip>>>;
65
- workload: z.ZodDiscriminatedUnion<[z.ZodObject<{
66
- kind: z.ZodLiteral<"llm">;
67
- contextTokens: z.ZodNumber;
68
- }, z.core.$strip>, z.ZodObject<{
69
- kind: z.ZodLiteral<"audio">;
70
- windowMs: z.ZodNumber;
71
- streaming: z.ZodBoolean;
72
- batch: z.ZodOptional<z.ZodNumber>;
73
- }, z.core.$strip>], "kind">;
74
- }, z.core.$strip>;
43
+ export interface ModelFitEstimateTarget {
44
+ model: ModelFitModelRef;
45
+ workload: ModelFitWorkload;
46
+ artifacts?: ModelFitModelRef[];
47
+ device?: string;
48
+ }
75
49
  /**
76
50
  * How the caller intends to run the candidates. This is a **declared
77
51
  * assumption** used for aggregation, not a scheduling instruction — the SDK
@@ -85,29 +59,152 @@ export declare const modelFitExecutionSchema: z.ZodEnum<{
85
59
  sequential: "sequential";
86
60
  concurrent: "concurrent";
87
61
  }>;
62
+ /**
63
+ * A load to assess, in `loadModel`'s own parameters. The engine's plugin
64
+ * resolves it, so the config and the artifact keys the fitter reads are the
65
+ * ones the load would run with.
66
+ *
67
+ * Each source resolves to the registry's weightless description of the
68
+ * artifact, or to the file itself where it is already on disk.
69
+ */
70
+ export declare const modelFitCandidateSchema: z.ZodObject<{
71
+ modelSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
72
+ src: z.ZodString;
73
+ name: z.ZodOptional<z.ZodString>;
74
+ modelId: z.ZodOptional<z.ZodString>;
75
+ registryPath: z.ZodOptional<z.ZodString>;
76
+ registrySource: z.ZodOptional<z.ZodString>;
77
+ blobCoreKey: z.ZodOptional<z.ZodString>;
78
+ blobIndex: z.ZodOptional<z.ZodNumber>;
79
+ engine: z.ZodOptional<z.ZodString>;
80
+ expectedSize: z.ZodOptional<z.ZodNumber>;
81
+ sha256Checksum: z.ZodOptional<z.ZodString>;
82
+ addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
83
+ embeddings: "embeddings";
84
+ diffusion: "diffusion";
85
+ audiogen: "audiogen";
86
+ tts: "tts";
87
+ ocr: "ocr";
88
+ vla: "vla";
89
+ "llamacpp-completion": "llamacpp-completion";
90
+ "whispercpp-transcription": "whispercpp-transcription";
91
+ "bci-whispercpp-transcription": "bci-whispercpp-transcription";
92
+ "llamacpp-embedding": "llamacpp-embedding";
93
+ "nmtcpp-translation": "nmtcpp-translation";
94
+ "onnx-tts": "onnx-tts";
95
+ "tts-ggml": "tts-ggml";
96
+ "parakeet-transcription": "parakeet-transcription";
97
+ "ggml-ocr": "ggml-ocr";
98
+ "sdcpp-generation": "sdcpp-generation";
99
+ "audiogen-ggml": "audiogen-ggml";
100
+ "ggml-vla": "ggml-vla";
101
+ "ggml-classification": "ggml-classification";
102
+ llm: "llm";
103
+ whisper: "whisper";
104
+ bci: "bci";
105
+ nmt: "nmt";
106
+ parakeet: "parakeet";
107
+ classification: "classification";
108
+ }>, z.ZodLiteral<"vad">]>>;
109
+ }, z.core.$strip>]>>;
110
+ modelType: z.ZodOptional<z.ZodEnum<{
111
+ embeddings: "embeddings";
112
+ diffusion: "diffusion";
113
+ audiogen: "audiogen";
114
+ tts: "tts";
115
+ ocr: "ocr";
116
+ vla: "vla";
117
+ "llamacpp-completion": "llamacpp-completion";
118
+ "whispercpp-transcription": "whispercpp-transcription";
119
+ "bci-whispercpp-transcription": "bci-whispercpp-transcription";
120
+ "llamacpp-embedding": "llamacpp-embedding";
121
+ "nmtcpp-translation": "nmtcpp-translation";
122
+ "onnx-tts": "onnx-tts";
123
+ "tts-ggml": "tts-ggml";
124
+ "parakeet-transcription": "parakeet-transcription";
125
+ "ggml-ocr": "ggml-ocr";
126
+ "sdcpp-generation": "sdcpp-generation";
127
+ "audiogen-ggml": "audiogen-ggml";
128
+ "ggml-vla": "ggml-vla";
129
+ "ggml-classification": "ggml-classification";
130
+ llm: "llm";
131
+ whisper: "whisper";
132
+ bci: "bci";
133
+ nmt: "nmt";
134
+ parakeet: "parakeet";
135
+ classification: "classification";
136
+ }>>;
137
+ modelConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
138
+ }, z.core.$strip>;
88
139
  export declare const assessModelFitInputSchema: z.ZodObject<{
89
140
  models: z.ZodArray<z.ZodObject<{
90
- model: z.ZodObject<{
91
- sha256Checksum: z.ZodString;
92
- name: z.ZodString;
93
- registryPath: z.ZodOptional<z.ZodString>;
94
- registrySource: z.ZodOptional<z.ZodString>;
95
- }, z.core.$strip>;
96
- artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
97
- sha256Checksum: z.ZodString;
98
- name: z.ZodString;
141
+ modelSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
142
+ src: z.ZodString;
143
+ name: z.ZodOptional<z.ZodString>;
144
+ modelId: z.ZodOptional<z.ZodString>;
99
145
  registryPath: z.ZodOptional<z.ZodString>;
100
146
  registrySource: z.ZodOptional<z.ZodString>;
101
- }, z.core.$strip>>>;
102
- workload: z.ZodDiscriminatedUnion<[z.ZodObject<{
103
- kind: z.ZodLiteral<"llm">;
104
- contextTokens: z.ZodNumber;
105
- }, z.core.$strip>, z.ZodObject<{
106
- kind: z.ZodLiteral<"audio">;
107
- windowMs: z.ZodNumber;
108
- streaming: z.ZodBoolean;
109
- batch: z.ZodOptional<z.ZodNumber>;
110
- }, z.core.$strip>], "kind">;
147
+ blobCoreKey: z.ZodOptional<z.ZodString>;
148
+ blobIndex: z.ZodOptional<z.ZodNumber>;
149
+ engine: z.ZodOptional<z.ZodString>;
150
+ expectedSize: z.ZodOptional<z.ZodNumber>;
151
+ sha256Checksum: z.ZodOptional<z.ZodString>;
152
+ addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
153
+ embeddings: "embeddings";
154
+ diffusion: "diffusion";
155
+ audiogen: "audiogen";
156
+ tts: "tts";
157
+ ocr: "ocr";
158
+ vla: "vla";
159
+ "llamacpp-completion": "llamacpp-completion";
160
+ "whispercpp-transcription": "whispercpp-transcription";
161
+ "bci-whispercpp-transcription": "bci-whispercpp-transcription";
162
+ "llamacpp-embedding": "llamacpp-embedding";
163
+ "nmtcpp-translation": "nmtcpp-translation";
164
+ "onnx-tts": "onnx-tts";
165
+ "tts-ggml": "tts-ggml";
166
+ "parakeet-transcription": "parakeet-transcription";
167
+ "ggml-ocr": "ggml-ocr";
168
+ "sdcpp-generation": "sdcpp-generation";
169
+ "audiogen-ggml": "audiogen-ggml";
170
+ "ggml-vla": "ggml-vla";
171
+ "ggml-classification": "ggml-classification";
172
+ llm: "llm";
173
+ whisper: "whisper";
174
+ bci: "bci";
175
+ nmt: "nmt";
176
+ parakeet: "parakeet";
177
+ classification: "classification";
178
+ }>, z.ZodLiteral<"vad">]>>;
179
+ }, z.core.$strip>]>>;
180
+ modelType: z.ZodOptional<z.ZodEnum<{
181
+ embeddings: "embeddings";
182
+ diffusion: "diffusion";
183
+ audiogen: "audiogen";
184
+ tts: "tts";
185
+ ocr: "ocr";
186
+ vla: "vla";
187
+ "llamacpp-completion": "llamacpp-completion";
188
+ "whispercpp-transcription": "whispercpp-transcription";
189
+ "bci-whispercpp-transcription": "bci-whispercpp-transcription";
190
+ "llamacpp-embedding": "llamacpp-embedding";
191
+ "nmtcpp-translation": "nmtcpp-translation";
192
+ "onnx-tts": "onnx-tts";
193
+ "tts-ggml": "tts-ggml";
194
+ "parakeet-transcription": "parakeet-transcription";
195
+ "ggml-ocr": "ggml-ocr";
196
+ "sdcpp-generation": "sdcpp-generation";
197
+ "audiogen-ggml": "audiogen-ggml";
198
+ "ggml-vla": "ggml-vla";
199
+ "ggml-classification": "ggml-classification";
200
+ llm: "llm";
201
+ whisper: "whisper";
202
+ bci: "bci";
203
+ nmt: "nmt";
204
+ parakeet: "parakeet";
205
+ classification: "classification";
206
+ }>>;
207
+ modelConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
111
208
  }, z.core.$strip>>;
112
209
  execution: z.ZodDefault<z.ZodEnum<{
113
210
  sequential: "sequential";
@@ -173,6 +270,7 @@ export declare const modelFitModelResultSchema: z.ZodObject<{
173
270
  }, z.core.$strip>>;
174
271
  floorBytes: z.ZodOptional<z.ZodNumber>;
175
272
  estimatorVersion: z.ZodOptional<z.ZodString>;
273
+ device: z.ZodOptional<z.ZodString>;
176
274
  reasons: z.ZodArray<z.ZodString>;
177
275
  }, z.core.$strip>;
178
276
  export declare const assessModelFitResultSchema: z.ZodObject<{
@@ -226,6 +324,7 @@ export declare const assessModelFitResultSchema: z.ZodObject<{
226
324
  }, z.core.$strip>>;
227
325
  floorBytes: z.ZodOptional<z.ZodNumber>;
228
326
  estimatorVersion: z.ZodOptional<z.ZodString>;
327
+ device: z.ZodOptional<z.ZodString>;
229
328
  reasons: z.ZodArray<z.ZodString>;
230
329
  }, z.core.$strip>>;
231
330
  reasons: z.ZodArray<z.ZodString>;
@@ -235,8 +334,8 @@ export declare const assessModelFitResultSchema: z.ZodObject<{
235
334
  * The other fit question, kept in this file on purpose: `assessModelFit` above
236
335
  * answers "should I download this?" from calibrated coefficients and a checksum,
237
336
  * while the native probe answers "will the load I am about to run fit?" by
238
- * reading the GGUF on disk in a disposable child. Two evidence classes, so two
239
- * verdict vocabularies:
337
+ * handing the model file and the resolved settings to the fitter of the engine
338
+ * that would run it. Two evidence classes, so two verdict vocabularies:
240
339
  *
241
340
  * - `likely-fits` / `likely-too-large` hedge because a formula is an estimate.
242
341
  * - `fit` / `does-not-fit` do not, because the probe measured this build of this
@@ -256,6 +355,32 @@ export declare const nativeProbePlanSchema: z.ZodObject<{
256
355
  nGpuLayers: z.ZodNumber;
257
356
  nGpuDevices: z.ZodNumber;
258
357
  }, z.core.$strip>;
358
+ /**
359
+ * What the fitter measured. Each field is optional because the engines do not
360
+ * all measure the same things: the diffusion fitter answers with a placement
361
+ * and a per-module table rather than a total, so it fills `report` alone.
362
+ *
363
+ * `weightsBytes`, `contextBytes` and `computeBytes` divide `deviceBytes` where
364
+ * the engine separates them, and are absent together where it reports only a
365
+ * total. They are summed across devices, as `deviceBytes` is, so a load spread
366
+ * over more than one device is described by its totals and `deviceName` names
367
+ * the first.
368
+ *
369
+ * `deviceFreeBytes` is the backend's own gauge. A device sharing the host pool,
370
+ * as Apple silicon and Adreno/Mali do, reports what it could address rather
371
+ * than what the machine would give back, so it is an upper bound there.
372
+ */
373
+ export declare const nativeProbeProjectionSchema: z.ZodObject<{
374
+ deviceName: z.ZodOptional<z.ZodString>;
375
+ deviceBytes: z.ZodOptional<z.ZodNumber>;
376
+ hostBytes: z.ZodOptional<z.ZodNumber>;
377
+ weightsBytes: z.ZodOptional<z.ZodNumber>;
378
+ contextBytes: z.ZodOptional<z.ZodNumber>;
379
+ computeBytes: z.ZodOptional<z.ZodNumber>;
380
+ deviceFreeBytes: z.ZodOptional<z.ZodNumber>;
381
+ deviceTotalBytes: z.ZodOptional<z.ZodNumber>;
382
+ report: z.ZodOptional<z.ZodString>;
383
+ }, z.core.$strip>;
259
384
  export declare const nativeProbeFitSchema: z.ZodObject<{
260
385
  verdict: z.ZodEnum<{
261
386
  unknown: "unknown";
@@ -263,6 +388,7 @@ export declare const nativeProbeFitSchema: z.ZodObject<{
263
388
  "does-not-fit": "does-not-fit";
264
389
  }>;
265
390
  basis: z.ZodLiteral<"native-probe">;
391
+ engine: z.ZodOptional<z.ZodString>;
266
392
  estimatorVersion: z.ZodString;
267
393
  reason: z.ZodString;
268
394
  message: z.ZodOptional<z.ZodString>;
@@ -271,30 +397,87 @@ export declare const nativeProbeFitSchema: z.ZodObject<{
271
397
  nGpuLayers: z.ZodNumber;
272
398
  nGpuDevices: z.ZodNumber;
273
399
  }, z.core.$strip>>;
400
+ projection: z.ZodOptional<z.ZodObject<{
401
+ deviceName: z.ZodOptional<z.ZodString>;
402
+ deviceBytes: z.ZodOptional<z.ZodNumber>;
403
+ hostBytes: z.ZodOptional<z.ZodNumber>;
404
+ weightsBytes: z.ZodOptional<z.ZodNumber>;
405
+ contextBytes: z.ZodOptional<z.ZodNumber>;
406
+ computeBytes: z.ZodOptional<z.ZodNumber>;
407
+ deviceFreeBytes: z.ZodOptional<z.ZodNumber>;
408
+ deviceTotalBytes: z.ZodOptional<z.ZodNumber>;
409
+ report: z.ZodOptional<z.ZodString>;
410
+ }, z.core.$strip>>;
274
411
  }, z.core.$strip>;
275
412
  export declare const assessModelFitRequestSchema: z.ZodObject<{
276
413
  models: z.ZodArray<z.ZodObject<{
277
- model: z.ZodObject<{
278
- sha256Checksum: z.ZodString;
279
- name: z.ZodString;
414
+ modelSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
415
+ src: z.ZodString;
416
+ name: z.ZodOptional<z.ZodString>;
417
+ modelId: z.ZodOptional<z.ZodString>;
280
418
  registryPath: z.ZodOptional<z.ZodString>;
281
419
  registrySource: z.ZodOptional<z.ZodString>;
282
- }, z.core.$strip>;
283
- artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
284
- sha256Checksum: z.ZodString;
285
- name: z.ZodString;
286
- registryPath: z.ZodOptional<z.ZodString>;
287
- registrySource: z.ZodOptional<z.ZodString>;
288
- }, z.core.$strip>>>;
289
- workload: z.ZodDiscriminatedUnion<[z.ZodObject<{
290
- kind: z.ZodLiteral<"llm">;
291
- contextTokens: z.ZodNumber;
292
- }, z.core.$strip>, z.ZodObject<{
293
- kind: z.ZodLiteral<"audio">;
294
- windowMs: z.ZodNumber;
295
- streaming: z.ZodBoolean;
296
- batch: z.ZodOptional<z.ZodNumber>;
297
- }, z.core.$strip>], "kind">;
420
+ blobCoreKey: z.ZodOptional<z.ZodString>;
421
+ blobIndex: z.ZodOptional<z.ZodNumber>;
422
+ engine: z.ZodOptional<z.ZodString>;
423
+ expectedSize: z.ZodOptional<z.ZodNumber>;
424
+ sha256Checksum: z.ZodOptional<z.ZodString>;
425
+ addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
426
+ embeddings: "embeddings";
427
+ diffusion: "diffusion";
428
+ audiogen: "audiogen";
429
+ tts: "tts";
430
+ ocr: "ocr";
431
+ vla: "vla";
432
+ "llamacpp-completion": "llamacpp-completion";
433
+ "whispercpp-transcription": "whispercpp-transcription";
434
+ "bci-whispercpp-transcription": "bci-whispercpp-transcription";
435
+ "llamacpp-embedding": "llamacpp-embedding";
436
+ "nmtcpp-translation": "nmtcpp-translation";
437
+ "onnx-tts": "onnx-tts";
438
+ "tts-ggml": "tts-ggml";
439
+ "parakeet-transcription": "parakeet-transcription";
440
+ "ggml-ocr": "ggml-ocr";
441
+ "sdcpp-generation": "sdcpp-generation";
442
+ "audiogen-ggml": "audiogen-ggml";
443
+ "ggml-vla": "ggml-vla";
444
+ "ggml-classification": "ggml-classification";
445
+ llm: "llm";
446
+ whisper: "whisper";
447
+ bci: "bci";
448
+ nmt: "nmt";
449
+ parakeet: "parakeet";
450
+ classification: "classification";
451
+ }>, z.ZodLiteral<"vad">]>>;
452
+ }, z.core.$strip>]>>;
453
+ modelType: z.ZodOptional<z.ZodEnum<{
454
+ embeddings: "embeddings";
455
+ diffusion: "diffusion";
456
+ audiogen: "audiogen";
457
+ tts: "tts";
458
+ ocr: "ocr";
459
+ vla: "vla";
460
+ "llamacpp-completion": "llamacpp-completion";
461
+ "whispercpp-transcription": "whispercpp-transcription";
462
+ "bci-whispercpp-transcription": "bci-whispercpp-transcription";
463
+ "llamacpp-embedding": "llamacpp-embedding";
464
+ "nmtcpp-translation": "nmtcpp-translation";
465
+ "onnx-tts": "onnx-tts";
466
+ "tts-ggml": "tts-ggml";
467
+ "parakeet-transcription": "parakeet-transcription";
468
+ "ggml-ocr": "ggml-ocr";
469
+ "sdcpp-generation": "sdcpp-generation";
470
+ "audiogen-ggml": "audiogen-ggml";
471
+ "ggml-vla": "ggml-vla";
472
+ "ggml-classification": "ggml-classification";
473
+ llm: "llm";
474
+ whisper: "whisper";
475
+ bci: "bci";
476
+ nmt: "nmt";
477
+ parakeet: "parakeet";
478
+ classification: "classification";
479
+ }>>;
480
+ modelConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
298
481
  }, z.core.$strip>>;
299
482
  execution: z.ZodDefault<z.ZodEnum<{
300
483
  sequential: "sequential";
@@ -354,6 +537,7 @@ export declare const assessModelFitResponseSchema: z.ZodObject<{
354
537
  }, z.core.$strip>>;
355
538
  floorBytes: z.ZodOptional<z.ZodNumber>;
356
539
  estimatorVersion: z.ZodOptional<z.ZodString>;
540
+ device: z.ZodOptional<z.ZodString>;
357
541
  reasons: z.ZodArray<z.ZodString>;
358
542
  }, z.core.$strip>>;
359
543
  reasons: z.ZodArray<z.ZodString>;
@@ -362,10 +546,10 @@ export declare const assessModelFitResponseSchema: z.ZodObject<{
362
546
  }, z.core.$strip>;
363
547
  export type NativeProbeVerdict = z.infer<typeof nativeProbeVerdictSchema>;
364
548
  export type NativeProbePlan = z.infer<typeof nativeProbePlanSchema>;
549
+ export type NativeProbeProjection = z.infer<typeof nativeProbeProjectionSchema>;
365
550
  export type NativeProbeFit = z.infer<typeof nativeProbeFitSchema>;
366
551
  export type ModelFitVerdict = z.infer<typeof modelFitVerdictSchema>;
367
552
  export type ModelFitModelRef = z.infer<typeof modelFitModelRefSchema>;
368
- export type ModelFitWorkload = z.infer<typeof modelFitWorkloadSchema>;
369
553
  export type ModelFitCandidate = z.infer<typeof modelFitCandidateSchema>;
370
554
  export type ModelFitExecution = z.infer<typeof modelFitExecutionSchema>;
371
555
  export type ModelFitBasis = z.infer<typeof modelFitBasisSchema>;