Warm / unload / inspect loaded models
ollama_lifecycleCheck loaded models and VRAM usage, pre-warm a model to skip the cold-load cost, or unload it immediately to free memory.
Instructions
Manage model residency. status lists loaded models with their VRAM use and time until unload. warm pre-loads a model so a following dispatch skips the cold-load cost (which can be ~12s for a large model) — useful before a batch. unload frees the VRAM immediately, which matters because a large model can hold tens of GB and starve everything else on the machine.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | Override the base URL of the local inference server for this call only, e.g. "http://localhost:11434". Omit to use the configured host. | |
| model | No | Model selector. Three grammars are accepted: (1) a literal installed model name or configured alias, used as-is; (2) "role:NAME" — resolve through the named role, which carries an ordered fallback chain plus its own sampling defaults; (3) "caps:a+b" — pick the best installed model advertising ALL of the named capabilities (e.g. "caps:vision+tools"), ranked by the configured policy. Omit this field entirely to use the configured default role, which is the right choice unless you have a reason. Selectors never name a model in server code — availability is discovered at runtime, so an unknown or un-pulled name is an error, not a silent substitution. | |
| action | Yes | Required. "status" reports what is resident in VRAM and when it expires; "warm" pre-loads a model so the next call skips the load; "unload" evicts it immediately to free VRAM. "warm" and "unload" need `model`. | |
| keep_alive | No | How long the model stays resident in VRAM after this call: a duration string such as "10m", or seconds as a number. 0 unloads immediately; a negative number keeps it loaded indefinitely. Keeping a model warm avoids re-paying a multi-second load on the next call. | |
| timeout_ms | No | Per-request timeout in milliseconds. Large models on a cold load can take tens of seconds before the first token, so prefer generous values over retrying. |