[PR #2505] [MERGED] feat: openai api compatible model presets (profiles/modelfiles) #7817

Closed
opened 2025-11-11 17:36:47 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/2505
Author: @tjbck
Created: 5/23/2024
Status: Merged
Merged: 5/25/2024
Merged by: @tjbck

Base: devHead: dev-models


📝 Commits (10+)

  • e76a444 feat: allow model config via config.json
  • e69f312 fix: remove unused API for setting model config
  • 584385e fix: revert wip code for settings UI
  • 9bc628c fix: file input not working after rejecting images
  • 8effff6 feat: update translation files
  • 0dbddeb feat: add API endpoint for updating configs
  • 02a4412 feat: add UI support for updating model info
  • fa6e21f fix: update models after deleting model info
  • 0f50c12 fix: formatting
  • 0665703 Merge branch 'dev' into feat/model-config

📊 Changes

88 files changed (+3380 additions, -2503 deletions)

View changed files

📝 backend/apps/litellm/main.py (+11 -2)
📝 backend/apps/ollama/main.py (+150 -26)
📝 backend/apps/openai/main.py (+89 -30)
📝 backend/apps/web/internal/db.py (+12 -0)
backend/apps/web/internal/migrations/009_add_models.py (+61 -0)
backend/apps/web/internal/migrations/010_migrate_modelfiles_to_models.py (+130 -0)
📝 backend/apps/web/main.py (+5 -3)
📝 backend/apps/web/models/modelfiles.py (+8 -0)
backend/apps/web/models/models.py (+179 -0)
backend/apps/web/routers/modelfiles.py (+0 -124)
backend/apps/web/routers/models.py (+108 -0)
📝 backend/constants.py (+2 -0)
📝 backend/main.py (+104 -6)
📝 backend/utils/misc.py (+74 -0)
backend/utils/models.py (+10 -0)
📝 src/lib/apis/index.ts (+123 -0)
📝 src/lib/apis/litellm/index.ts (+2 -1)
📝 src/lib/apis/models/index.ts (+17 -32)
📝 src/lib/apis/openai/index.ts (+6 -1)
📝 src/lib/components/chat/Chat.svelte (+104 -106)

...and 68 more files

📄 Description

#2140

Resolves #665 #187

TODO

  • Deprecate and migrate modelfiles to models
  • Decouple modelfiles from Ollama
  • Save model preset to webui db directly
  • (optional) unify model list endpoint to /models
  • add preset logic to chat endpoints
  • update import models logic
  • params stop

🔄 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/2505 **Author:** [@tjbck](https://github.com/tjbck) **Created:** 5/23/2024 **Status:** ✅ Merged **Merged:** 5/25/2024 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `dev-models` --- ### 📝 Commits (10+) - [`e76a444`](https://github.com/open-webui/open-webui/commit/e76a444ed9a4f50182f3e580311957ad00a6ff0d) feat: allow model config via config.json - [`e69f312`](https://github.com/open-webui/open-webui/commit/e69f31267af02ae4e83298481f599ab35dc57703) fix: remove unused API for setting model config - [`584385e`](https://github.com/open-webui/open-webui/commit/584385e4bf51b328c10a783c09330bc6926dc273) fix: revert wip code for settings UI - [`9bc628c`](https://github.com/open-webui/open-webui/commit/9bc628ca751d016e7cbf5ceffd57ce3cb0e14125) fix: file input not working after rejecting images - [`8effff6`](https://github.com/open-webui/open-webui/commit/8effff65248af4396bfcaae2709b48b3f5691fc5) feat: update translation files - [`0dbddeb`](https://github.com/open-webui/open-webui/commit/0dbddebcb0f3454fe2e958cd4ed953fa8626d4c3) feat: add API endpoint for updating configs - [`02a4412`](https://github.com/open-webui/open-webui/commit/02a4412dfc077a82ce59e82a3444d6087f4aa790) feat: add UI support for updating model info - [`fa6e21f`](https://github.com/open-webui/open-webui/commit/fa6e21f5e0f9843ea8fbf9022dbf9c8060a7f0bb) fix: update models after deleting model info - [`0f50c12`](https://github.com/open-webui/open-webui/commit/0f50c12c59685b2d92524da0858dc8ba433969c7) fix: formatting - [`0665703`](https://github.com/open-webui/open-webui/commit/06657034018213d785b45066f4996ec634510168) Merge branch 'dev' into feat/model-config ### 📊 Changes **88 files changed** (+3380 additions, -2503 deletions) <details> <summary>View changed files</summary> 📝 `backend/apps/litellm/main.py` (+11 -2) 📝 `backend/apps/ollama/main.py` (+150 -26) 📝 `backend/apps/openai/main.py` (+89 -30) 📝 `backend/apps/web/internal/db.py` (+12 -0) ➕ `backend/apps/web/internal/migrations/009_add_models.py` (+61 -0) ➕ `backend/apps/web/internal/migrations/010_migrate_modelfiles_to_models.py` (+130 -0) 📝 `backend/apps/web/main.py` (+5 -3) 📝 `backend/apps/web/models/modelfiles.py` (+8 -0) ➕ `backend/apps/web/models/models.py` (+179 -0) ➖ `backend/apps/web/routers/modelfiles.py` (+0 -124) ➕ `backend/apps/web/routers/models.py` (+108 -0) 📝 `backend/constants.py` (+2 -0) 📝 `backend/main.py` (+104 -6) 📝 `backend/utils/misc.py` (+74 -0) ➕ `backend/utils/models.py` (+10 -0) 📝 `src/lib/apis/index.ts` (+123 -0) 📝 `src/lib/apis/litellm/index.ts` (+2 -1) 📝 `src/lib/apis/models/index.ts` (+17 -32) 📝 `src/lib/apis/openai/index.ts` (+6 -1) 📝 `src/lib/components/chat/Chat.svelte` (+104 -106) _...and 68 more files_ </details> ### 📄 Description #2140 Resolves #665 #187 TODO - [x] Deprecate and migrate modelfiles to models - [x] Decouple modelfiles from Ollama - [x] Save model preset to webui db directly - [x] (optional) unify model list endpoint to `/models` - [x] add preset logic to chat endpoints - [x] update import models logic - [x] params stop --- <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 2025-11-11 17:36:47 -06: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#7817