Skip to content

Commit 9e77ea2

Browse files
authored
Merge pull request #636 from Classic298/patch-4
Add model cache ttl
2 parents e3cc923 + a9c0282 commit 9e77ea2

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

docs/getting-started/env-configuration.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,18 @@ is also being used and set to `True`. Failure to do so will result in the inabil
168168
- Default: `0`
169169
- Description: Sets the thread pool size for FastAPI/AnyIO blocking calls. By default (when set to `0`) FastAPI/AnyIO use `40` threads. In case of large instances and many concurrent users, it may be needed to increase `THREAD_POOL_SIZE` to prevent blocking.
170170

171+
### `MODELS_CACHE_TTL`
172+
173+
- Type: `int`
174+
- Default: `1`
175+
- Description: Sets the cache time-to-live in seconds for model list responses from OpenAI and Ollama endpoints. This reduces API calls by caching the available models list for the specified duration. Set to empty string to disable caching entirely.
176+
177+
:::info
178+
179+
This caches the external model lists retrieved from configured OpenAI-compatible and Ollama API endpoints (not Open WebUI's internal model configurations). Higher values improve performance by reducing redundant API requests to external providers but may delay visibility of newly added or removed models on those endpoints. A value of 0 disables caching and forces fresh API calls each time. In high-traffic scenarios, increasing this value (e.g., to 300 seconds) can significantly reduce load on external API endpoints while still providing reasonably fresh model data.
180+
181+
:::
182+
171183
#### `SHOW_ADMIN_DETAILS`
172184

173185
- Type: `bool`

0 commit comments

Comments
 (0)