[PR #15178] [CLOSED] Feat/add docker model runner support #62602

Closed
opened 2026-05-06 06:49:32 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/15178
Author: @rw4lll
Created: 6/20/2025
Status: Closed

Base: devHead: feat/add-docker-model-runner-support


📝 Commits (7)

  • dd33818 Add Docker Model Runner backend
  • 17c677a adding Docker Model Runner backend
  • d1534f0 Simplify DMR_BASE_URL logic
  • 4ae2fda rollback redundant change
  • b1be5b6 Adjust DMR_BASE_URL
  • 0f70e87 fixes and improvements
  • f5b1ae4 Support DMR in the admin area

📊 Changes

16 files changed (+1659 additions, -7 deletions)

View changed files

📝 .env.example (+3 -0)
📝 README.md (+19 -1)
📝 backend/open_webui/config.py (+23 -0)
📝 backend/open_webui/env.py (+1 -0)
📝 backend/open_webui/main.py (+18 -0)
backend/open_webui/routers/docker_model_runner.py (+748 -0)
📝 backend/open_webui/utils/chat.py (+11 -0)
📝 backend/open_webui/utils/models.py (+14 -4)
📝 docker-compose.yaml (+2 -0)
src/lib/apis/dmr/index.ts (+455 -0)
📝 src/lib/components/AddConnectionModal.svelte (+21 -1)
📝 src/lib/components/admin/Settings/Connections.svelte (+97 -1)
src/lib/components/admin/Settings/Connections/DMRConnection.svelte (+86 -0)
src/lib/components/admin/Settings/Connections/ManageDMRModal.svelte (+45 -0)
src/lib/components/admin/Settings/Models/Manage/ManageDMR.svelte (+115 -0)
📝 src/lib/constants.ts (+1 -0)

📄 Description

Changelog Entry

Description

Added Docker Model Runner (DMR) integration to Open WebUI, enabling local AI model hosting through Docker backend with full chat completion, text generation, and model management capabilities. This implementation follows established patterns from Ollama and OpenAI providers while maintaining DMR-specific characteristics for single-server, local-only operation.

Added

  • Backend DMR Router (backend/open_webui/routers/docker_model_runner.py) to implement DMR-specific endpoints

  • DMR Configuration Integration (backend/open_webui/config.py): Added persistent configuration for DMR settings

    • ENABLE_DMR_API: Toggle DMR functionality
    • DMR_BASE_URL: DMR server URL configuration
    • DMR_API_CONFIGS: DMR API configuration storage
  • Model Integration (backend/open_webui/utils/models.py): Integrated DMR models into the global model loading system

  • Chat Integration (backend/open_webui/utils/chat.py): Added DMR chat completion routing

  • Frontend DMR API Module (src/lib/apis/dmr/index.ts)

  • Frontend UI Components:

    • DMRConnection.svelte: Connection management component
    • ManageDMRModal.svelte: Modal wrapper for DMR management
    • ManageDMR.svelte: DMR model browser (read-only)
  • Admin Settings Integration (src/lib/components/admin/Settings/Connections.svelte): Added DMR configuration section

  • Constants Integration (src/lib/constants.ts): Added DMR_API_BASE_URL constant

  • Logging Integration (backend/open_webui/env.py): Added "DMR" to log sources for proper logging configuration

Changed

  • Router Integration (backend/open_webui/main.py): Added DMR router inclusion with /dmr prefix

  • Model Loading System: Include DMR models alongside OpenAI and Ollama models

  • Chat Completion System: Extended to route DMR model requests to appropriate backend

  • Admin Settings UI: Enhanced connections panel to include DMR configuration management

  • Error Handling: Implemented consistent "DMR:" prefix for all DMR-related error messages

Deprecated

None

Removed

None

Fixed

None

Security

None

Breaking Changes

None: This is a new feature addition that doesn't break existing 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

  • image
  • image
  • image

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.


🔄 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/15178 **Author:** [@rw4lll](https://github.com/rw4lll) **Created:** 6/20/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `feat/add-docker-model-runner-support` --- ### 📝 Commits (7) - [`dd33818`](https://github.com/open-webui/open-webui/commit/dd3381884d1fcbc5dfa7f03684986b0f546f4dc0) Add Docker Model Runner backend - [`17c677a`](https://github.com/open-webui/open-webui/commit/17c677a285a3fca0329a239ba40b326803ca2551) adding Docker Model Runner backend - [`d1534f0`](https://github.com/open-webui/open-webui/commit/d1534f0626e8999cce6947b8c47af64a69d3e907) Simplify DMR_BASE_URL logic - [`4ae2fda`](https://github.com/open-webui/open-webui/commit/4ae2fda06d9f380d9eef678ed84a34b13706296e) rollback redundant change - [`b1be5b6`](https://github.com/open-webui/open-webui/commit/b1be5b6b898eca5163a6b3cf339212b4c8cba027) Adjust DMR_BASE_URL - [`0f70e87`](https://github.com/open-webui/open-webui/commit/0f70e8741655d7c9c06e1d3adda3a065d896409c) fixes and improvements - [`f5b1ae4`](https://github.com/open-webui/open-webui/commit/f5b1ae424c3fd933591057cab941ee1bccea6ee5) Support DMR in the admin area ### 📊 Changes **16 files changed** (+1659 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+3 -0) 📝 `README.md` (+19 -1) 📝 `backend/open_webui/config.py` (+23 -0) 📝 `backend/open_webui/env.py` (+1 -0) 📝 `backend/open_webui/main.py` (+18 -0) ➕ `backend/open_webui/routers/docker_model_runner.py` (+748 -0) 📝 `backend/open_webui/utils/chat.py` (+11 -0) 📝 `backend/open_webui/utils/models.py` (+14 -4) 📝 `docker-compose.yaml` (+2 -0) ➕ `src/lib/apis/dmr/index.ts` (+455 -0) 📝 `src/lib/components/AddConnectionModal.svelte` (+21 -1) 📝 `src/lib/components/admin/Settings/Connections.svelte` (+97 -1) ➕ `src/lib/components/admin/Settings/Connections/DMRConnection.svelte` (+86 -0) ➕ `src/lib/components/admin/Settings/Connections/ManageDMRModal.svelte` (+45 -0) ➕ `src/lib/components/admin/Settings/Models/Manage/ManageDMR.svelte` (+115 -0) 📝 `src/lib/constants.ts` (+1 -0) </details> ### 📄 Description # Changelog Entry ### Description Added Docker Model Runner (DMR) integration to Open WebUI, enabling local AI model hosting through Docker backend with full chat completion, text generation, and model management capabilities. This implementation follows established patterns from Ollama and OpenAI providers while maintaining DMR-specific characteristics for single-server, local-only operation. ### Added - **Backend DMR Router** (`backend/open_webui/routers/docker_model_runner.py`) to implement DMR-specific endpoints - **DMR Configuration Integration** (`backend/open_webui/config.py`): Added persistent configuration for DMR settings - `ENABLE_DMR_API`: Toggle DMR functionality - `DMR_BASE_URL`: DMR server URL configuration - `DMR_API_CONFIGS`: DMR API configuration storage - **Model Integration** (`backend/open_webui/utils/models.py`): Integrated DMR models into the global model loading system - **Chat Integration** (`backend/open_webui/utils/chat.py`): Added DMR chat completion routing - **Frontend DMR API Module** (`src/lib/apis/dmr/index.ts`) - **Frontend UI Components:** - `DMRConnection.svelte`: Connection management component - `ManageDMRModal.svelte`: Modal wrapper for DMR management - `ManageDMR.svelte`: DMR model browser (read-only) - **Admin Settings Integration** (`src/lib/components/admin/Settings/Connections.svelte`): Added DMR configuration section - **Constants Integration** (`src/lib/constants.ts`): Added `DMR_API_BASE_URL` constant - **Logging Integration** (`backend/open_webui/env.py`): Added `"DMR"` to log sources for proper logging configuration ### Changed - **Router Integration** (`backend/open_webui/main.py`): Added DMR router inclusion with `/dmr` prefix - **Model Loading System**: Include DMR models alongside OpenAI and Ollama models - **Chat Completion System**: Extended to route DMR model requests to appropriate backend - **Admin Settings UI**: Enhanced connections panel to include DMR configuration management - **Error Handling**: Implemented consistent `"DMR:"` prefix for all DMR-related error messages ### Deprecated None ### Removed None ### Fixed None ### Security None ### Breaking Changes None: This is a new feature addition that doesn't break existing 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 - <img width="1192" alt="image" src="https://github.com/user-attachments/assets/d41c3d42-f02e-48de-8906-6cccd290cff1" /> - <img width="899" alt="image" src="https://github.com/user-attachments/assets/8e496dfc-df23-45eb-9e9e-1ac805495f5d" /> - <img width="1239" alt="image" src="https://github.com/user-attachments/assets/d91466cf-6c71-4692-9622-63b16b2a1fcd" /> ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <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-06 06:49:32 -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#62602