-
Notifications
You must be signed in to change notification settings - Fork 7
🚀 Feat: support multiple models + add configuration UI #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements multi-model support with a configuration UI for managing LLM and embedding models. It introduces a centralized model configuration system that stores model settings in the database and provides a Settings page for managing configurations.
Key Changes:
- Added
LLMConfigManagerfor centralized model configuration with database persistence - Created Settings UI page with model CRUD operations and connection testing
- Migrated
.envLLM settings to database on first startup - Updated TextGenerator and StructuredGenerator blocks to use configured models
Reviewed Changes
Copilot reviewed 25 out of 30 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/llm_config.py | New configuration manager for LLM and embedding models with provider-specific logic |
| lib/storage.py | Added database tables for model configs, error field to jobs, and .env migration |
| lib/blocks/builtin/text_generator.py | Refactored to use LLMConfigManager instead of direct settings access |
| lib/blocks/builtin/structured_generator.py | Refactored to use LLMConfigManager instead of direct settings access |
| lib/job_processor.py | Added error message capture for failed job executions |
| models.py | Added LLMProvider enum and model config classes with validation |
| app.py | Added 12 new API endpoints for model management and injected model options into block schemas |
| tests/test_llm_config.py | Comprehensive test suite covering CRUD, fallback logic, and provider detection |
| frontend/src/pages/Settings.tsx | New settings page with model management, testing, and CRUD operations |
| frontend/src/components/settings/* | Modal forms for LLM and embedding model configuration |
| frontend/src/services/llmConfigApi.ts | API client for model configuration endpoints |
| frontend/src/contexts/JobContext.tsx | Improved polling logic with proper cleanup and edge case handling |
| frontend/src/pages/Generator.tsx | Fixed generating state management and removed unused navigation |
| frontend/src/App.tsx | Added Settings route and React Router future flags |
| frontend/src/types/index.ts | Added type definitions for model configs and connection test results |
| llm/*.md | Added comprehensive technical documentation for project architecture |
| docs/template*.md | Added detailed template documentation with usage examples |
| *_code_guide.md | Added coding standards and best practices guides |
| .github/instructions/*.instructions.md | Added code review guidelines |
| Makefile | Modified run command (contains bug) |
| .gitignore | Removed llm/* exclusion to allow documentation commits |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 28 out of 33 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Related Issue
Closes #31
Checklist
make formatpassesmake pre-mergepasses