Files
rcourtman 5c65f65a90 Pass keep_alive=30s to Ollama so the model unloads between Patrol runs
Ollama keeps the loaded model in RAM for 5 minutes by default after
each request, and every new request refreshes that 5-minute window.
Pulse never passed keep_alive, so any Ollama traffic (Patrol, alert
analysis, AI chat) within 5 minutes of the previous request kept the
model warm — and on a server with continuous Pulse activity that
meant the model never unloaded, even with Patrol set to a 24-hour
interval (Fixes #1425).

Pass keep_alive=30s on every Chat and ChatStream request. Short
enough that the model unloads shortly after a Patrol burst or
one-shot analysis ends, long enough to span the small gaps between
sequential calls within a single analysis session (so the model is
not reloaded mid-burst).

Tests assert that both the streaming and non-streaming Chat paths
include the keep_alive field in the Ollama request body.
2026-04-30 10:59:04 +01:00
..
2026-04-01 12:00:38 +01:00
2026-01-25 21:08:44 +00:00
2026-01-25 21:08:44 +00:00