Currently, embedding requests do not pass through Filter functions, even though they can be attached to embedding models in the Models settings.
This PR adds the application of filters to embedding models.
An example use case is the injection of additional parameters for upstream usage tracking (e.g. with LiteLLM).
🔄 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/17908
**Author:** [@Simon-Stone](https://github.com/Simon-Stone)
**Created:** 9/30/2025
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `add-filters-to-embedding-models`
---
### 📝 Commits (4)
- [`37d1c85`](https://github.com/open-webui/open-webui/commit/37d1c85c996e1bdcd505e1e6d62b2f17acd8df23) Merge pull request #17827 from open-webui/dev
- [`4d7fdda`](https://github.com/open-webui/open-webui/commit/4d7fddaf7e434bf59fdd879ef11d712a503b7863) Merge pull request #17892 from open-webui/dev
- [`95e2267`](https://github.com/open-webui/open-webui/commit/95e2267fec6fb5707b1954d6032ccb9df96977e9) feat: enhance embedding generation with filter functions
- [`390a1ca`](https://github.com/open-webui/open-webui/commit/390a1caef99895f562c6df99834227fc10ab8ca6) test: add integration test for embedding filter application
### 📊 Changes
**2 files changed** (+99 additions, -3 deletions)
<details>
<summary>View changed files</summary>
➕ `backend/open_webui/test/apps/webui/routers/test_embeddings.py` (+70 -0)
📝 `backend/open_webui/utils/embeddings.py` (+29 -3)
</details>
### 📄 Description
# Filter function application for embedding models
Currently, embedding requests do not pass through Filter functions, even though they can be attached to embedding models in the Models settings.
This PR adds the application of filters to embedding models.
An example use case is the injection of additional parameters for upstream usage tracking (e.g. with LiteLLM).
---
<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/17908
Author: @Simon-Stone
Created: 9/30/2025
Status: ❌ Closed
Base:
dev← Head:add-filters-to-embedding-models📝 Commits (4)
37d1c85Merge pull request #17827 from open-webui/dev4d7fddaMerge pull request #17892 from open-webui/dev95e2267feat: enhance embedding generation with filter functions390a1catest: add integration test for embedding filter application📊 Changes
2 files changed (+99 additions, -3 deletions)
View changed files
➕
backend/open_webui/test/apps/webui/routers/test_embeddings.py(+70 -0)📝
backend/open_webui/utils/embeddings.py(+29 -3)📄 Description
Filter function application for embedding models
Currently, embedding requests do not pass through Filter functions, even though they can be attached to embedding models in the Models settings.
This PR adds the application of filters to embedding models.
An example use case is the injection of additional parameters for upstream usage tracking (e.g. with LiteLLM).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.