You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When attempting to use any pipeline (even a minimal one) via the /api/chat/completions endpoint, OpenWebUI v0.6.5 throws a TypeError: list indices must be integers or slices, not str. This results in a 400 Bad Request response, and the pipeline code itself is never executed. The error seems to occur within the main OpenWebUI backend code while processing the request before dispatching it to the pipeline server. Regular models (non-pipeline) work correctly.
To Reproduce
Set up OpenWebUI v0.6.5 with the pipeline server enabled.
Create a minimal pipeline file (e.g., hello.py in the pipelines directory) like the simplified one below:
# pipelines/hello.py"""name: Hello Simplifieddescription: A minimal pipeline for testing."""fromtypingimportList, Union, Generator, IteratorfrompprintimportpprintclassPipeline:
def__init__(self):
self.name: str="Hello Simplified"self.debug: bool=Trueasyncdefon_startup(self):
print(f"[{self.name}] on_startup")
asyncdefon_shutdown(self):
print(f"[{self.name}] on_shutdown")
defpipe(
self,
user_message: str,
model_id: str,
messages: List[dict],
body: Union[dict, list],
) ->Union[str, Generator, Iterator]:
print(f"[{self.name}] pipe function called.") # This line is never reachedpprint(user_message)
pprint(model_id)
pprint(messages)
pprint(body)
returnf"Simplified Hello! You sent: {user_message}"
Enable DEBUG logging for the main open-webui container (e.g., set GLOBAL_LOG_LEVEL=DEBUG in docker-compose.yaml).
Restart OpenWebUI.
In the Web UI, select the "Hello Simplified" pipeline as the model.
Send any chat message (e.g., "Hello").
Observe the 400 Bad Request error in the UI and the browser's network console.
Check the logs for the main open-webui container.
Expected behavior
The /api/chat/completions request should succeed (return 200 OK), and the pipeline's pipe method should be called, processing the message and returning a response. The pipeline server logs should show the pipe function called. message.
Actual behavior
The request fails with a 400 Bad Request. The open-webui container log shows the following DEBUG messages just before the error, indicating the error occurs within the main backend when processing the chat payload for a pipeline model:
2025-04-21 07:38:54.543 | DEBUG | open_webui.utils.middleware:process_chat_payload:688 - form_data: {'stream': True, 'model': 'hello', 'messages': [{'role': 'user', 'content': 'こんにちは'}], ... , 'model': {'id': 'hello', 'name': 'Hello Simplified', ... 'pipeline': {'type': 'pipe', ...}, ...}} - {}
2025-04-21 07:38:54.543 | DEBUG | open_webui.main:chat_completion:1135 - Error processing chat payload: list indices must be integers or slices, not str - {}
2025-04-21 07:38:54.545 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - ... - "POST /api/chat/completions HTTP/1.1" 400 - {}
(Note: Some parts of the log like user ID, chat ID, full form_data details, etc., were truncated for brevity)
The pipeline server (open-webui-pipelines-1 container) logs show the on_startup message but never receive the request to execute the pipe method.
Environment details
OS: [docker(colima) on macOS Sonoma]
Browser: [Chrome 135.0.7049.96]
OpenWebUI Version: v0.6.5
Deployment method: Docker Compose
Additional context
This issue seems specific to the pipeline functionality introduced/updated around v0.6.x. Using standard LLMs (not pipelines) works correctly, and the /api/chat/completions endpoint returns a 200 OK status for them. The error occurs regardless of the complexity of the pipeline code itself.
The text was updated successfully, but these errors were encountered:
Describe the bug
When attempting to use any pipeline (even a minimal one) via the
/api/chat/completions
endpoint, OpenWebUI v0.6.5 throws aTypeError: list indices must be integers or slices, not str
. This results in a400 Bad Request
response, and the pipeline code itself is never executed. The error seems to occur within the main OpenWebUI backend code while processing the request before dispatching it to the pipeline server. Regular models (non-pipeline) work correctly.To Reproduce
hello.py
in thepipelines
directory) like the simplified one below:open-webui
container (e.g., setGLOBAL_LOG_LEVEL=DEBUG
indocker-compose.yaml
).400 Bad Request
error in the UI and the browser's network console.open-webui
container.Expected behavior
The
/api/chat/completions
request should succeed (return 200 OK), and the pipeline'spipe
method should be called, processing the message and returning a response. The pipeline server logs should show thepipe function called.
message.Actual behavior
The request fails with a
400 Bad Request
. Theopen-webui
container log shows the following DEBUG messages just before the error, indicating the error occurs within the main backend when processing the chat payload for a pipeline model:(Note: Some parts of the log like user ID, chat ID, full form_data details, etc., were truncated for brevity)
The pipeline server (
open-webui-pipelines-1
container) logs show theon_startup
message but never receive the request to execute thepipe
method.Environment details
Additional context
This issue seems specific to the pipeline functionality introduced/updated around v0.6.x. Using standard LLMs (not pipelines) works correctly, and the
/api/chat/completions
endpoint returns a 200 OK status for them. The error occurs regardless of the complexity of the pipeline code itself.The text was updated successfully, but these errors were encountered: