[GH-ISSUE #169] OpenAI API keys should be addressed with templates #66

Closed
opened 2026-10-18 21:05:27 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @james-westbrook on GitHub (Feb 14, 2025).
Original GitHub issue: https://github.com/open-webui/helm-charts/issues/169

Currently, the only way to set OPENAI_API_KEY or OPENAI_API_KEYS variables is through the extraEnvVars value on the chart. While this works, it would be better to have dedicated values for those environement variables, similar to what's in place for the OPENAI_API_BASE_URL and OPENAI_API_BASE_URLS variables.

Without setting these in the templates, a handful of issues can occur:

  1. There is no obvious way to match up API key/ API endpoint pairs. Instead, you have to match up the API URL and key as the same index in their respective lists.
  2. While the URL variables will set the value, users will have issues making use of those endpoints until keys are set manually through extraEnvVars or in the Admin Settings after starting Open WebUI.
Originally created by @james-westbrook on GitHub (Feb 14, 2025). Original GitHub issue: https://github.com/open-webui/helm-charts/issues/169 Currently, the only way to set `OPENAI_API_KEY` or `OPENAI_API_KEYS` variables is through the `extraEnvVars` value on the chart. While this works, it would be better to have dedicated values for those environement variables, similar to what's in place for the `OPENAI_API_BASE_URL` and `OPENAI_API_BASE_URLS` variables. Without setting these in the templates, a handful of issues can occur: 1. There is no obvious way to match up API key/ API endpoint pairs. Instead, you have to match up the API URL and key as the same index in their respective lists. 2. While the URL variables will set the value, users will have issues making use of those endpoints until keys are set manually through `extraEnvVars` or in the Admin Settings after starting Open WebUI.
bsakaguchi 2026-10-18 21:05:27 +00:00
Author
Owner

@habetuz commented on GitHub (Feb 17, 2026):

@westbrook-ai

This seems to be resolved with the addition of openaiApiKey and openaiApiKeys, however this leads to new problems, as it prevents the usage of a secret for these values.

openaiApiKey should receive either an object or a string. In case of a string, it is used directly. The object should contain secretKeyRefName and secretKeyRefKey or similar allowing the specification of a secret for the openai key.

openaiApiKeys should receive a list of strings or objects respectively.

<!-- gh-comment-id:3913685508 --> @habetuz commented on GitHub (Feb 17, 2026): @westbrook-ai This seems to be resolved with the addition of `openaiApiKey` and `openaiApiKeys`, however this leads to new problems, as it prevents the usage of a secret for these values. `openaiApiKey` should receive either an object or a string. In case of a string, it is used directly. The object should contain `secretKeyRefName` and `secretKeyRefKey` or similar allowing the specification of a secret for the openai key. `openaiApiKeys` should receive a list of strings or objects respectively.
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#66
No description provided.