[GH-ISSUE #24041] feat: FEEDBACK_WEBHOOK_URL — forward message ratings to an external endpoint #35693

Closed
opened 2026-04-25 09:52:50 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @Arashsm on GitHub (Apr 23, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24041

Check Existing Issues

  • I have searched for all existing open AND closed issues and discussions for similar requests. I have found none that is comparable to my request.

Verify Feature Scope

  • I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions.

Problem Description

Problem Description

When a user submits a thumbs-up/down rating on a message, the feedback is stored only in Open WebUI's internal database (/api/v1/evaluations/feedback). There is no built-in way to forward that data to an external system in real time.

Teams running Open WebUI in production who want to pipe user ratings into their own evaluation or observability stack (e.g., Opik, W&B, MLflow, Langfuse, or a custom analytics endpoint) currently have no option other than polling the REST API, which requires admin authentication, adds latency, and is not real-time.

Desired Solution you'd like

Desired Solution

Add a FEEDBACK_WEBHOOK_URL environment variable (also configurable via the admin UI) following the exact same pattern as the existing WEBHOOK_URL used for user-signup notifications.

When set, the backend forwards each new feedback entry to the configured URL as an async, fire-and-forget HTTP POST immediately after it is saved to the database. The existing post_webhook() utility in utils/webhook.py already handles Slack, Discord, Teams, and generic JSON payloads — it would be reused directly with no duplication.

Minimal sketch of the change (~5 lines total):

config.py — one new PersistentConfig line next to WEBHOOK_URL:

FEEDBACK_WEBHOOK_URL = PersistentConfig(
    'FEEDBACK_WEBHOOK_URL',
    'webhook.feedback_url',
    os.environ.get('FEEDBACK_WEBHOOK_URL', '')
)

routers/evaluations.py — inside the existing create_feedback endpoint:

if request.app.state.config.FEEDBACK_WEBHOOK_URL:
    asyncio.create_task(post_webhook(
        request.app.state.WEBUI_NAME,
        request.app.state.config.FEEDBACK_WEBHOOK_URL,
        "New feedback submitted",
        {"action": "feedback", "feedback": feedback.model_dump()}
    ))

Alternatives Considered

No response

Additional Context

No response

Originally created by @Arashsm on GitHub (Apr 23, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/24041 ### Check Existing Issues - [x] I have searched for all existing **open AND closed** issues and discussions for similar requests. I have found none that is comparable to my request. ### Verify Feature Scope - [x] I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions. ### Problem Description ## Problem Description When a user submits a thumbs-up/down rating on a message, the feedback is stored only in Open WebUI's internal database (`/api/v1/evaluations/feedback`). There is no built-in way to forward that data to an external system in real time. Teams running Open WebUI in production who want to pipe user ratings into their own evaluation or observability stack (e.g., Opik, W&B, MLflow, Langfuse, or a custom analytics endpoint) currently have no option other than polling the REST API, which requires admin authentication, adds latency, and is not real-time. ### Desired Solution you'd like ## Desired Solution Add a `FEEDBACK_WEBHOOK_URL` environment variable (also configurable via the admin UI) following the exact same pattern as the existing `WEBHOOK_URL` used for user-signup notifications. When set, the backend forwards each new feedback entry to the configured URL as an async, fire-and-forget HTTP POST immediately after it is saved to the database. The existing `post_webhook()` utility in `utils/webhook.py` already handles Slack, Discord, Teams, and generic JSON payloads — it would be reused directly with no duplication. **Minimal sketch of the change (~5 lines total):** `config.py` — one new `PersistentConfig` line next to `WEBHOOK_URL`: ```python FEEDBACK_WEBHOOK_URL = PersistentConfig( 'FEEDBACK_WEBHOOK_URL', 'webhook.feedback_url', os.environ.get('FEEDBACK_WEBHOOK_URL', '') ) ``` `routers/evaluations.py` — inside the existing `create_feedback` endpoint: ```python if request.app.state.config.FEEDBACK_WEBHOOK_URL: asyncio.create_task(post_webhook( request.app.state.WEBUI_NAME, request.app.state.config.FEEDBACK_WEBHOOK_URL, "New feedback submitted", {"action": "feedback", "feedback": feedback.model_dump()} )) ``` ### Alternatives Considered _No response_ ### Additional Context _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#35693