open-webui/backend/open_webui/models
google-labs-jules[bot] 1345b55fe1 feat: Implement Agent Creation with Generalized Model Support
This commit introduces the initial Agent Creation Playground feature and ensures it supports all model types available in Open WebUI, not just Ollama models.

Key changes include:

Frontend:
- Created a new Agent Creation form at `/agents/create`.
- Added a link to the playground in the sidebar (admin only).
- The form now fetches and displays all available models from the `/api/models` endpoint.
- Updated UI to correctly handle generalized model IDs.

Backend:
- Modified the `Agent` model to store a generic `model_id` (foreign key to the `models` table) instead of a specific `llm_model`.
- Updated API endpoints and Pydantic schemas accordingly.
- Created database migrations to reflect schema changes.
- Verified that the existing `/api/models` endpoint can be used to list all models for the creation form.

Testing:
- Added Cypress E2E tests for the agent creation form.
- Tests verify that different model types can be selected and that the correct `model_id` and other agent details are submitted to the backend.

This provides a foundation for you to define agents using any model integrated with your Open WebUI instance.
2025-05-28 11:03:52 +00:00
..
agents.py feat: Implement Agent Creation with Generalized Model Support 2025-05-28 11:03:52 +00:00
auths.py feat: WEBUI_AUTH_TRUSTED_GROUPS_HEADER 2025-05-24 23:17:12 +04:00
channels.py feat: reactions 2024-12-30 23:06:34 -08:00
chats.py refac: user chat list modal 2025-05-25 01:44:53 +04:00
feedbacks.py refactor: replace print statements with logging for better error tracking 2025-02-25 15:53:55 +01:00
files.py refactor: replace print statements with logging for better error tracking 2025-02-25 15:53:55 +01:00
folders.py refac: folders 2025-03-30 23:36:15 -07:00
functions.py feat: /sync functions endpoint 2025-05-24 23:39:19 +04:00
groups.py feat: WEBUI_AUTH_TRUSTED_GROUPS_HEADER 2025-05-24 23:17:12 +04:00
knowledge.py wip 2024-12-10 00:54:13 -08:00
memories.py refac 2025-04-12 15:10:43 -07:00
messages.py fix: channel thread 2025-01-02 20:48:50 -08:00
models.py refactor: replace print statements with logging for better error tracking 2025-02-25 15:53:55 +01:00
notes.py feat: notes 2025-05-03 18:16:32 +04:00
prompts.py wip 2024-12-10 00:54:13 -08:00
tags.py refactor: replace print statements with logging for better error tracking 2025-02-25 15:53:55 +01:00
tools.py chore: format 2025-02-26 22:18:18 -08:00
users.py fix: oauth 2025-05-05 19:38:36 +04:00