Ensure model is ready
ensure_modelPrepare a local model in one call: optionally pull it, check VRAM fit, evict models as needed, load, and verify. Use dryRun to preview the plan without changes.
Instructions
Make a model ready in one call: optionally pull it, check it fits current free VRAM, unload other models if needed (evict: 'lru' or 'all'), load it, and verify. Use dryRun:true to get the plan without changing anything.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| evict | No | Unload other models to make room: none (default), lru (least recently used first), all | |
| model | Yes | Model id/name | |
| dryRun | No | Return the plan only (default false) | |
| provider | No | Provider instance name. Omit to let the server choose (local providers only, unless LOCAL_AI_ALLOW_HOSTED_FALLBACK is set). | |
| allowPull | No | Download the model if it is not installed (default false) | |
| keepAlive | No | Keep-alive for the loaded model, e.g. '30m' | |
| kvCacheType | No | KV cache precision used for the fit estimate (default f16) | |
| contextLength | No | Context window to fit and load with (default 4096) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fit | No | ||
| plan | Yes | ||
| model | Yes | ||
| ready | Yes | ||
| provider | Yes |