[GH-ISSUE #2409] Allow -1 for "OLLAMA_KEEP_ALIVE" #1453

Closed
opened 2026-03-02 11:57:27 +03:00 by kerem · 1 comment
Owner

Originally created by @ampersandru on GitHub (Jan 18, 2026).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/2409

Describe the feature you'd like

I want to keep the model in VRAM indefinitely and if I try setting env for OLLAMA_KEEP_ALIVE to -1, I get an error in the logs and it fails to generate tags or summaries:

2026-01-18T18:15:04.210Z error: [inference][11732] inference job failed: ResponseError: time: missing unit in duration "-1"
ResponseError: time: missing unit in duration "-1"

-1 is a very typical use for Ollama to keep it loaded indefinitely

Describe the benefits this would bring to existing Karakeep users

Allow user to decide to keep model in memory or not

Can the goal of this request already be achieved via other means?

Yes, by changing the value to some extremely large number.

Have you searched for an existing open/closed issue?

  • I have searched for existing issues and none cover my fundamental request

Additional context

No response

Originally created by @ampersandru on GitHub (Jan 18, 2026). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/2409 ### Describe the feature you'd like I want to keep the model in VRAM indefinitely and if I try setting env for OLLAMA_KEEP_ALIVE to -1, I get an error in the logs and it fails to generate tags or summaries: ``` 2026-01-18T18:15:04.210Z error: [inference][11732] inference job failed: ResponseError: time: missing unit in duration "-1" ResponseError: time: missing unit in duration "-1" ``` -1 is a very typical use for Ollama to keep it loaded indefinitely ### Describe the benefits this would bring to existing Karakeep users Allow user to decide to keep model in memory or not ### Can the goal of this request already be achieved via other means? Yes, by changing the value to some extremely large number. ### Have you searched for an existing open/closed issue? - [x] I have searched for existing issues and none cover my fundamental request ### Additional context _No response_
Author
Owner

@ampersandru commented on GitHub (Jan 18, 2026):

Figured it out! it should be:
OLLAMA_KEEP_ALIVE: "-1m"

<!-- gh-comment-id:3765582043 --> @ampersandru commented on GitHub (Jan 18, 2026): Figured it out! it should be: `OLLAMA_KEEP_ALIVE: "-1m"`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#1453
No description provided.