Improved model managment#286
Merged
Merged
Conversation
d028b67 to
4c8fbe8
Compare
- Create ModelSelector component to display selected model compactly - Create ModelSelectorModal component to wrap ModelAccordion in a modal - Update AssistantDetails to use new ModelSelector instead of inline accordion - Improves UX by reducing initial form length refactor(frontend/assistant): use class directives for conditional styling refactor(frontend/assistant): remove redundant enhancedDescription div in ModelItem and feat(frontend/assistant): introduce reusable Badge component - Add componenet `Badge.svelte` for model badges - Replace hardcoded badge-related logic in ModelHeader, ModelCapabilities, and ModelSelector with Badge component feat(frontend/assistant): install and use `lucide-svelte` for Badge icons - Replace SVG strings with `lucide-svelte` components for badge icons. - Add `lucide-svelte` as a dependency. - Refactor Badge component for better type safety and dynamic icon rendering. feat(frontend/models): create a new page for models in settings - New `ModelSettings` components: `ModelList`, `ModelItem`, `ModelFormModal`, `DeleteConfirmModal`, and `PageHeader`. - Add modal-based create, edit, and delete flows for models. fix(frontend/models): handle delete model errors in `DeleteConfirmModal` - Added error state management - Form enhance callback to handle deletion failurs - Added UI for display error messages fix(frontend/models): check if the error message type before handling it as a string feat(api/models): add CRUD operations and lifecycle fields for models - Introduced `Model` with fields: `created_at`, `updated_at`, `status`, `visibility`, and `version`. - Added model management in `IAssistantService` with methods for create, update, delete, and retrieval. - Implemented comprehensive test coverage for CRUD operations, including edge cases like keys with slashes, duplicate keys, optimistic locking, and model lifecycle validation. - Integrated `model_router` into `api_router`. feat(models): implement MongoDB-backed model service - Added MongoModelService for model. - Created API CRUD endpoints for models. - Implemented tests for MongoModelService, covering edge cases and lifecycle scenarios. - Integrated new model service to main app setup This commit will break the frontend. `backendApi.ts` needs to consider the new endpoint created for the model service.
…r model management - Introduced new user permission checks: read, write, delete, access settings, and admin for models. - Added CRUD methods in `backendApi.ts` to interact with the models API.
…ranslations - Updated `fr.json`, `en.json`, and `sv.json` to include new labels for "General" and "Models" settings.
- Introduced new components: `CapabilityToggle`, `MaxTokensInput`, `CapabilitiesSection`, and `CapabilityBadges`. - Added support for managing model capabilities (e.g., image processing, reasoning, code execution, function calling) and token limits in the model settings.
- Made meta a required field with default values. - Updated helpers and API logic to align with meta changes. - Removed unused GetAvailableModels API and its references.
- Replaced `formData` with individual reactive state variables. - Improved readability and reduced complexity in the reactive logic. - Minor UI cleanup, SVG with `lucide-svelte` component. - Fix linting and remove comments
…iption fallback feat(components): extracted color picker, from assistant, to a separate reusable component - Added customizable colors and selection handling. feat(frontend/models): add primary color support to ModelFormModal feat(models): add primary color handling to meta object
…component fix(models): use correct fields for avatar and color handling in ModelSelector and utilities refactor(models): enhanced model handling with `$derived.by` refactor(models): add utilities for snake_case to camelCase conversion and update meta handling feat(models): normalize backend response with `ModelRepository` and `ModelTransformer` - Added a new `ModelRepository` to centralize API interactions for models. - Implemented `ModelTransformer` for bidirectional conversion between camelCase and snake_case. refactor(utils): remove helper for `getModelAvatar` access
fix(model): remove component hover effect
5a9684d to
96eee64
Compare
…classes directly before endpoints - Kept shared `ModelResponse` class at the top - since it's used by multiple endpoints - Moved `CreateModelRequest`, `GetModelsResponse` and `UpdateModelRequest` placed directly before their corresponding endpoint
- Backend routes now have a cleaner path without the redundant `/models` suffix - Frontend API client updated to use the fixed endpoints
…sistantService.py`
…ent-to-model conversion logic - Fix will improve code by removing duplications
…d_at` to Unix epoch for missing/unknown timestamps
…instead of manually specifying all fields
…at` and `updated_at`
…` from `setup_default_groups.py`
- "vison" was incorrectly used
MasterKenth
approved these changes
Sep 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds model managment to settings. This PR also improves the UI in the zoo edit page, for displaying available models when creating new assistants.
Settings:

Zoo:

Features
Backend
MongoModelServicewith full CRUD operations/modelAPI endpoints for CRUD'sFrontend
/settings/models/:Testing
chat_modelsand restart the backend