[PR #18916] [CLOSED] feat(enterprise): SaaS-first runtime + health + build fix #48072

Closed
opened 2026-04-29 23:35:35 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/18916
Author: @logan-robbins
Created: 11/4/2025
Status: Closed

Base: mainHead: feature/enterprise-mode-conditional-deps


📝 Commits (6)

  • d05095e chore(gitignore): allow .env.enterprise.example to be committed
  • 3aa5653 docs(enterprise): add Enterprise Mode plan and example env + compose profiles
  • 9fde8b3 feat(enterprise): SaaS-first runtime settings + DI providers + /system/health + split requirements and Docker enterprise build path
  • 5d03a1d feat(admin/enterprise): Enterprise settings panel shows effective SaaS engines + read-only OCR with link to Documents; add system health client
  • bf6ba0b fix(build): align Tiptap deps and stabilize pyodide prefetch for reproducible frontend build
  • c432e8c refactor(types): gate OCRService annotation with TYPE_CHECKING and postpone annotations; minor middleware/pyproject tweaks; add basic tests for enterprise settings/profile

📊 Changes

68 files changed (+8461 additions, -4448 deletions)

View changed files

.env.enterprise.example (+55 -0)
📝 .gitignore (+1 -0)
📝 Dockerfile (+65 -27)
ENTERPRISE.md (+133 -0)
📝 backend/open_webui/config.py (+47 -2)
📝 backend/open_webui/env.py (+27 -22)
📝 backend/open_webui/main.py (+81 -74)
📝 backend/open_webui/retrieval/loaders/main.py (+64 -28)
📝 backend/open_webui/retrieval/utils.py (+194 -144)
📝 backend/open_webui/retrieval/vector/factory.py (+50 -1)
📝 backend/open_webui/routers/audio.py (+227 -429)
📝 backend/open_webui/routers/memories.py (+15 -11)
📝 backend/open_webui/routers/retrieval.py (+226 -274)
backend/open_webui/routers/system.py (+81 -0)
backend/open_webui/services/__init__.py (+2 -0)
backend/open_webui/services/dependencies.py (+91 -0)
backend/open_webui/services/errors.py (+25 -0)
backend/open_webui/services/interfaces.py (+168 -0)
backend/open_webui/services/providers/__init__.py (+2 -0)
backend/open_webui/services/providers/embedding_azure_openai.py (+51 -0)

...and 48 more files

📄 Description

contributor license agreement

Summary
Introduces Enterprise Mode foundations: typed runtime settings, DI providers with lazy imports, /api/v1/system/health, and a slim enterprise Docker build path. Fixes frontend build stability (pyodide prefetch, Tiptap v3). Updates Admin > Enterprise to show “effective” engines (OCR read‑only; link to Documents settings).

Why Enterprise (from ENTERPRISE.md)

  • SaaS-first architecture to avoid bundling local ML/CV runtimes in enterprise deployments.
  • Faster startup and smaller footprint by lazy-loading only selected providers.
  • Clear dependency injection boundaries so providers are pluggable and credentials validated consistently.
  • Standardized error model (501 local provider in enterprise; 400 misconfig; 502 upstream failure).

Key changes

  • settings.py: enterprise defaults + credential checks; local_features_enabled flag
  • services/*: interfaces + registry + providers for OpenAI/Azure (Embeddings/STT/TTS), OCR (Azure DI/AWS Textract), and vector DB adapters (Chroma/pgvector/Pinecone/Qdrant)
  • routers/system.py: /api/v1/system/health returns engines + vector DB health
  • retrieval/audio/memories: resolve via DI; enterprise gating (501 for local engines)
  • Docker + requirements: split deps; enterprise build installs only the selected vector client
  • Admin Enterprise panel: effective values, read‑only OCR, link to Documents; system health client
  • Build: Tiptap v3 alignment and reproducible pyodide prefetch

How to test

  • Env:
    • ENTERPRISE_MODE=true
    • BYPASS_EMBEDDING_AND_RETRIEVAL=true (to confirm no local ML/CV)
    • OPENAI_API_KEY=
    • Optional: DOCUMENT_INTELLIGENCE_* (or AWS Textract) for OCR
  • Build/run:
    • docker compose --env-file .env.enterprise -f docker-compose.enterprise.yaml up -d --build
  • Verify:
    • GET /api/v1/system/health shows engines + vector DB status
    • Admin > Settings > Enterprise shows effective engines; OCR read‑only with link to Documents
    • Chat + audio use OpenAI; OCR returns a configuration error until creds supplied

Security/telemetry

  • Lazy imports reduce footprint; no secrets in logs. Telemetry guards for Chroma.

Closes open-webui/open-webui#18917


🔄 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/18916 **Author:** [@logan-robbins](https://github.com/logan-robbins) **Created:** 11/4/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feature/enterprise-mode-conditional-deps` --- ### 📝 Commits (6) - [`d05095e`](https://github.com/open-webui/open-webui/commit/d05095e9d387c2ccd0ebc5eb56a33bff7430ce89) chore(gitignore): allow .env.enterprise.example to be committed - [`3aa5653`](https://github.com/open-webui/open-webui/commit/3aa56532bc9f7b151be7018dea811d4d14b77d62) docs(enterprise): add Enterprise Mode plan and example env + compose profiles - [`9fde8b3`](https://github.com/open-webui/open-webui/commit/9fde8b32dd13fd2e3e68484c1b731e048be68e8a) feat(enterprise): SaaS-first runtime settings + DI providers + /system/health + split requirements and Docker enterprise build path - [`5d03a1d`](https://github.com/open-webui/open-webui/commit/5d03a1d013c751ac1a877c1db391dede71623330) feat(admin/enterprise): Enterprise settings panel shows effective SaaS engines + read-only OCR with link to Documents; add system health client - [`bf6ba0b`](https://github.com/open-webui/open-webui/commit/bf6ba0b95b536142b3aeeca05bd5094f03abd5ed) fix(build): align Tiptap deps and stabilize pyodide prefetch for reproducible frontend build - [`c432e8c`](https://github.com/open-webui/open-webui/commit/c432e8c62f04d51db3820d156144df23c8ad92a1) refactor(types): gate OCRService annotation with TYPE_CHECKING and postpone annotations; minor middleware/pyproject tweaks; add basic tests for enterprise settings/profile ### 📊 Changes **68 files changed** (+8461 additions, -4448 deletions) <details> <summary>View changed files</summary> ➕ `.env.enterprise.example` (+55 -0) 📝 `.gitignore` (+1 -0) 📝 `Dockerfile` (+65 -27) ➕ `ENTERPRISE.md` (+133 -0) 📝 `backend/open_webui/config.py` (+47 -2) 📝 `backend/open_webui/env.py` (+27 -22) 📝 `backend/open_webui/main.py` (+81 -74) 📝 `backend/open_webui/retrieval/loaders/main.py` (+64 -28) 📝 `backend/open_webui/retrieval/utils.py` (+194 -144) 📝 `backend/open_webui/retrieval/vector/factory.py` (+50 -1) 📝 `backend/open_webui/routers/audio.py` (+227 -429) 📝 `backend/open_webui/routers/memories.py` (+15 -11) 📝 `backend/open_webui/routers/retrieval.py` (+226 -274) ➕ `backend/open_webui/routers/system.py` (+81 -0) ➕ `backend/open_webui/services/__init__.py` (+2 -0) ➕ `backend/open_webui/services/dependencies.py` (+91 -0) ➕ `backend/open_webui/services/errors.py` (+25 -0) ➕ `backend/open_webui/services/interfaces.py` (+168 -0) ➕ `backend/open_webui/services/providers/__init__.py` (+2 -0) ➕ `backend/open_webui/services/providers/embedding_azure_openai.py` (+51 -0) _...and 48 more files_ </details> ### 📄 Description contributor license agreement Summary Introduces Enterprise Mode foundations: typed runtime settings, DI providers with lazy imports, /api/v1/system/health, and a slim enterprise Docker build path. Fixes frontend build stability (pyodide prefetch, Tiptap v3). Updates Admin > Enterprise to show “effective” engines (OCR read‑only; link to Documents settings). Why Enterprise (from ENTERPRISE.md) - SaaS-first architecture to avoid bundling local ML/CV runtimes in enterprise deployments. - Faster startup and smaller footprint by lazy-loading only selected providers. - Clear dependency injection boundaries so providers are pluggable and credentials validated consistently. - Standardized error model (501 local provider in enterprise; 400 misconfig; 502 upstream failure). Key changes - settings.py: enterprise defaults + credential checks; local_features_enabled flag - services/*: interfaces + registry + providers for OpenAI/Azure (Embeddings/STT/TTS), OCR (Azure DI/AWS Textract), and vector DB adapters (Chroma/pgvector/Pinecone/Qdrant) - routers/system.py: /api/v1/system/health returns engines + vector DB health - retrieval/audio/memories: resolve via DI; enterprise gating (501 for local engines) - Docker + requirements: split deps; enterprise build installs only the selected vector client - Admin Enterprise panel: effective values, read‑only OCR, link to Documents; system health client - Build: Tiptap v3 alignment and reproducible pyodide prefetch How to test - Env: - ENTERPRISE_MODE=true - BYPASS_EMBEDDING_AND_RETRIEVAL=true (to confirm no local ML/CV) - OPENAI_API_KEY=<key> - Optional: DOCUMENT_INTELLIGENCE_* (or AWS Textract) for OCR - Build/run: - docker compose --env-file .env.enterprise -f docker-compose.enterprise.yaml up -d --build - Verify: - GET /api/v1/system/health shows engines + vector DB status - Admin > Settings > Enterprise shows effective engines; OCR read‑only with link to Documents - Chat + audio use OpenAI; OCR returns a configuration error until creds supplied Security/telemetry - Lazy imports reduce footprint; no secrets in logs. Telemetry guards for Chroma. Closes open-webui/open-webui#18917 --- <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-04-29 23:35:35 -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#48072