[GH-ISSUE #22650] issue: __request__ not being passed into pipeline #74381

Closed
opened 2026-05-13 07:07:31 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @jayteaftw on GitHub (Mar 13, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/22650

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.8.10

Ollama Version (if applicable)

No response

Operating System

macOs

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

When sending a request to a connected pipeline using the Oauth or session authentication setting, I expect the the request value inside of

 def pipe(
        self, user_message: str, model_id: str, messages: List[dict], body: dict, __request__: Request = None, 
    ): # -> Union[str, Generator, Iterator]:
        print(f"{__request__ = }")

        yield {"event": {"type": "message", "data": {"content": "the answer was always 4"}}}

as shown in the docs

Actual Behavior

When I send a request to the pipeline and look at the logs, request is None.

INFO:root:stream:false:<generator object Pipeline.pipe at 0xffff7d3b8540>

INFO:root:stream:false:{'event': {'type': 'message', 'data': {'content': 'the answer was always 4'}}}

__request__ = None

INFO:     172.217.165.202:41529 - "POST /chat/completions HTTP/1.1" 200 OK

Steps to Reproduce

  1. Set up an Open Webui instance. I used docker and ensure ENABLE_FORWARD_USER_INFO_HEADERS=True
  2. Create a pipeline and host it through an endpoint
from starlette.requests import Request
from pydantic import BaseModel

class Pipeline:
    class Valves(BaseModel):
        pass

    def __init__(self):
        self.valves = self.Valves()

    def pipe(
        self, user_message: str, model_id: str, messages: list[dict], body: dict, __request__: Request = None, 
    ): 
        print(f"{__request__ = }")
        yield {"event": {"type": "message", "data": {"content": "the answer was always 4"}}}
  1. Make the connection to between the Open Webui instance and pipeline and set the Authentication setting to Oauth or Session.

Logs & Screenshots

Image

Additional Information

A version of someone doing this has been documented here which was posted Augusted 25th 2025 which means this worked for some version of open webui before v0.6.25

Originally created by @jayteaftw on GitHub (Mar 13, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/22650 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.8.10 ### Ollama Version (if applicable) _No response_ ### Operating System macOs ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior When sending a request to a connected pipeline using the Oauth or session authentication setting, I expect the the __request__ value inside of ```python def pipe( self, user_message: str, model_id: str, messages: List[dict], body: dict, __request__: Request = None, ): # -> Union[str, Generator, Iterator]: print(f"{__request__ = }") yield {"event": {"type": "message", "data": {"content": "the answer was always 4"}}} ``` as shown in the [docs](https://docs.openwebui.com/features/extensibility/plugin/development/reserved-args#__request__) ### Actual Behavior When I send a request to the pipeline and look at the logs, __request__ is None. ``` INFO:root:stream:false:<generator object Pipeline.pipe at 0xffff7d3b8540> INFO:root:stream:false:{'event': {'type': 'message', 'data': {'content': 'the answer was always 4'}}} __request__ = None INFO: 172.217.165.202:41529 - "POST /chat/completions HTTP/1.1" 200 OK ``` ### Steps to Reproduce 1) Set up an Open Webui instance. I used docker and ensure ENABLE_FORWARD_USER_INFO_HEADERS=True 2) Create a pipeline and host it through an endpoint ```python from starlette.requests import Request from pydantic import BaseModel class Pipeline: class Valves(BaseModel): pass def __init__(self): self.valves = self.Valves() def pipe( self, user_message: str, model_id: str, messages: list[dict], body: dict, __request__: Request = None, ): print(f"{__request__ = }") yield {"event": {"type": "message", "data": {"content": "the answer was always 4"}}} ``` 3) Make the connection to between the Open Webui instance and pipeline and set the Authentication setting to Oauth or Session. ### Logs & Screenshots <img width="466" height="539" alt="Image" src="https://github.com/user-attachments/assets/762aa00f-1fc1-4d41-931e-8d741973bdf8" /> ### Additional Information A version of someone doing this has been documented [here](https://github.com/open-webui/open-webui/discussions/8957#discussioncomment-14270201) which was posted Augusted 25th 2025 which means this worked for some version of open webui before [v0.6.25](https://github.com/open-webui/open-webui/releases/tag/v0.6.25)
GiteaMirror added the bug label 2026-05-13 07:07:31 -05:00
Author
Owner

@gvelesandro commented on GitHub (Mar 13, 2026):

I'm researching where agent systems fail because request, auth, or workflow context doesn't get carried into the execution path. Your __request__ report looks like a clean example of that boundary breaking.

If you're open to it, I'd value one concrete postmortem:

  • what the pipeline was trying to do
  • what request/session context was missing
  • where that context should have lived
  • what workaround you tried
  • what it cost in debugging time or broken behavior

One written example is enough: https://www.agentsneedcontext.com/agent-failure-postmortem

No pitch. Just problem discovery from real failures.

<!-- gh-comment-id:4056497130 --> @gvelesandro commented on GitHub (Mar 13, 2026): I'm researching where agent systems fail because request, auth, or workflow context doesn't get carried into the execution path. Your `__request__` report looks like a clean example of that boundary breaking. If you're open to it, I'd value one concrete postmortem: - what the pipeline was trying to do - what request/session context was missing - where that context should have lived - what workaround you tried - what it cost in debugging time or broken behavior One written example is enough: https://www.agentsneedcontext.com/agent-failure-postmortem No pitch. Just problem discovery from real failures.
Author
Owner

@Classic298 commented on GitHub (Mar 13, 2026):

Not actually an open webui issue, this is a pipelines server issue

<!-- gh-comment-id:4056612044 --> @Classic298 commented on GitHub (Mar 13, 2026): Not actually an open webui issue, this is a pipelines server issue
Author
Owner

@Classic298 commented on GitHub (Mar 13, 2026):

https://github.com/open-webui/pipelines/pull/595

feel free to open an issue in pipelines repo

<!-- gh-comment-id:4056628149 --> @Classic298 commented on GitHub (Mar 13, 2026): https://github.com/open-webui/pipelines/pull/595 feel free to open an issue in pipelines repo
Author
Owner

@jayteaftw commented on GitHub (Mar 13, 2026):

open-webui/pipelines#595

feel free to open an issue in pipelines repo

https://github.com/open-webui/pipelines/issues/596

<!-- gh-comment-id:4056645559 --> @jayteaftw commented on GitHub (Mar 13, 2026): > [open-webui/pipelines#595](https://github.com/open-webui/pipelines/pull/595) > > feel free to open an issue in pipelines repo https://github.com/open-webui/pipelines/issues/596
Author
Owner

@WhatIsData commented on GitHub (Mar 23, 2026):

@Classic298 no PR to pipelines has been approved in almost 7 months unfortunately.

<!-- gh-comment-id:4111297491 --> @WhatIsData commented on GitHub (Mar 23, 2026): @Classic298 no PR to pipelines has been approved in almost 7 months unfortunately.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#74381