issue: Queries to any model return 500 error even though open-webui is able to connect to Ollama #3620

Closed
opened 2025-11-11 15:35:22 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @geconf on GitHub (Feb 6, 2025).

Bug Report

Installation Method

Docker

Environment

  • Open WebUI Version: 0.5.10, 0.5.8 and 0.5.7

  • Ollama (if applicable): 0.5.7

  • Operating System: Pop!_OS 24.04

  • Browser (if applicable): Firefox 134.0.2

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.
  • [ X ] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

The query should return an answer.

Actual Behavior:

Queries to any model return 500: Ollama: 500, message='Internal Server Error', url='http://host.docker.internal:11434/api/chat'.

Description

Bug Summary:
This was working correctly and occured without explanation. Looking at the logs it seems that it is able to reach the ollama instance but has issues with the a POST request to /api/chat/completions (see log section below)

Ollama is accessible from open-webui so this is not a connection issue:

docker exec -it open-webui curl http://host.docker.internal:11434
Ollama is running

Sending a POST request through terminal does generate a valid response:

docker exec -it open-webui curl -X POST http://host.docker.internal:11434/api/chat -H "Content-Type: application/json" -d '{"model": "qwen2.5-coder:14b-instruct-q4_K_M", "messages": [{"role": "system", "content": "You are an AI assistant."}, {"role": "user", "content": "just say hi in one word"}]}'

{"model":"qwen2.5-coder:14b-instruct-q4_K_M","created_at":"2025-02-06T01:16:21.611110819Z","message":{"role":"assistant","content":"Hi"},"done":false}

{"model":"qwen2.5-coder:14b-instruct-q4_K_M","created_at":"2025-02-06T01:16:21.627178742Z","message":

{"role":"assistant","content":""},"done_reason":"stop","done":true,"total_duration":46115191,"load_duration":9442160,"prompt_eval_count":25,"prompt_eval_duration":2000000,"eval_count":2,"eval_duration":31000000}

Reproduction Details

Steps to Reproduce:
Unsure what triggered it but

  1. Send a query through the web interface

Logs and Screenshots

Browser Console Logs:
n/a

Docker Container Logs:

INFO:     192.168.1.213:42796 - "GET /ollama/api/version HTTP/1.1" 200 OK
INFO:     192.168.1.213:42796 - "GET /api/v1/users/user/settings HTTP/1.1" 200 OK
INFO:     192.168.1.213:41506 - "POST /api/v1/chats/new HTTP/1.1" 200 OK
INFO:     192.168.1.213:41506 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
INFO:     192.168.1.213:41506 - "POST /api/v1/chats/ca52a8a0-cba1-45ae-b9ec-0b224761297f HTTP/1.1" 200 OK
INFO:     192.168.1.213:41506 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
INFO:     192.168.1.213:41506 - "POST /api/chat/completions HTTP/1.1" 400 Bad Request
INFO:     192.168.1.213:41506 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
INFO:     192.168.1.213:41506 - "GET /api/v1/chats/87390d91-d142-4c5e-b500-bf96d7fd5d97 HTTP/1.1" 200 OK

Screenshots/Screen Recordings (if applicable):

Image

Additional Information

Arena models do not seem to have this problem. for some reason I could get a response from them.

Note

If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!

Originally created by @geconf on GitHub (Feb 6, 2025). # Bug Report ## Installation Method Docker ## Environment - **Open WebUI Version:** 0.5.10, 0.5.8 and 0.5.7 - **Ollama (if applicable):** 0.5.7 - **Operating System:** Pop!_OS 24.04 - **Browser (if applicable):** Firefox 134.0.2 **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. - [ X ] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: The query should return an answer. ## Actual Behavior: Queries to any model return 500: Ollama: 500, message='Internal Server Error', url='http://host.docker.internal:11434/api/chat'. ## Description **Bug Summary:** This was working correctly and occured without explanation. Looking at the logs it seems that it is able to reach the ollama instance but has issues with the a POST request to /api/chat/completions (see log section below) Ollama is accessible from open-webui so this is not a connection issue: ``` docker exec -it open-webui curl http://host.docker.internal:11434 Ollama is running ``` Sending a POST request through terminal does generate a valid response: ``` docker exec -it open-webui curl -X POST http://host.docker.internal:11434/api/chat -H "Content-Type: application/json" -d '{"model": "qwen2.5-coder:14b-instruct-q4_K_M", "messages": [{"role": "system", "content": "You are an AI assistant."}, {"role": "user", "content": "just say hi in one word"}]}' {"model":"qwen2.5-coder:14b-instruct-q4_K_M","created_at":"2025-02-06T01:16:21.611110819Z","message":{"role":"assistant","content":"Hi"},"done":false} {"model":"qwen2.5-coder:14b-instruct-q4_K_M","created_at":"2025-02-06T01:16:21.627178742Z","message": {"role":"assistant","content":""},"done_reason":"stop","done":true,"total_duration":46115191,"load_duration":9442160,"prompt_eval_count":25,"prompt_eval_duration":2000000,"eval_count":2,"eval_duration":31000000} ``` ## Reproduction Details **Steps to Reproduce:** Unsure what triggered it but 1. Send a query through the web interface ## Logs and Screenshots **Browser Console Logs:** n/a **Docker Container Logs:** ``` INFO: 192.168.1.213:42796 - "GET /ollama/api/version HTTP/1.1" 200 OK INFO: 192.168.1.213:42796 - "GET /api/v1/users/user/settings HTTP/1.1" 200 OK INFO: 192.168.1.213:41506 - "POST /api/v1/chats/new HTTP/1.1" 200 OK INFO: 192.168.1.213:41506 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK INFO: 192.168.1.213:41506 - "POST /api/v1/chats/ca52a8a0-cba1-45ae-b9ec-0b224761297f HTTP/1.1" 200 OK INFO: 192.168.1.213:41506 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK INFO: 192.168.1.213:41506 - "POST /api/chat/completions HTTP/1.1" 400 Bad Request INFO: 192.168.1.213:41506 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK INFO: 192.168.1.213:41506 - "GET /api/v1/chats/87390d91-d142-4c5e-b500-bf96d7fd5d97 HTTP/1.1" 200 OK ``` **Screenshots/Screen Recordings (if applicable):** ![Image](https://github.com/user-attachments/assets/d238cb18-4c4a-447f-b871-46d4b3df0c7e) ## Additional Information Arena models do not seem to have this problem. for some reason I could get a response from them. ## Note If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
Author
Owner

@petrusali commented on GitHub (Feb 6, 2025):

I have the same problem with OpenRouter, Google API, liteLLM and AnythingLLM. Since 0.5.8 OUI unable to communicate to those API.

@petrusali commented on GitHub (Feb 6, 2025): I have the same problem with OpenRouter, Google API, liteLLM and AnythingLLM. Since 0.5.8 OUI unable to communicate to those API.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#3620