[GH-ISSUE #12121] issue: Function deactivated after container restart due to missing extra dependencies #32003

Closed
opened 2026-04-25 05:53:21 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @almajo on GitHub (Mar 27, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/12121

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.5.20

Ollama Version (if applicable)

No response

Operating System

Linux

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have listed steps to reproduce the bug in detail.

Expected Behavior

After I restart the docker container I want to have the same state as before. Every function that was activated before, should be activated again.

Actual Behavior

When a function has extra dependencies, the function crashes on startup and thus is being deactivated by openwebui.

Steps to Reproduce

  1. Spin up a container
  2. create a custom function with an extra dependency (add requirements: ... to the docstring on top)
  3. Activate the function
  4. restart the container
  5. See that the function is deactivated and when you want to toggle it to activate, see the log of the container that it crashes because dependencies are missing

Logs & Screenshots

...

Additional Information

The problem can be manually resolved by opening the function and press "Save" - which triggers the install of relevant requirements.
It would be great if we could trigger this process automatically on startup.

Originally created by @almajo on GitHub (Mar 27, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/12121 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.5.20 ### Ollama Version (if applicable) _No response_ ### Operating System Linux ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have listed steps to reproduce the bug in detail. ### Expected Behavior After I restart the docker container I want to have the same state as before. Every function that was activated before, should be activated again. ### Actual Behavior When a function has extra dependencies, the function crashes on startup and thus is being deactivated by openwebui. ### Steps to Reproduce 1. Spin up a container 2. create a custom function with an extra dependency (add `requirements: ...` to the docstring on top) 3. Activate the function 4. restart the container 5. See that the function is deactivated and when you want to toggle it to activate, see the log of the container that it crashes because dependencies are missing ### Logs & Screenshots ... ### Additional Information The problem can be manually resolved by opening the function and press "Save" - which triggers the install of relevant requirements. It would be great if we could trigger this process automatically on startup.
GiteaMirror added the bug label 2026-04-25 05:53:21 -05:00
Author
Owner

@MoMia7 commented on GitHub (Mar 31, 2025):

+1 here, I lose dependencies. Planning to fix this with a tool server soon when its released but would be nice to have a temp solution until then

<!-- gh-comment-id:2765872687 --> @MoMia7 commented on GitHub (Mar 31, 2025): +1 here, I lose dependencies. Planning to fix this with a tool server soon when its released but would be nice to have a temp solution until then
Author
Owner

@Lutherwaves commented on GitHub (Apr 1, 2025):

+1, not only tool dependencies are lost, but also unless env variables are set to define RAG completely, if a re-ranking model setting exists, it causes conflicts as it tries to install it on transformers, which obviously fails. More details I posted in https://github.com/open-webui/open-webui/issues/12314

<!-- gh-comment-id:2770636451 --> @Lutherwaves commented on GitHub (Apr 1, 2025): +1, not only tool dependencies are lost, but also unless env variables are set to define RAG completely, if a re-ranking model setting exists, it causes conflicts as it tries to install it on transformers, which obviously fails. More details I posted in https://github.com/open-webui/open-webui/issues/12314
Author
Owner

@rndmcnlly commented on GitHub (Apr 7, 2025):

+1 from me too.

I'm prototyping a larger system where I can't store any user data on the local disk at all. OWUI does a pretty good job of supporting this with the STORAGE_PROVIDER and DATABASE_URL config options. Setting DATA_DIR=/dev/shm/owui-data even moves temporary storage files into RAM. I was hoping that the resulting system would be effectively stateless, but the need to reinstall python tool dependencies was revealed as a hidden element of state. Ideally, if someone has set STORAGE_PROVIDER/DATABASE_URL/DATA_DIR to either known-persistent or known-ephemeral locations, users shouldn't be able to notice when the app is moved to a new machine or the enclosing Docker container is restarted. If tools mentioned in the DB are scanned on first launch, I think that would satisfy my setting.

<!-- gh-comment-id:2784477317 --> @rndmcnlly commented on GitHub (Apr 7, 2025): +1 from me too. I'm prototyping a larger system where I can't store any user data on the local disk at all. OWUI does a pretty good job of supporting this with the `STORAGE_PROVIDER` and `DATABASE_URL` config options. Setting `DATA_DIR=/dev/shm/owui-data` even moves temporary storage files into RAM. I was hoping that the resulting system would be effectively stateless, but the need to reinstall python tool dependencies was revealed as a hidden element of state. Ideally, if someone has set STORAGE_PROVIDER/DATABASE_URL/DATA_DIR to either known-persistent or known-ephemeral locations, users shouldn't be able to notice when the app is moved to a new machine or the enclosing Docker container is restarted. If tools mentioned in the DB are scanned on first launch, I think that would satisfy my setting.
Author
Owner

@Classic298 commented on GitHub (Apr 7, 2025):

I think you can set a 'requires' or 'requirements' comment in the tool's comment head, which openwebui will recognize and automatically install the requirements noted there.

So on tool import, any requirements will be installed and you more or less achieved statelessness?

<!-- gh-comment-id:2784502156 --> @Classic298 commented on GitHub (Apr 7, 2025): I think you can set a 'requires' or 'requirements' comment in the tool's comment head, which openwebui will recognize and automatically install the requirements noted there. So on tool import, any requirements will be installed and you more or less achieved statelessness?
Author
Owner

@Lutherwaves commented on GitHub (Apr 7, 2025):

I think you can set a 'requires' or 'requirements' comment in the tool's comment head, which openwebui will recognize and automatically install the requirements noted there.

So on tool import, any requirements will be installed and you more or less achieved statelessness?

The issue I am referring to is for a tool that already has these requirements, maybe I am doing something wrong - example tool is https://openwebui.com/t/lutherwaves/todoist

<!-- gh-comment-id:2784506432 --> @Lutherwaves commented on GitHub (Apr 7, 2025): > I think you can set a 'requires' or 'requirements' comment in the tool's comment head, which openwebui will recognize and automatically install the requirements noted there. > > So on tool import, any requirements will be installed and you more or less achieved statelessness? The issue I am referring to is for a tool that already has these requirements, maybe I am doing something wrong - example tool is https://openwebui.com/t/lutherwaves/todoist
Author
Owner

@Lutherwaves commented on GitHub (May 5, 2025):

Confirming this is no longer an issue with latest release https://github.com/open-webui/open-webui/releases/tag/v0.6.6

<!-- gh-comment-id:2852301393 --> @Lutherwaves commented on GitHub (May 5, 2025): Confirming this is no longer an issue with latest release https://github.com/open-webui/open-webui/releases/tag/v0.6.6
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#32003