getModelInfo( )
Retrieves detailed information about a model, including cache status and loaded instances.
function getModelInfo(params): Promise<ModelInfo>;
| Name | Type | Required? | Description |
|---|
| params | object | ✓ | The query parameters |
| params.name | string | ✓ | The model name to look up |
Promise<ModelInfo> — Detailed information about the model.
| Field | Type | Description |
|---|
| name | string | Model name |
| modelId | string | Unique model identifier |
| addon | "llm" | "whisper" | "embeddings" | "nmt" | "vad" | "tts" | "ocr" | "other" | Model addon type |
| expectedSize | number | Expected total file size in bytes |
| sha256Checksum | string | SHA-256 checksum |
| isCached | boolean | Whether the model is fully cached locally |
| isLoaded | boolean | Whether the model is currently loaded in memory |
| cacheFiles | CacheFileInfo[] | Individual cache file details |
| registryPath | string | Registry path (optional) |
| registrySource | string | Registry source (optional) |
| engine | string | Inference engine (optional) |
| quantization | string | Quantization level (optional) |
| params | string | Model parameter count (optional) |
| actualSize | number | Actual cached size in bytes (optional) |
| cachedAt | Date | When the model was cached (optional) |
| loadedInstances | LoadedInstance[] | Currently loaded instances (optional) |
| Field | Type | Description |
|---|
| filename | string | File name |
| path | string | Full file path |
| expectedSize | number | Expected size in bytes |
| sha256Checksum | string | SHA-256 checksum |
| isCached | boolean | Whether this file is cached |
| actualSize | number | Actual file size (optional) |
| cachedAt | Date | When this file was cached (optional) |
| Field | Type | Description |
|---|
| registryId | string | Registry identifier for this loaded instance |
| loadedAt | Date | When the model was loaded |
| config | unknown | Model configuration used at load time (optional) |
| Error | When |
|---|
INVALID_RESPONSE_TYPE | Response type does not match expected "getModelInfo" |
import { getModelInfo } from "@qvac/sdk";
const info = await getModelInfo({ name: "Llama 3.2 3B Q4" });
console.log(`Cached: ${info.isCached}, Loaded: ${info.isLoaded}`);
console.log(`Size: ${info.expectedSize} bytes`);