Is your feature request related to a problem? Please describe.
Yes. When an upstream LLM provider (like an offline Ollama instance or a deprecated OpenAI-compatible API) is removed, the related model data often remains permanently cached or stuck in the Open WebUI database.
The biggest pain point is that these "ghost models" do not appear in the Workspace -> Models management UI, which means users have absolutely no way to manually delete them. However, they still linger in the system, polluting search indexes, autocomplete suggestions, and backend queries. It is extremely frustrating.
Describe the solution you'd like
Since these ghost models are invisible in the UI, we need a backend way to clean them up. It would be amazing if the Prune Plugin could introduce a feature to bulk-clean these stale/offline model configurations from the database using rule-based filtering:
- Prefix / Keyword matching (Deletion list): Allow users to specify prefixes or keywords to explicitly target hidden models for deletion (e.g.,
delete_model_prefixes=["test-", "offline_"] or delete_model_keywords=["deprecated"]).
- Time-based filtering: Purge models created or last updated before a certain time (e.g.,
--models-older-than 30d), which helps clean up old dead models.
- Prefix / Keyword matching (Keep/Protect list): Allow users to protect specific active models from being pruned based on their names (e.g.,
keep_model_prefixes=["gpt-4", "production-"]).
- "Active" bypass: If there is any flag in the DB indicating a model is currently "active" or recently used in active chats, bypass them.
Describe alternatives you've considered
Currently, because the WebUI completely hides these models from the Workspace management interface, the only alternative is to manually open the SQLite/PostgreSQL database and execute raw SQL DELETE commands. This is extremely dangerous, inconvenient for average users, and prone to breaking database integrity.
Additional context
I understand that the plugin currently handles "orphaned models" (custom models whose creators were deleted). Expanding this to handle "invisible/stale upstream models" via string matching and timestamps would fix a major blind spot in Open WebUI's data management. Thank you for your great work!
Is your feature request related to a problem? Please describe.
Yes. When an upstream LLM provider (like an offline Ollama instance or a deprecated OpenAI-compatible API) is removed, the related model data often remains permanently cached or stuck in the Open WebUI database.
The biggest pain point is that these "ghost models" do not appear in the
Workspace -> Modelsmanagement UI, which means users have absolutely no way to manually delete them. However, they still linger in the system, polluting search indexes, autocomplete suggestions, and backend queries. It is extremely frustrating.Describe the solution you'd like
Since these ghost models are invisible in the UI, we need a backend way to clean them up. It would be amazing if the Prune Plugin could introduce a feature to bulk-clean these stale/offline model configurations from the database using rule-based filtering:
delete_model_prefixes=["test-", "offline_"]ordelete_model_keywords=["deprecated"]).--models-older-than 30d), which helps clean up old dead models.keep_model_prefixes=["gpt-4", "production-"]).Describe alternatives you've considered
Currently, because the WebUI completely hides these models from the Workspace management interface, the only alternative is to manually open the SQLite/PostgreSQL database and execute raw SQL
DELETEcommands. This is extremely dangerous, inconvenient for average users, and prone to breaking database integrity.Additional context
I understand that the plugin currently handles "orphaned models" (custom models whose creators were deleted). Expanding this to handle "invisible/stale upstream models" via string matching and timestamps would fix a major blind spot in Open WebUI's data management. Thank you for your great work!