mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-28 05:27:35 +00:00
With ENABLE_BASE_MODELS_CACHE on and more than one instance behind the load balancer, editing an OpenAI or Ollama connection only refreshes the instance that served the admin request. Every other instance keeps handing out the model list it cached before the edit, so a newly added model appears for some users and not others, and a removed one lingers. With MODELS_CACHE_TTL left empty the per-provider cache never expires either, so those instances stay wrong until they are restarted. A provider config change now bumps an epoch stored in the config table, and each instance drops its cached base models when the epoch it last stamped no longer matches. The database is the only thing every deployment shares, and the key rides along in the config query get_all_models already makes, so this costs no extra round trip. The direct /openai/models and /ollama/api/tags endpoints still answer from their own provider cache without checking the epoch, a window of MODELS_CACHE_TTL and one second by default. The model list users actually see, /api/models, is covered. |
||
|---|---|---|
| .. | ||
| data | ||
| open_webui | ||
| .dockerignore | ||
| .gitignore | ||
| dev.sh | ||
| requirements-min.txt | ||
| requirements.txt | ||
| start.sh | ||
| start_windows.bat | ||