[PR #8671] [CLOSED] func: add virtualenv creation and invocation for tools and functions etc, protect system python, add env var view and management UI in admin panel #125927

Closed
opened 2026-05-21 06:44:13 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/8671
Author: @taylorwilsdon
Created: 1/18/2025
Status: Closed

Base: mainHead: add_env_config


📝 Commits (10+)

  • 3321885 add option to add database schema as env var
  • 6f1065b Merge branch 'dev' of github.com:open-webui/open-webui
  • 90373a7 feat: Add new Environment settings component for image generation configuration
  • 13d64e1 feat: Add Environment tab to Settings with basic structure
  • 5a50930 fix: Remove duplicate script section in Environment.svelte
  • fb23c4c It seems like you're trying to replace a form with environment settings in HTML. The new code snippet includes a <style> tag for any additional styles you might want to add, and a <div> element with the class "settings-section" that contains an <h2> heading and an unordered list (<ul>) of environment variables.
  • 26ff371 feat: Add getEnvVariables component to fetch environment variables
  • 4544f1c feat: Add logging to getEnvVariables() function
  • 74116ae fix: Restore and correct the getEnvVariables function in env.js
  • 2534386 fix: Import onMount from Svelte in Environment.svelte

📊 Changes

138 files changed (+2950 additions, -1166 deletions)

View changed files

📝 .github/workflows/integration-test.yml (+2 -0)
📝 .gitignore (+1 -0)
📝 CHANGELOG.md (+1 -1)
📝 backend/open_webui/__init__.py (+19 -0)
📝 backend/open_webui/config.py (+164 -34)
📝 backend/open_webui/constants.py (+1 -0)
📝 backend/open_webui/env.py (+4 -0)
📝 backend/open_webui/internal/db.py (+4 -2)
📝 backend/open_webui/main.py (+9 -0)
📝 backend/open_webui/models/chats.py (+1 -1)
📝 backend/open_webui/models/groups.py (+2 -2)
📝 backend/open_webui/retrieval/utils.py (+14 -2)
📝 backend/open_webui/retrieval/vector/dbs/chroma.py (+2 -2)
📝 backend/open_webui/retrieval/vector/dbs/milvus.py (+2 -2)
📝 backend/open_webui/retrieval/vector/dbs/pgvector.py (+24 -19)
📝 backend/open_webui/routers/auths.py (+16 -4)
📝 backend/open_webui/routers/files.py (+2 -0)
📝 backend/open_webui/routers/images.py (+20 -3)
📝 backend/open_webui/routers/knowledge.py (+46 -3)
📝 backend/open_webui/routers/openai.py (+1 -0)

...and 80 more files

📄 Description

@tjbck don't merge this, it's tracking dev branch but when I push to my fork it automatically cuts these PRs and I'm just staging the stub for my own purposes - I will split the PRs out so that the individual features aren't commingled since there are a lot of implications with the python interpreter changes, might make sense as a toggle rather than exclusive but obvious security improvements will make this popular and the env var view is just useful for debugging

Pull Request Checklist

Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.

Before submitting, make sure you've checked the following:

  • Target branch: Please verify that the pull request targets the dev branch.
  • Description: Provide a concise description of the changes made in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
  • Testing: Have you written and run sufficient tests for validating the changes?
  • Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
  • Prefix: To cleary categorize this pull request, prefix the pull request title, using one of the following:
    • BREAKING CHANGE: Significant changes that may affect compatibility
    • build: Changes that affect the build system or external dependencies
    • ci: Changes to our continuous integration processes or workflows
    • chore: Refactor, cleanup, or other non-functional code changes
    • docs: Documentation update or addition
    • feat: Introduces a new feature or enhancement to the codebase
    • fix: Bug fix or error correction
    • i18n: Internationalization or localization changes
    • perf: Performance improvement
    • refactor: Code restructuring for better maintainability, readability, or scalability
    • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
    • test: Adding missing tests or correcting existing tests
    • WIP: Work in progress, a temporary label for incomplete or ongoing work

Changelog Entry

Description

  • [Concisely describe the changes made in this pull request, including any relevant motivation and impact (e.g., fixing a bug, adding a feature, or improving performance)]

Added

  • [List any new features, functionalities, or additions]

Changed

  • [List any changes, updates, refactorings, or optimizations]

Deprecated

  • [List any deprecated functionality or features that have been removed]

Removed

  • [List any removed features, files, or functionalities]

Fixed

  • [List any fixes, corrections, or bug fixes]

Security

  • [List any new or updated security-related changes, including vulnerability fixes]

Breaking Changes

  • BREAKING CHANGE: [List any breaking changes affecting compatibility or functionality]

Additional Information

  • [Insert any additional context, notes, or explanations for the changes]
    • [Reference any related issues, commits, or other relevant information]

Screenshots or Videos

  • [Attach any relevant screenshots or videos demonstrating the changes]

🔄 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/open-webui/pull/8671 **Author:** [@taylorwilsdon](https://github.com/taylorwilsdon) **Created:** 1/18/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `add_env_config` --- ### 📝 Commits (10+) - [`3321885`](https://github.com/open-webui/open-webui/commit/332188535e643585f4bba07d9de2328cd0fd5502) add option to add database schema as env var - [`6f1065b`](https://github.com/open-webui/open-webui/commit/6f1065b56aa6630f614925e1afd1bf23f26ec232) Merge branch 'dev' of github.com:open-webui/open-webui - [`90373a7`](https://github.com/open-webui/open-webui/commit/90373a7ba5e9c6be7c31de6582fd0b7f10f57a18) feat: Add new Environment settings component for image generation configuration - [`13d64e1`](https://github.com/open-webui/open-webui/commit/13d64e162589082610ccfdcef424566ce9c2804e) feat: Add Environment tab to Settings with basic structure - [`5a50930`](https://github.com/open-webui/open-webui/commit/5a5093040b67f929ac6b0623ee365e4fc25e7843) fix: Remove duplicate script section in Environment.svelte - [`fb23c4c`](https://github.com/open-webui/open-webui/commit/fb23c4cfb5f2e69e4ea9757a8f4864cbaa32ce6d) It seems like you're trying to replace a form with environment settings in HTML. The new code snippet includes a `<style>` tag for any additional styles you might want to add, and a `<div>` element with the class "settings-section" that contains an `<h2>` heading and an unordered list (`<ul>`) of environment variables. - [`26ff371`](https://github.com/open-webui/open-webui/commit/26ff371aa8be38147b80dce161e7829be4b1f941) feat: Add getEnvVariables component to fetch environment variables - [`4544f1c`](https://github.com/open-webui/open-webui/commit/4544f1c3cd0bed8b1bf189b0a24953a806b583fe) feat: Add logging to getEnvVariables() function - [`74116ae`](https://github.com/open-webui/open-webui/commit/74116ae2f9b98b9871ff6375f0893254987c86da) fix: Restore and correct the `getEnvVariables` function in `env.js` - [`2534386`](https://github.com/open-webui/open-webui/commit/25343861ad153896442360c436e4ea4beefe1951) fix: Import `onMount` from Svelte in Environment.svelte ### 📊 Changes **138 files changed** (+2950 additions, -1166 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/integration-test.yml` (+2 -0) 📝 `.gitignore` (+1 -0) 📝 `CHANGELOG.md` (+1 -1) 📝 `backend/open_webui/__init__.py` (+19 -0) 📝 `backend/open_webui/config.py` (+164 -34) 📝 `backend/open_webui/constants.py` (+1 -0) 📝 `backend/open_webui/env.py` (+4 -0) 📝 `backend/open_webui/internal/db.py` (+4 -2) 📝 `backend/open_webui/main.py` (+9 -0) 📝 `backend/open_webui/models/chats.py` (+1 -1) 📝 `backend/open_webui/models/groups.py` (+2 -2) 📝 `backend/open_webui/retrieval/utils.py` (+14 -2) 📝 `backend/open_webui/retrieval/vector/dbs/chroma.py` (+2 -2) 📝 `backend/open_webui/retrieval/vector/dbs/milvus.py` (+2 -2) 📝 `backend/open_webui/retrieval/vector/dbs/pgvector.py` (+24 -19) 📝 `backend/open_webui/routers/auths.py` (+16 -4) 📝 `backend/open_webui/routers/files.py` (+2 -0) 📝 `backend/open_webui/routers/images.py` (+20 -3) 📝 `backend/open_webui/routers/knowledge.py` (+46 -3) 📝 `backend/open_webui/routers/openai.py` (+1 -0) _...and 80 more files_ </details> ### 📄 Description @tjbck don't merge this, it's tracking dev branch but when I push to my fork it automatically cuts these PRs and I'm just staging the stub for my own purposes - I will split the PRs out so that the individual features aren't commingled since there are a lot of implications with the python interpreter changes, might make sense as a toggle rather than exclusive but obvious security improvements will make this popular and the env var view is just useful for debugging # Pull Request Checklist ### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request. **Before submitting, make sure you've checked the following:** - [ ] **Target branch:** Please verify that the pull request targets the `dev` branch. - [ ] **Description:** Provide a concise description of the changes made in this pull request. - [ ] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [ ] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources? - [ ] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? - [ ] **Testing:** Have you written and run sufficient tests for validating the changes? - [ ] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards? - [ ] **Prefix:** To cleary categorize this pull request, prefix the pull request title, using one of the following: - **BREAKING CHANGE**: Significant changes that may affect compatibility - **build**: Changes that affect the build system or external dependencies - **ci**: Changes to our continuous integration processes or workflows - **chore**: Refactor, cleanup, or other non-functional code changes - **docs**: Documentation update or addition - **feat**: Introduces a new feature or enhancement to the codebase - **fix**: Bug fix or error correction - **i18n**: Internationalization or localization changes - **perf**: Performance improvement - **refactor**: Code restructuring for better maintainability, readability, or scalability - **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.) - **test**: Adding missing tests or correcting existing tests - **WIP**: Work in progress, a temporary label for incomplete or ongoing work # Changelog Entry ### Description - [Concisely describe the changes made in this pull request, including any relevant motivation and impact (e.g., fixing a bug, adding a feature, or improving performance)] ### Added - [List any new features, functionalities, or additions] ### Changed - [List any changes, updates, refactorings, or optimizations] ### Deprecated - [List any deprecated functionality or features that have been removed] ### Removed - [List any removed features, files, or functionalities] ### Fixed - [List any fixes, corrections, or bug fixes] ### Security - [List any new or updated security-related changes, including vulnerability fixes] ### Breaking Changes - **BREAKING CHANGE**: [List any breaking changes affecting compatibility or functionality] --- ### Additional Information - [Insert any additional context, notes, or explanations for the changes] - [Reference any related issues, commits, or other relevant information] ### Screenshots or Videos - [Attach any relevant screenshots or videos demonstrating the changes] --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-21 06:44:13 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#125927