[GH-ISSUE #1422] Helm chart adds extra /api to end of ollama URL, which is invalid #132216

Closed
opened 2026-05-24 20:19:58 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @cprivitere on GitHub (Apr 4, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/1422

Bug Report

Description

Bug Summary:
Helm chart adds extra /api to end of ollama URL, which is invalid. Can by fixed by removing /api from line 10 of the _helpers function

Steps to Reproduce:
Install the helm chart and log in and check ollama's status in the settings. Just trim off the /api and then refresh and it works.

Expected Behavior:
Should just work without having to make this fix.

Actual Behavior:
Can't connect to ollama and thus no models work, nor can they be downloaded.

Environment

  • Linux (kubernetes on Ubuntu 20.04)
  • Microsoft Edge

Reproduction Details

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.

Logs and Screenshots

Installation Method

Helm

Originally created by @cprivitere on GitHub (Apr 4, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/1422 # Bug Report ## Description **Bug Summary:** Helm chart adds extra /api to end of ollama URL, which is invalid. Can by fixed by removing /api from line 10 of the _helpers function **Steps to Reproduce:** Install the helm chart and log in and check ollama's status in the settings. Just trim off the /api and then refresh and it works. **Expected Behavior:** Should just work without having to make this fix. **Actual Behavior:** Can't connect to ollama and thus no models work, nor can they be downloaded. ## Environment - Linux (kubernetes on Ubuntu 20.04) - Microsoft Edge ## Reproduction Details **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. ## Logs and Screenshots ## Installation Method Helm
Author
Owner

@justinh-rahb commented on GitHub (Apr 4, 2024):

What value are you using for your environment variable for the Ollama base URL? Previously it would have required /api on the end, but we no longer take the endpoint path in the URL. If your value is set to http://ollama:11434/api for example it would be the reason for this. At the same time this change was done, the variable name was changed from OLLAMA_API_BASE_URL to OLLAMA_BASE_URL as well.

<!-- gh-comment-id:2038154787 --> @justinh-rahb commented on GitHub (Apr 4, 2024): What value are you using for your environment variable for the Ollama base URL? Previously it would have required `/api` on the end, but we no longer take the endpoint path in the URL. If your value is set to `http://ollama:11434/api` for example it would be the reason for this. At the same time this change was done, the variable name was changed from `OLLAMA_API_BASE_URL` to `OLLAMA_BASE_URL` as well.
Author
Owner

@slash-proc commented on GitHub (Apr 4, 2024):

I think he's talking about this line in the _helpers.tpl
46774aa5cd/kubernetes/helm/templates/_helpers.tpl (L10)

The deployment for open-webui points towards ollama.url in _helpers.tpl and it uses /api which doesn't work.

Edit: I offer to fix this and refactor the helm stuff a little bit tomorrow. I avoided using the chart myself because it automatically installs ollama and I want to make that optional as well.

<!-- gh-comment-id:2038212420 --> @slash-proc commented on GitHub (Apr 4, 2024): I think he's talking about this line in the _helpers.tpl https://github.com/open-webui/open-webui/blob/46774aa5cdbf4e894776978be60311210a6d0b32/kubernetes/helm/templates/_helpers.tpl#L10 The deployment for open-webui points towards ollama.url in _helpers.tpl and it uses /api which doesn't work. Edit: I offer to fix this and refactor the helm stuff a little bit tomorrow. I avoided using the chart myself because it automatically installs ollama and I want to make that optional as well.
Author
Owner

@justinh-rahb commented on GitHub (Apr 4, 2024):

I think he's talking about this line in the _helpers.tpl

46774aa5cd/kubernetes/helm/templates/_helpers.tpl (L10)

The deployment for open-webui points towards ollama.url in _helpers.tpl and it uses /api which doesn't work.

Edit: I offer to fix this and refactor the helm stuff a little bit tomorrow. I avoided using the chart myself because it automatically installs ollama and I want to make that optional as well.

I understand this, but specifically I want to know if the OLLAMA_BASE_URL being used has /api in it, which it should not. If this is the case, no modification is necessary, only using the correct variable format.

I may be incorrect, there could be a mistake in this code. I don't personally use Kubernetes and neither does Tim, so we've relied entirely on contributors for this aspect.

<!-- gh-comment-id:2038237842 --> @justinh-rahb commented on GitHub (Apr 4, 2024): > I think he's talking about this line in the _helpers.tpl > > https://github.com/open-webui/open-webui/blob/46774aa5cdbf4e894776978be60311210a6d0b32/kubernetes/helm/templates/_helpers.tpl#L10 > > The deployment for open-webui points towards ollama.url in _helpers.tpl and it uses /api which doesn't work. > > Edit: I offer to fix this and refactor the helm stuff a little bit tomorrow. I avoided using the chart myself because it automatically installs ollama and I want to make that optional as well. I understand this, but specifically I want to know if the `OLLAMA_BASE_URL` being used has `/api` in it, which it should not. If this is the case, no modification is necessary, only using the correct variable format. I may be incorrect, there could be a mistake in this code. I don't personally use Kubernetes and neither does Tim, so we've relied entirely on contributors for this aspect.
Author
Owner

@slash-proc commented on GitHub (Apr 4, 2024):

I think there's a misunderstanding. The string "/api" is present in the snippet I referenced from _helpers.tpl.

In the templates there's the deployment for open-webui which sets the environment variable to "ollama.url"
46774aa5cd/kubernetes/helm/templates/webui-deployment.yaml (L42-L44)

The variable "ollama.url" is defined in _helpers.tpl with the snippet I originally linked. That will lead to a url that looks something like this: http://ollama.open-webui.svc.cluster.local:80/api

Edit: Like I said, I offer to fix it tomorrow :)

<!-- gh-comment-id:2038288485 --> @slash-proc commented on GitHub (Apr 4, 2024): I think there's a misunderstanding. The string "/api" is present in the snippet I referenced from _helpers.tpl. In the templates there's the deployment for open-webui which sets the environment variable to "ollama.url" https://github.com/open-webui/open-webui/blob/46774aa5cdbf4e894776978be60311210a6d0b32/kubernetes/helm/templates/webui-deployment.yaml#L42-L44 The variable "ollama.url" is defined in _helpers.tpl with the snippet I originally linked. That will lead to a url that looks something like this: `http://ollama.open-webui.svc.cluster.local:80/api` Edit: Like I said, I offer to fix it tomorrow :)
Author
Owner

@slash-proc commented on GitHub (Apr 4, 2024):

Quick fix for this specific issue: https://github.com/open-webui/open-webui/pull/1423

<!-- gh-comment-id:2038316205 --> @slash-proc commented on GitHub (Apr 4, 2024): Quick fix for this specific issue: https://github.com/open-webui/open-webui/pull/1423
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#132216