[GH-ISSUE #8836] ollama API connection fails when prefix id is set #15282

Closed
opened 2026-04-19 21:32:54 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @neerax on GitHub (Jan 23, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/8836

Bug Report


Installation Method

Kubernetes/Helm chart https://helm.openwebui.com/

Environment

  • Open WebUI Version: [dev]

  • Ollama (if applicable): [0.5.7-0-ga420a45-dirty]

  • Browser (if applicable): [Chrome/Firefox]

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on 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 the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

Start chatting without errors by using a prefix ID to avoid conflicts with other connections.

Actual Behavior:

404: Ollama: 404, message='Not Found', url='http://ollama:11434/api/chat'

Description

Setting a prefix in the Ollama connection and attempting to chat results in the following error: 404: Ollama: 404, message='Not Found', url='http://ollama:11434/api/chat'

Editing the connection and removing the prefix ID resolves the issue.

Bug Summary:
ollama API connection fails when prefix id is set

Reproduction Details

Steps to Reproduce:

Add an Ollama connection and set a prefix ID, then start a chat.

Logs and Screenshots

Image

Browser Console Logs:

...
saveSessionSelectedModels ['ol.deepseek-r1:1.5b'] ["ol.deepseek-r1:1.5b"]
RichTextInput.svelte:160 [tiptap warn]: Duplicate extension names found: ['codeBlock']. This can lead to issues.
...
Chat.svelte:1395 modelId ol.deepseek-r1:1.5b
index.ts:312      
       POST https://XXXXXXX/api/chat/completions 400 (Bad Request)
Chat.svelte:1593 404: Ollama: 404, message='Not Found', url='http://ollama:11434/api/chat'
Chat.svelte:1602 null

Docker Container Logs:
│ open-webui INFO: 192.168.77.117:0 - "POST /api/chat/completions HTTP/1.1" 400 Bad Request
ollama:
│ [GIN] 2025/01/23 - 18:41:35 | 404 | 960.433µs | 10.1.105.139 | POST "/api/chat"

Screenshots/Screen Recordings (if applicable):

Image

Originally created by @neerax on GitHub (Jan 23, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/8836 # Bug Report --- ## Installation Method Kubernetes/Helm chart https://helm.openwebui.com/ ## Environment - **Open WebUI Version:** [dev] - **Ollama (if applicable):** [0.5.7-0-ga420a45-dirty] - **Browser (if applicable):** [Chrome/Firefox] **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: Start chatting without errors by using a prefix ID to avoid conflicts with other connections. ## Actual Behavior: ```404: Ollama: 404, message='Not Found', url='http://ollama:11434/api/chat'``` ## Description Setting a prefix in the Ollama connection and attempting to chat results in the following error: ```404: Ollama: 404, message='Not Found', url='http://ollama:11434/api/chat'``` Editing the connection and removing the prefix ID resolves the issue. **Bug Summary:** ollama API connection fails when prefix id is set ## Reproduction Details **Steps to Reproduce:** Add an Ollama connection and set a prefix ID, then start a chat. ## Logs and Screenshots ![Image](https://github.com/user-attachments/assets/5ad399ad-8cec-44d5-9c8b-672bde79a240) **Browser Console Logs:** ``` ... saveSessionSelectedModels ['ol.deepseek-r1:1.5b'] ["ol.deepseek-r1:1.5b"] RichTextInput.svelte:160 [tiptap warn]: Duplicate extension names found: ['codeBlock']. This can lead to issues. ... Chat.svelte:1395 modelId ol.deepseek-r1:1.5b index.ts:312 POST https://XXXXXXX/api/chat/completions 400 (Bad Request) Chat.svelte:1593 404: Ollama: 404, message='Not Found', url='http://ollama:11434/api/chat' Chat.svelte:1602 null ``` **Docker Container Logs:** ```│ open-webui INFO: 192.168.77.117:0 - "POST /api/chat/completions HTTP/1.1" 400 Bad Request``` ollama: ```│ [GIN] 2025/01/23 - 18:41:35 | 404 | 960.433µs | 10.1.105.139 | POST "/api/chat"``` **Screenshots/Screen Recordings (if applicable):** ![Image](https://github.com/user-attachments/assets/1f7e5cc4-6845-4714-955d-f2b3b468737d)
Author
Owner

@tjbck commented on GitHub (Jan 23, 2025):

Should be fixed with bb45d35a36 in dev!

<!-- gh-comment-id:2610796241 --> @tjbck commented on GitHub (Jan 23, 2025): Should be fixed with bb45d35a364df8f4df8627b5b148d15ff2c2ad43 in dev!
Author
Owner

@neerax commented on GitHub (Jan 23, 2025):

Confirmed, it works, thanks.

<!-- gh-comment-id:2611136462 --> @neerax commented on GitHub (Jan 23, 2025): Confirmed, it works, thanks.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#15282