[GH-ISSUE #13722] issue: Open WebUI pipeline valves setting by webui not synchonized to pipeline plugin #32537

Closed
opened 2026-04-25 06:28:11 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @wangjiyang on GitHub (May 9, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/13722

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

0.6.5

Ollama Version (if applicable)

No response

Operating System

Ubuntu 22.04

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have listed steps to reproduce the bug in detail.

Expected Behavior

when user setting valves config value via webui interface "manage pipelines" tab, all these settings will sync to pipeline python code and can be accessed via envionment variable. However, it seems envioronment variable not updated and pipeline plugin can't use it.

Actual Behavior

when user setting valves config value via webui interface "manage pipelines" tab, all these settings will sync to pipeline python code and can be accessed via envionment variable. However, it seems envioronment variable not updated and pipeline plugin can't use it.

Steps to Reproduce

Image

set these values.

  1. check pipelines log:
Loaded module: code_summary_plugin
My environ is environ({'PYTHON_SHA256': '2a9920c7a0cd236de33644ed980a13cbbc21058bfdc528febb6081575ed73be3', 'no_proxy': '*', 'HOSTNAME': 'be8638bd0847', 'PYTHON_VERSION': '3.11.11', 'PIPELINES_REQUIREMENTS_PATH': '', 'MINIMUM_BUILD': '', 'ENV': 'prod', 'PWD': '/app', 'PORT': '9099', 'HOME': '/root', 'LANG': 'C.UTF-8', 'USE_CUDA_DOCKER': '', 'GPG_KEY': 'A035C8C19219BA821ECEA86B64E628F8D684696D', 'https_proxy': '', 'USE_CUDA_DOCKER_VER': '', 'HOST': '0.0.0.0', 'PIPELINES_URLS': '', 'NO_PROXY': '*', 'SHLVL': '1', 'HTTPS_PROXY': '', 'HTTP_PROXY': '', 'http_proxy': '', 'SSL_CERT_FILE': '/etc/ssl/certs/ca-certificates.crt', 'REQUESTS_CA_BUNDLE': '/etc/ssl/certs/ca-certificates.crt', 'PATH': '/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'GLOBAL_LOG_LEVEL': 'DEBUG', '_': '/usr/local/bin/uvicorn'})
base url is  https://MY_HOST/deepseek_r1_671b/v1
code summary base url is  http://MY_IP_ADDR:8001/v1
base url from os.getenv is xxx
code summary base url from os.getenv is xxx
Initializing Session File Manager (In-Memory SQLite)...
Loaded module: file_extraction_plugin
Loaded module: andes_deepseek_pipeline
#####Starting up the pipeline#####
certifi: /usr/local/lib/python3.11/site-packages/certifi/cacert.pem
#####Starting up the pipeline#####

Logs & Screenshots

class Pipeline:
    class Valves(BaseModel):
        BASE_URL: str = ""
        CODE_SUMMARY_BASE_URL: str = ""
        CODE_SUMMARY_API_KEY: str = ""
        API_KEY: str = ""


    def __init__(self):
        self.documents = None
        self.index = None
        self.valves = self.Valves(
            **{
                "BASE_URL": os.getenv("BASE_URL", "https://MY_HOST/deepseek_r1_671b/v1"),
                "CODE_SUMMARY_BASE_URL": os.getenv("CODE_SUMMARY_BASE_URL", "http://MY_IP_ADDR:8001/v1"),
                "CODE_SUMMARY_API_KEY": os.getenv("CODE_SUMMARY_API_KEY", "test-key"),
                "API_KEY": os.getenv("API_KEY", "sk-1234567890"),
            }
        )

        # print all environ
        print(f"My environ is {os.environ}")

        print("base url is ", self.valves.BASE_URL)
        print("code summary base url is ", self.valves.CODE_SUMMARY_BASE_URL)

        # base url from os.getenv
        print(f"base url from os.getenv is {os.getenv('BASE_URL', 'xxx')}")
        print(f"code summary base url from os.getenv is {os.getenv('CODE_SUMMARY_BASE_URL', 'xxx')}")

        self.client = OpenAI(base_url=self.valves.BASE_URL, api_key=self.valves.API_KEY)
        self.code_summary_client = OpenAI(base_url=self.valves.CODE_SUMMARY_BASE_URL, api_key=self.valves.CODE_SUMMARY_API_KEY)
        self.counter = 0
        self.inlet_body = None

        print("Initializing Session File Manager (In-Memory SQLite)...")
        self.file_manager = SessionFileManager()

Additional Information

No response

Originally created by @wangjiyang on GitHub (May 9, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/13722 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version 0.6.5 ### Ollama Version (if applicable) _No response_ ### Operating System Ubuntu 22.04 ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have listed steps to reproduce the bug in detail. ### Expected Behavior when user setting valves config value via webui interface "manage pipelines" tab, all these settings will sync to pipeline python code and can be accessed via envionment variable. However, it seems envioronment variable not updated and pipeline plugin can't use it. ### Actual Behavior when user setting valves config value via webui interface "manage pipelines" tab, all these settings will sync to pipeline python code and can be accessed via envionment variable. However, it seems envioronment variable not updated and pipeline plugin can't use it. ### Steps to Reproduce 1. ![Image](https://github.com/user-attachments/assets/0ef1aa4b-5ee6-42b9-97c9-133e0bff5f61) set these values. 2. check pipelines log: ``` Loaded module: code_summary_plugin My environ is environ({'PYTHON_SHA256': '2a9920c7a0cd236de33644ed980a13cbbc21058bfdc528febb6081575ed73be3', 'no_proxy': '*', 'HOSTNAME': 'be8638bd0847', 'PYTHON_VERSION': '3.11.11', 'PIPELINES_REQUIREMENTS_PATH': '', 'MINIMUM_BUILD': '', 'ENV': 'prod', 'PWD': '/app', 'PORT': '9099', 'HOME': '/root', 'LANG': 'C.UTF-8', 'USE_CUDA_DOCKER': '', 'GPG_KEY': 'A035C8C19219BA821ECEA86B64E628F8D684696D', 'https_proxy': '', 'USE_CUDA_DOCKER_VER': '', 'HOST': '0.0.0.0', 'PIPELINES_URLS': '', 'NO_PROXY': '*', 'SHLVL': '1', 'HTTPS_PROXY': '', 'HTTP_PROXY': '', 'http_proxy': '', 'SSL_CERT_FILE': '/etc/ssl/certs/ca-certificates.crt', 'REQUESTS_CA_BUNDLE': '/etc/ssl/certs/ca-certificates.crt', 'PATH': '/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'GLOBAL_LOG_LEVEL': 'DEBUG', '_': '/usr/local/bin/uvicorn'}) base url is https://MY_HOST/deepseek_r1_671b/v1 code summary base url is http://MY_IP_ADDR:8001/v1 base url from os.getenv is xxx code summary base url from os.getenv is xxx Initializing Session File Manager (In-Memory SQLite)... Loaded module: file_extraction_plugin Loaded module: andes_deepseek_pipeline #####Starting up the pipeline##### certifi: /usr/local/lib/python3.11/site-packages/certifi/cacert.pem #####Starting up the pipeline##### ``` ### Logs & Screenshots ``` class Pipeline: class Valves(BaseModel): BASE_URL: str = "" CODE_SUMMARY_BASE_URL: str = "" CODE_SUMMARY_API_KEY: str = "" API_KEY: str = "" def __init__(self): self.documents = None self.index = None self.valves = self.Valves( **{ "BASE_URL": os.getenv("BASE_URL", "https://MY_HOST/deepseek_r1_671b/v1"), "CODE_SUMMARY_BASE_URL": os.getenv("CODE_SUMMARY_BASE_URL", "http://MY_IP_ADDR:8001/v1"), "CODE_SUMMARY_API_KEY": os.getenv("CODE_SUMMARY_API_KEY", "test-key"), "API_KEY": os.getenv("API_KEY", "sk-1234567890"), } ) # print all environ print(f"My environ is {os.environ}") print("base url is ", self.valves.BASE_URL) print("code summary base url is ", self.valves.CODE_SUMMARY_BASE_URL) # base url from os.getenv print(f"base url from os.getenv is {os.getenv('BASE_URL', 'xxx')}") print(f"code summary base url from os.getenv is {os.getenv('CODE_SUMMARY_BASE_URL', 'xxx')}") self.client = OpenAI(base_url=self.valves.BASE_URL, api_key=self.valves.API_KEY) self.code_summary_client = OpenAI(base_url=self.valves.CODE_SUMMARY_BASE_URL, api_key=self.valves.CODE_SUMMARY_API_KEY) self.counter = 0 self.inlet_body = None print("Initializing Session File Manager (In-Memory SQLite)...") self.file_manager = SessionFileManager() ``` ### Additional Information _No response_
GiteaMirror added the bug label 2026-04-25 06:28:11 -05:00
Author
Owner

@wangjiyang commented on GitHub (May 9, 2025):

oh, i know. Plugin code should override on_valves_updated, and self.valves.KEY is updated by framework.

<!-- gh-comment-id:2865434010 --> @wangjiyang commented on GitHub (May 9, 2025): oh, i know. Plugin code should override on_valves_updated, and self.valves.KEY is updated by framework.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#32537