[GH-ISSUE #10263] Add a parameter to prevent keep_alive from being overwritten by API #6737

Open
opened 2026-04-12 18:29:50 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @Darejkal on GitHub (Apr 14, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/10263

Some frameworks enable keep_alive by default in requests sent to Ollama. This behavior may be undesirable, as it can occasionally trigger unexpected keep_alive resets from clients. It even be exploited for malicious purposes: DDoS the service by unloading the model after every requests. To address this, I think the Ollama server should provide an option to control whether keep_alive can be overridden by incoming requests, like an environment variable. OLLAMA_KEEP_ALIVE_CLIENT_CONFIGURABLE?

Originally created by @Darejkal on GitHub (Apr 14, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/10263 Some frameworks enable keep_alive by default in requests sent to Ollama. This behavior may be undesirable, as it can occasionally trigger unexpected keep_alive resets from clients. It even be exploited for malicious purposes: DDoS the service by unloading the model after every requests. To address this, I think the Ollama server should provide an option to control whether keep_alive can be overridden by incoming requests, like an environment variable. OLLAMA_KEEP_ALIVE_CLIENT_CONFIGURABLE?
GiteaMirror added the feature request label 2026-04-12 18:29:50 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#6737