open-webui/backend/open_webui/routers
silentoplayz fe28097817 feat: refactor model import to a single backend endpoint
This refactors the model import functionality to improve performance and user experience by centralizing the logic on the backend.

Previously, the frontend would parse an imported JSON file and send an individual API request for each model, which was slow and inefficient.

This change introduces a new backend endpoint, `/api/v1/models/import`, that accepts a list of model objects. The frontend now reads the selected JSON file, parses it, and sends the entire payload to the backend in a single request. The backend then processes this list, creating or updating models as necessary.

This commit also includes the following fixes:
- Handles cases where the imported JSON contains models without `meta` or `params` fields by providing default empty values.
2025-09-28 18:49:42 -04:00
..
audio.py refac/fix: WHISPER_LANGUAGE 2025-09-17 10:46:11 -05:00
auths.py refac 2025-09-08 18:17:11 +04:00
channels.py refac 2025-09-28 12:00:19 -05:00
chats.py feat: add backend handling for unarchiving all chats 2025-09-28 13:25:34 -04:00
configs.py refac 2025-09-26 14:40:30 -05:00
evaluations.py ci fix 2025-07-21 22:17:08 +03:00
files.py refac 2025-09-17 11:28:04 -05:00
folders.py refac/enh: folder optimization 2025-09-26 20:48:17 -05:00
functions.py refac: valves 2025-09-24 09:21:53 -05:00
groups.py refac/enh: group add/remove users endpoints 2025-07-17 01:50:37 +04:00
images.py refac 2025-09-24 07:17:41 -05:00
knowledge.py refac/enh: knowledge ac backend validation 2025-09-09 18:08:31 +04:00
memories.py refac: memory handling 2025-07-20 15:00:24 +04:00
models.py feat: refactor model import to a single backend endpoint 2025-09-28 18:49:42 -04:00
notes.py feat: add permission toggle for public sharing of notes 2025-09-26 20:48:01 +00:00
ollama.py fix: prevent memory leaks in file handling and HTTP connections 2025-09-20 06:37:10 +09:00
openai.py fix: oauth token 2025-09-19 00:10:48 -05:00
pipelines.py refac 2025-05-15 12:58:44 +04:00
prompts.py refac: ENABLE_ADMIN_WORKSPACE_CONTENT_ACCESS renamed to BYPASS_ADMIN_ACCESS_CONTROL 2025-08-21 13:08:22 +04:00
retrieval.py feat/enh: perplexity search support 2025-09-25 14:02:46 -05:00
scim.py refac 2025-08-06 14:27:07 +04:00
tasks.py enh: query caching 2025-08-27 03:07:21 +04:00
tools.py refac: tools 2025-09-26 19:01:22 -05:00
users.py feat: add permission toggle for public sharing of notes 2025-09-26 20:48:01 +00:00
utils.py refac/security: python code format endpoint 2025-06-08 20:26:07 +04:00