ruff check backend/open_webui/retrieval/utils.py was attempted, but the file has pre-existing unrelated lint findings.
Screenshots or Videos
N/A
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 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/24858
**Author:** [@arieleli01212](https://github.com/arieleli01212)
**Created:** 5/18/2026
**Status:** 🔄 Open
**Base:** `dev` ← **Head:** `codex/fix-youtube-short-url-loader`
---
### 📝 Commits (1)
- [`b6cc202`](https://github.com/open-webui/open-webui/commit/b6cc20258a9851f0d333b5635425091c9889b83c) fix: route YouTube URLs to transcript loader
### 📊 Changes
**1 file changed** (+11 additions, -4 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/retrieval/utils.py` (+11 -4)
</details>
### 📄 Description
# Pull Request Checklist
- [x] **Linked Issue/Discussion:** This PR references an existing Issue — Closes #24856.
- [x] **Target branch:** The pull request targets the `dev` branch.
- [x] **Description:** A concise description of the changes is provided below.
- [x] **Changelog:** A changelog entry following Keep a Changelog format is included at the bottom.
- [x] **Documentation:** Not applicable; this fixes existing YouTube URL loading behavior.
- [x] **Dependencies:** No dependency changes.
- [x] **Testing:** Validation was performed for the touched backend file.
- [x] **No Unchecked AI Code:** This PR has undergone review and validation.
- [x] **Self-Review:** A self-review of the code has been performed.
- [x] **Architecture:** Keeps redirect-safe content probing for non-YouTube URLs and routes YouTube URLs through the existing `YoutubeLoader`.
- [x] **Git Hygiene:** The PR is atomic, based on `dev`, and contains no unrelated commits.
- [x] **Title Prefix:** The PR title uses the `fix` prefix.
# Changelog Entry
### Description
- Route YouTube URLs directly through the existing transcript loader after URL validation.
### Added
- N/A
### Changed
- N/A
### Deprecated
- N/A
### Removed
- N/A
### Fixed
- `youtu.be` short URLs no longer get misclassified by the content-type probe before `YoutubeLoader` can load the transcript.
### Security
- N/A
### Breaking Changes
- N/A
---
### Additional Information
Closes #24856.
Validation:
- `python3 -m py_compile backend/open_webui/retrieval/utils.py`
- `ruff check backend/open_webui/retrieval/utils.py` was attempted, but the file has pre-existing unrelated lint findings.
### Screenshots or Videos
- N/A
### Contributor License Agreement
- [x] By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms.
---
<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/24858
Author: @arieleli01212
Created: 5/18/2026
Status: 🔄 Open
Base:
dev← Head:codex/fix-youtube-short-url-loader📝 Commits (1)
b6cc202fix: route YouTube URLs to transcript loader📊 Changes
1 file changed (+11 additions, -4 deletions)
View changed files
📝
backend/open_webui/retrieval/utils.py(+11 -4)📄 Description
Pull Request Checklist
devbranch.YoutubeLoader.dev, and contains no unrelated commits.fixprefix.Changelog Entry
Description
Added
Changed
Deprecated
Removed
Fixed
youtu.beshort URLs no longer get misclassified by the content-type probe beforeYoutubeLoadercan load the transcript.Security
Breaking Changes
Additional Information
Closes #24856.
Validation:
python3 -m py_compile backend/open_webui/retrieval/utils.pyruff check backend/open_webui/retrieval/utils.pywas attempted, but the file has pre-existing unrelated lint findings.Screenshots or Videos
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.