mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-14 11:05:45 -05:00
Ollama models do not work with external API when URL has trailing forward slash #1276
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @toperator1337 on GitHub (Jun 15, 2024).
Bug Report
Description
Bug Summary:
There is an inconsistent behavior seen when using an HTTPS reference with a trailing forward slash in Admin Settings -> Connections. The URL with and without the forward slash validates as being correct, but then the URL with the forward slash in it does not work when the model from the external resource is queried, giving a 404 error.
Steps to Reproduce:



Set the connection to a URL with a trailing forward slash:
Verify the connection:
Attempt to use the model:
Expected Behavior:
Model either fails validation, or succeeds validation and then actually works.
Actual Behavior:
Model succeeds at validation and then does not work with a 404 on the /ollama/api/chat POST.
Environment
Open WebUI Version: v0.3.4
Ollama (if applicable): 0.1.44
Operating System: N/A
Browser (if applicable): N/A
Reproduction Details
Confirmation:
Logs and Screenshots
Browser Console Logs:
openwebuiharfailure.har.txt
Docker Container Logs:
dockerlogs.txt
Screenshots (if applicable):
See above.
Installation Method
N/A
Additional Information
Ollama is running on a RunPod.IO container.
@tjbck commented on GitHub (Jun 16, 2024):
Can't seem to reproduce on my end but I added an enhancement to automatically remove all the trailing slashes in the urls!
@giladrom commented on GitHub (Nov 11, 2024):
Can confirm - I just spun up the docker instance with a trailing slash/ URL as the OLLAMA_BASE_URL parameter and connection failed.