Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
Target branch: Please verify that the pull request targets the dev branch.
Description: Provide a concise description of the changes made in this pull request.
Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
Testing: Have you written and run sufficient tests to validate the changes?
Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following:
UPD
Changelog Entry
Added
Unit tests for the Ollama verify endpoint covering valid version responses, missing version field, and non-200 responses.
Ollama verify endpoint now validates 200 responses to ensure they are JSON objects containing a properly formatted version string (leading 'v' required), while preserving original error behavior for non-200 responses.
Fixed
Corrected misuse of await on the response status (r.status).
Incremental improvement to the verify_connection() function in backend/open_webui/routers/ollama.py. This update checks for a valid version string that should be returned by f"{url}/api/version".
🔄 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/17535
**Author:** [@sevsec](https://github.com/sevsec)
**Created:** 9/17/2025
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `sevsec`
---
### 📝 Commits (1)
- [`6d64780`](https://github.com/open-webui/open-webui/commit/6d64780c1fc3e6081bb79223cb81c530a5438a3d) UPD: Improve Ollama endpoint validation
### 📊 Changes
**3 files changed** (+144 additions, -5 deletions)
<details>
<summary>View changed files</summary>
📝 `CHANGELOG.md` (+14 -0)
📝 `backend/open_webui/routers/ollama.py` (+18 -5)
➕ `backend/open_webui/test/routers/test_ollama_verify.py` (+112 -0)
</details>
### 📄 Description
# Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
- [x] Target branch: Please verify that the pull request targets the dev branch.
- [x] Description: Provide a concise description of the changes made in this pull request.
- [x] Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
- [x] Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
- [ ] Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
- [x] Testing: Have you written and run sufficient tests to validate the changes?
- [ ] Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
- [ ] Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following:
- UPD
## Changelog Entry
### Added
- Unit tests for the Ollama verify endpoint covering valid version responses, missing version field, and non-200 responses.
- Ollama verify endpoint now validates 200 responses to ensure they are JSON objects containing a properly formatted version string (leading 'v' required), while preserving original error behavior for non-200 responses.
### Fixed
- Corrected misuse of await on the response status (r.status).
### Description
Discussion link: https://github.com/open-webui/open-webui/discussions/17416
Incremental improvement to the verify_connection() function in `backend/open_webui/routers/ollama.py`. This update checks for a valid version string that should be returned by ` f"{url}/api/version"`.
---
<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/17535
Author: @sevsec
Created: 9/17/2025
Status: ❌ Closed
Base:
dev← Head:sevsec📝 Commits (1)
6d64780UPD: Improve Ollama endpoint validation📊 Changes
3 files changed (+144 additions, -5 deletions)
View changed files
📝
CHANGELOG.md(+14 -0)📝
backend/open_webui/routers/ollama.py(+18 -5)➕
backend/open_webui/test/routers/test_ollama_verify.py(+112 -0)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
Changelog Entry
Added
Fixed
Description
Discussion link: https://github.com/open-webui/open-webui/discussions/17416
Incremental improvement to the verify_connection() function in
backend/open_webui/routers/ollama.py. This update checks for a valid version string that should be returned byf"{url}/api/version".🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.