I'm using openrouter api key (100% sure that there is no problem from provider side). During message to Claude 3.5 Sonnet or any other model I get nothing, the infinity load animation only.
ERROR [asyncio] Task exception was never retrieved
future: <Task finished name='Task-2347' coro=<process_chat_response.<locals>.post_response_handler() done, defined at /app/backend/open_webui/utils/middleware.py:932> exception=IndexError('list index out of range')>
Traceback (most recent call last):
File "/app/backend/open_webui/utils/middleware.py", line 1057, in post_response_handler
await background_tasks_handler()
File "/app/backend/open_webui/utils/middleware.py", line 819, in background_tasks_handler
res.get("choices", [])[0]
~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
ERROR [asyncio] Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f7418783490>
ERROR [asyncio] Unclosed connector
connections: ['deque([(<aiohttp.client_proto.ResponseHandler object at 0x7f7418b800c0>, 2180191.947391675)])']
connector: <aiohttp.connector.TCPConnector object at 0x7f7418792890>
Originally created by @c0st1nus on GitHub (Jan 13, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/8526
# Bug Report
I'm using openrouter api key (100% sure that there is no problem from provider side). During message to Claude 3.5 Sonnet or any other model I get nothing, the infinity load animation only.
## Important Notes
I saw a `completed` request with answer body:
```
{
"model": "anthropic/claude-3.5-sonnet",
"messages": [
{
"id": "7c175afe-7731-49c0-8cc3-f2392e75f2f5",
"role": "user",
"content": "Hello!",
"timestamp": 1736793345
},
{
"id": "e8efb27b-01ee-45a7-842e-4e95e11c9016",
"role": "assistant",
"content": "",
"timestamp": 1736793345
}
],
"chat_id": "04c029d6-df5e-4f73-851d-c749a2d77fb9",
"session_id": "zR7WFQhJ50GaLuODAAAN",
"id": "e8efb27b-01ee-45a7-842e-4e95e11c9016"
}
```
There was answer alarm also.
## Installation Method
I installed open-webui interface using docker-compose:
```docker-compose.yaml
version: '3.8'
services:
open-webui:
image: ghcr.io/open-webui/open-webui:main
container_name: open-webui
ports:
- "3000:8080"
volumes:
- ./db:/app/backend/data
restart: always
```
Otherwise interface works excellent
## Environment
Open WebUI v0.5.4
OpenRouter API key
**Operating System:** Debian
**Browser (if applicable):** Firefox 134.0
**Confirmation:**
- [x] I have read and followed all the instructions provided in the README.md.
- [x] I am on 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.
- [ ] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.
## Expected Behavior:
The model answer message is supposed to be.
## Actual Behavior:
The model does not answers at all.
## Logs and Screenshots



**Browser Console Logs:**
Completion console log
```
Object { chat_id: "04c029d6-df5e-4f73-851d-c749a2d77fb9", message_id: "e8efb27b-01ee-45a7-842e-4e95e11c9016", data: {…} }
chat_id: "04c029d6-df5e-4f73-851d-c749a2d77fb9"
data: Object { type: "chat:completion", data: {…} }
data: Object { done: true, content: "", title: "Новый чат" }
content: ""
done: true
title: "Новый чат"
<prototype>: Object { … }
type: "chat:completion"
<prototype>: Object { … }
message_id: "e8efb27b-01ee-45a7-842e-4e95e11c9016"
<prototype>: Object { … }
Chat.svelte:226:10
```
**Docker Container Logs:**
```
ERROR [asyncio] Task exception was never retrieved
future: <Task finished name='Task-2347' coro=<process_chat_response.<locals>.post_response_handler() done, defined at /app/backend/open_webui/utils/middleware.py:932> exception=IndexError('list index out of range')>
Traceback (most recent call last):
File "/app/backend/open_webui/utils/middleware.py", line 1057, in post_response_handler
await background_tasks_handler()
File "/app/backend/open_webui/utils/middleware.py", line 819, in background_tasks_handler
res.get("choices", [])[0]
~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
ERROR [asyncio] Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f7418783490>
ERROR [asyncio] Unclosed connector
connections: ['deque([(<aiohttp.client_proto.ResponseHandler object at 0x7f7418b800c0>, 2180191.947391675)])']
connector: <aiohttp.connector.TCPConnector object at 0x7f7418792890>
```
Would like to prove the absence of errors from provider side
importrequestsimportjsonresponse=requests.post(url="https://openrouter.ai/api/v1/chat/completions",headers={"Authorization":"Bearer (( SAME API KEY LIKE IN WEBUI IS ))",},data=json.dumps({"model":"openai/gpt-3.5-turbo","messages":[{"role":"user","content":"What is the meaning of life?"}]}))print(response.json())
python main.py
{'id': 'gen-1736791728-URixFEq17eLdVi0xoUWU', 'provider': 'OpenAI', 'model': 'openai/gpt-3.5-turbo', 'object': 'chat.completion', 'created': 1736791728, 'choices': [{'logprobs': None, 'finish_reason': 'stop', 'index': 0, 'message': {'role': 'assistant', 'content': 'The meaning of life is a philosophical question that has been debated by scholars, theologians, and individuals throughout history. Different people and cultures have different beliefs about the purpose and meaning of life. Some believe that the meaning of life is to seek happiness and fulfillment, others believe it is to serve a higher power or spiritual purpose, and still others believe
that life has no inherent meaning and it is up to each individual to create their own meaning. Ultimately, the meaning of life is a deeply personal and subjective question that each person must grapple with and answer for themselves.', 'refusal': ''}}], 'system_fingerprint': None,
'usage': {'prompt_tokens': 14, 'completion_tokens': 113, 'total_tokens': 127}}
<!-- gh-comment-id:2587948827 -->
@c0st1nus commented on GitHub (Jan 13, 2025):
Would like to prove the absence of errors from provider side
```Python
import requests
import json
response = requests.post(
url="https://openrouter.ai/api/v1/chat/completions",
headers={
"Authorization": "Bearer (( SAME API KEY LIKE IN WEBUI IS ))",
},
data=json.dumps({
"model": "openai/gpt-3.5-turbo",
"messages": [
{
"role": "user",
"content": "What is the meaning of life?"
}
]
})
)
print(response.json())
```
```Result
python main.py
{'id': 'gen-1736791728-URixFEq17eLdVi0xoUWU', 'provider': 'OpenAI', 'model': 'openai/gpt-3.5-turbo', 'object': 'chat.completion', 'created': 1736791728, 'choices': [{'logprobs': None, 'finish_reason': 'stop', 'index': 0, 'message': {'role': 'assistant', 'content': 'The meaning of life is a philosophical question that has been debated by scholars, theologians, and individuals throughout history. Different people and cultures have different beliefs about the purpose and meaning of life. Some believe that the meaning of life is to seek happiness and fulfillment, others believe it is to serve a higher power or spiritual purpose, and still others believe
that life has no inherent meaning and it is up to each individual to create their own meaning. Ultimately, the meaning of life is a deeply personal and subjective question that each person must grapple with and answer for themselves.', 'refusal': ''}}], 'system_fingerprint': None,
'usage': {'prompt_tokens': 14, 'completion_tokens': 113, 'total_tokens': 127}}
```
<!-- gh-comment-id:2589052255 -->
@rgaricano commented on GitHub (Jan 14, 2025):
Another issue related: [OpenAI: o1-mini doesn't work through openrouter #8474](https://github.com/open-webui/open-webui/issues/8474#issue-2781461882)
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.
Originally created by @c0st1nus on GitHub (Jan 13, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/8526
Bug Report
I'm using openrouter api key (100% sure that there is no problem from provider side). During message to Claude 3.5 Sonnet or any other model I get nothing, the infinity load animation only.
Important Notes
I saw a
completedrequest with answer body:There was answer alarm also.
Installation Method
I installed open-webui interface using docker-compose:
Otherwise interface works excellent
Environment
Open WebUI v0.5.4
OpenRouter API key
Operating System: Debian
Browser (if applicable): Firefox 134.0
Confirmation:
Expected Behavior:
The model answer message is supposed to be.
Actual Behavior:
The model does not answers at all.
Logs and Screenshots
Browser Console Logs:
Completion console log
Docker Container Logs:
@c0st1nus commented on GitHub (Jan 13, 2025):
Would like to prove the absence of errors from provider side
@rgaricano commented on GitHub (Jan 14, 2025):
Another issue related: OpenAI: o1-mini doesn't work through openrouter #8474
@tjbck commented on GitHub (Jan 16, 2025):
This should've been addressed in dev, testing wanted here!
@feronetick commented on GitHub (Feb 18, 2025):
What's the result here? Should we wait any changes?