[PR #18029] [CLOSED] feat: implement CallbackRoute for enhanced request handling across ro… #40276

Closed
opened 2026-04-25 12:40:44 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/18029
Author: @mitchou10
Created: 10/3/2025
Status: Closed

Base: devHead: feat/route-callback


📝 Commits (1)

  • f1aa79c feat: implement CallbackRoute for enhanced request handling across routers

📊 Changes

6 files changed (+134 additions, -4 deletions)

View changed files

📝 backend/open_webui/routers/evaluations.py (+2 -1)
📝 backend/open_webui/routers/files.py (+2 -1)
📝 backend/open_webui/routers/knowledge.py (+2 -1)
📝 backend/open_webui/routers/notes.py (+2 -1)
backend/open_webui/test/util/test_callback.py (+70 -0)
backend/open_webui/utils/callback.py (+56 -0)

📄 Description

…uters

Pull Request Checklist

  • 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.
  • 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:
    • feat: Introduces a new feature or enhancement to the codebase

Changelog Entry

Description

  • Add support for a custom CallbackRoute that triggers an asynchronous POST callback to an external URL after a route is executed.

Added

  • Added CallbackRoute to trigger asynchronous POST callbacks after route execution
  • Callback payload includes path, method, response_content, and optional callback_params
  • Enables non-blocking integration with third-party services and automated workflows
    Need to set
CALLBACK_URL = os.environ.get("CALLBACK_URL")
CALLBACK_TOKEN = os.environ.get("CALLBACK_TOKEN")

if not set that non blocking process even any error appear during the callback

Changed

  • change route class into routes notes, feedback, files, knowledge

🔄 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/18029 **Author:** [@mitchou10](https://github.com/mitchou10) **Created:** 10/3/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `feat/route-callback` --- ### 📝 Commits (1) - [`f1aa79c`](https://github.com/open-webui/open-webui/commit/f1aa79cac8611be583ba1b4a31a98915226de078) feat: implement CallbackRoute for enhanced request handling across routers ### 📊 Changes **6 files changed** (+134 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/routers/evaluations.py` (+2 -1) 📝 `backend/open_webui/routers/files.py` (+2 -1) 📝 `backend/open_webui/routers/knowledge.py` (+2 -1) 📝 `backend/open_webui/routers/notes.py` (+2 -1) ➕ `backend/open_webui/test/util/test_callback.py` (+70 -0) ➕ `backend/open_webui/utils/callback.py` (+56 -0) </details> ### 📄 Description …uters # Pull Request Checklist - [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] **Testing:** Have you written and run sufficient tests to validate the changes? - [x] **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? - [x] **Prefix:** To clearly categorize this pull request, prefix the pull request title using one of the following: - **feat**: Introduces a new feature or enhancement to the codebase # Changelog Entry ### Description - Add support for a custom `CallbackRoute` that triggers an asynchronous POST callback to an external URL after a route is executed. ### Added - Added CallbackRoute to trigger asynchronous POST callbacks after route execution - Callback payload includes path, method, response_content, and optional callback_params - Enables non-blocking integration with third-party services and automated workflows Need to set ```python CALLBACK_URL = os.environ.get("CALLBACK_URL") CALLBACK_TOKEN = os.environ.get("CALLBACK_TOKEN") ``` if not set that non blocking process even any error appear during the callback ### Changed - change route class into routes `notes`, `feedback`, `files`, `knowledge` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-25 12:40:44 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#40276