[PR #207] [MERGED] feat: add script for scanning for missing env vars in docs #309

Closed
opened 2026-02-15 17:16:18 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/docs/pull/207
Author: @cheahjs
Created: 9/7/2024
Status: Merged
Merged: 9/24/2024
Merged by: @tjbck

Base: mainHead: feat/env-var-checker


📝 Commits (1)

  • cc3ce6b feat: add script for scanning for missing env vars in docs

📊 Changes

1 file changed (+114 additions, -0 deletions)

View changed files

scripts/scan-missing-env-vars.py (+114 -0)

📄 Description

Walks the AST for the backend code for calls to os.environ/os.getenv, and compares it with what is currently documented.

Run with python3 scripts/scan-missing-env-vars.py <git_ref>, for example python3 scripts/scan-missing-env-vars.py v0.3.20

Example output:

$ scripts/scan-missing-env-vars.py v0.3.20
Scanning git ref: v0.3.20

Environment variables accessed but not documented:
AUDIO_TTS_API_KEY
AUDIO_TTS_SPLIT_ON
AUTOMATIC1111_API_AUTH
COMFYUI_WORKFLOW
CONTENT_EXTRACTION_ENGINE
CORS_ALLOW_ORIGIN
DEFAULT_LOCALE
ENABLE_ADMIN_CHAT_ACCESS
ENABLE_MESSAGE_RATING
ENABLE_SEARCH_QUERY
FONTS_DIR
FROM_INIT_PY
FUNCTIONS_DIR
GLOBAL_LOG_LEVEL
RAG_FILE_MAX_COUNT
RAG_FILE_MAX_SIZE
SEARCHAPI_API_KEY
SEARCHAPI_ENGINE
TIKA_SERVER_URL
TOOLS_DIR
USER_PERMISSIONS_CHAT_EDITING
USER_PERMISSIONS_CHAT_TEMPORARY
WEBUI_JWT_SECRET_KEY

Environment variables documented but not accessed:
ENABLE_LITELLM
LITELLM_PROXY_HOST
LITELLM_PROXY_PORT
RAG_WEB_SEARCH_DOMAIN_FILTER_LIST
SEARCH_QUERY_PROMPT_LENGTH_THRESHOLD

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/docs/pull/207 **Author:** [@cheahjs](https://github.com/cheahjs) **Created:** 9/7/2024 **Status:** ✅ Merged **Merged:** 9/24/2024 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `main` ← **Head:** `feat/env-var-checker` --- ### 📝 Commits (1) - [`cc3ce6b`](https://github.com/open-webui/docs/commit/cc3ce6b69686c46d6551e95e73d9771eca0b7d96) feat: add script for scanning for missing env vars in docs ### 📊 Changes **1 file changed** (+114 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `scripts/scan-missing-env-vars.py` (+114 -0) </details> ### 📄 Description Walks the AST for the backend code for calls to `os.environ`/`os.getenv`, and compares it with what is currently documented. Run with `python3 scripts/scan-missing-env-vars.py <git_ref>`, for example `python3 scripts/scan-missing-env-vars.py v0.3.20` Example output: ``` $ scripts/scan-missing-env-vars.py v0.3.20 Scanning git ref: v0.3.20 Environment variables accessed but not documented: AUDIO_TTS_API_KEY AUDIO_TTS_SPLIT_ON AUTOMATIC1111_API_AUTH COMFYUI_WORKFLOW CONTENT_EXTRACTION_ENGINE CORS_ALLOW_ORIGIN DEFAULT_LOCALE ENABLE_ADMIN_CHAT_ACCESS ENABLE_MESSAGE_RATING ENABLE_SEARCH_QUERY FONTS_DIR FROM_INIT_PY FUNCTIONS_DIR GLOBAL_LOG_LEVEL RAG_FILE_MAX_COUNT RAG_FILE_MAX_SIZE SEARCHAPI_API_KEY SEARCHAPI_ENGINE TIKA_SERVER_URL TOOLS_DIR USER_PERMISSIONS_CHAT_EDITING USER_PERMISSIONS_CHAT_TEMPORARY WEBUI_JWT_SECRET_KEY Environment variables documented but not accessed: ENABLE_LITELLM LITELLM_PROXY_HOST LITELLM_PROXY_PORT RAG_WEB_SEARCH_DOMAIN_FILTER_LIST SEARCH_QUERY_PROMPT_LENGTH_THRESHOLD ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 17:16:18 -05:00
yindo closed this issue 2026-02-15 17:16:18 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: open-webui/docs#309