[GH-ISSUE #80] Discussion: Best way to handle OPENAI_API_BASE_URLS / OPENAI_API_BASE_URL #31

Closed
opened 2026-10-18 21:04:51 +00:00 by bsakaguchi · 4 comments
Owner

Originally created by @davizucon on GitHub (Sep 18, 2024).
Original GitHub issue: https://github.com/open-webui/helm-charts/issues/80

Hello Guys,

I am working with this helm chart to deploy open-webui.
AFAIK, We can add many connections in Admin settings. Those connections could be any openai API compatible, litellm proxy or pipelines.

Said that we have OPENAI_API_BASE_URLS (add many) and OPENAI_API_BASE_URL that add one connection.
In my environment we not using openai directly, but thru some proxy like litellm and also we have pipelines. I think the way to go will setup OPENAI_API_BASE_URLS and OPENAI_API_KEYS accordingly.

In helm chart template it always set some value in variable OPENAI_API_BASE_URL (given the if/else structure here

POV: We should handle multiple ways we set/use those variables in chart for several cases, I think the way is set today, it target simple cases, that's is great and we should keep it, but in more customized/complex cases looks like mixing stuff, cuz I need to set openaiBaseApiUrl ? and/or set OPENAI_API_BASE_URLS for others pipelines deployments?

Any thoughts/direction for this ?

Thanks !

Originally created by @davizucon on GitHub (Sep 18, 2024). Original GitHub issue: https://github.com/open-webui/helm-charts/issues/80 Hello Guys, I am working with this helm chart to deploy open-webui. AFAIK, We can add many connections in Admin settings. Those connections could be any openai API compatible, litellm proxy or pipelines. Said that we have OPENAI_API_BASE_URLS (add many) and OPENAI_API_BASE_URL that add one connection. In my environment we not using openai directly, but thru some proxy like litellm and also we have pipelines. I think the way to go will setup OPENAI_API_BASE_URLS and OPENAI_API_KEYS accordingly. In helm chart template it always set some value in variable OPENAI_API_BASE_URL (given the if/else structure [here](https://github.com/open-webui/helm-charts/blob/main/charts/open-webui/templates/workload-manager.yaml#L78) POV: We should handle multiple ways we set/use those variables in chart for several cases, I think the way is set today, it target simple cases, that's is great and we should keep it, but in more customized/complex cases looks like mixing stuff, cuz I need to set openaiBaseApiUrl ? and/or set OPENAI_API_BASE_URLS for others pipelines deployments? Any thoughts/direction for this ? Thanks !
Author
Owner

@james-westbrook commented on GitHub (Sep 27, 2024):

Hey @davizucon, apologies for the delay on this one. Is it possible your OpenAI key value is getting set because you're using the default values in values.yaml? https://github.com/open-webui/helm-charts/blob/main/charts/open-webui/values.yaml#L98

As for how to set the variables, I believe you would want to use extraEnvVars and set your variables there, and those should make their way to the Open WebUI pod. Let me know if I'm still missing something here, happy to dig further into it with you.

<!-- gh-comment-id:2378331823 --> @james-westbrook commented on GitHub (Sep 27, 2024): Hey @davizucon, apologies for the delay on this one. Is it possible your OpenAI key value is getting set because you're using the default values in `values.yaml`? https://github.com/open-webui/helm-charts/blob/main/charts/open-webui/values.yaml#L98 As for how to set the variables, I believe you would want to use `extraEnvVars` and set your variables there, and those should make their way to the Open WebUI pod. Let me know if I'm still missing something here, happy to dig further into it with you.
Author
Owner

@james-westbrook commented on GitHub (Sep 27, 2024):

I'm working on a different issue and see what you mean by the if/else structure now: https://github.com/open-webui/helm-charts/blob/main/charts/open-webui/templates/workload-manager.yaml#L83-L91

I'm updating this as part of https://github.com/open-webui/helm-charts/issues/22. I'll remove the else statement that sets an OPENAI_API_BASE_URL value by default.

<!-- gh-comment-id:2378393545 --> @james-westbrook commented on GitHub (Sep 27, 2024): I'm working on a different issue and see what you mean by the if/else structure now: https://github.com/open-webui/helm-charts/blob/main/charts/open-webui/templates/workload-manager.yaml#L83-L91 I'm updating this as part of https://github.com/open-webui/helm-charts/issues/22. I'll remove the `else` statement that sets an `OPENAI_API_BASE_URL` value by default.
Author
Owner

@james-westbrook commented on GitHub (Sep 27, 2024):

@davizucon please try chart v3.2.0 and let me know if this works better for your use case. Thanks!

<!-- gh-comment-id:2378396260 --> @james-westbrook commented on GitHub (Sep 27, 2024): @davizucon please try chart v3.2.0 and let me know if this works better for your use case. Thanks!
Author
Owner

@davizucon commented on GitHub (Oct 1, 2024):

LGTM ! Thanks @0xThresh !

<!-- gh-comment-id:2384622055 --> @davizucon commented on GitHub (Oct 1, 2024): LGTM ! Thanks @0xThresh !
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/helm-charts#31
No description provided.