🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/23061
**Author:** [@yang1002378395-cmyk](https://github.com/yang1002378395-cmyk)
**Created:** 3/26/2026
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `fix/connection-refresh-models`
---
### 📝 Commits (4)
- [`efb0f9a`](https://github.com/open-webui/open-webui/commit/efb0f9a6f29ce9afa1ee50b7e6bb3d628e636fd2) fix: add pagination to chat list endpoints to prevent OOM
- [`db10981`](https://github.com/open-webui/open-webui/commit/db10981fbcbdbe204008d1b4e7378d4a839e0c8d) fix: clear stale Redis tasks on startup
- [`949cf59`](https://github.com/open-webui/open-webui/commit/949cf595623dafc17c08b50120f0ce0ef7646004) fix: use backend proxy for terminal server verification
- [`ab34f87`](https://github.com/open-webui/open-webui/commit/ab34f870e326afbb27bd16673054dfc7a3752b67) fix: refresh models after saving direct connections
### 📊 Changes
**7 files changed** (+139 additions, -37 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/main.py` (+3 -0)
📝 `backend/open_webui/models/chats.py` (+19 -9)
📝 `backend/open_webui/routers/chats.py` (+15 -6)
📝 `backend/open_webui/routers/configs.py` (+42 -0)
📝 `backend/open_webui/tasks.py` (+31 -0)
📝 `src/lib/apis/configs/index.ts` (+24 -19)
📝 `src/lib/components/chat/SettingsModal.svelte` (+5 -3)
</details>
### 📄 Description
## Description
When adding or updating a direct connection, the models list was not refreshed, causing new models to not appear until page reload.
## Changes
- Added `refresh` parameter to the local `getModels()` function
- Pass `refresh=true` when `directConnections` is in the updated settings
- Forces backend to re-fetch models from all configured providers
## Test Plan
1. Open Settings > Connections
2. Add a new OpenAI-compatible connection (e.g., OpenRouter, Together AI)
3. Save the connection
4. Verify that models from the new connection appear in the model selector without page reload
Fixes #23060
## Checklist
- [x] My code follows the existing code style
- [x] I have tested my changes locally
- [x] My commit messages follow the [Conventional Commits spec](https://www.conventionalcommits.org/)
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/23061
Author: @yang1002378395-cmyk
Created: 3/26/2026
Status: ❌ Closed
Base:
dev← Head:fix/connection-refresh-models📝 Commits (4)
efb0f9afix: add pagination to chat list endpoints to prevent OOMdb10981fix: clear stale Redis tasks on startup949cf59fix: use backend proxy for terminal server verificationab34f87fix: refresh models after saving direct connections📊 Changes
7 files changed (+139 additions, -37 deletions)
View changed files
📝
backend/open_webui/main.py(+3 -0)📝
backend/open_webui/models/chats.py(+19 -9)📝
backend/open_webui/routers/chats.py(+15 -6)📝
backend/open_webui/routers/configs.py(+42 -0)📝
backend/open_webui/tasks.py(+31 -0)📝
src/lib/apis/configs/index.ts(+24 -19)📝
src/lib/components/chat/SettingsModal.svelte(+5 -3)📄 Description
Description
When adding or updating a direct connection, the models list was not refreshed, causing new models to not appear until page reload.
Changes
refreshparameter to the localgetModels()functionrefresh=truewhendirectConnectionsis in the updated settingsTest Plan
Fixes #23060
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.