-
Notifications
You must be signed in to change notification settings - Fork 0
feat: yaml model manager and /model commands #47
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
58efb62 to
fc84d54
Compare
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 YAML-based model configuration and interactive model management commands, replacing the legacy environment variable and .aloop/config model configuration system.
Changes:
- Introduces
ModelManagerclass for managing models via.aloop/models.yaml - Adds
/modelcommand with picker UI and edit subcommand for runtime model switching - Removes all legacy
LITELLM_*and provider-specific API key configuration from.aloop/config - Updates documentation, examples, and tests to use the new YAML configuration
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| llm/model_manager.py | New ModelManager class for YAML-based model configuration |
| llm/init.py | Exports ModelManager and ModelProfile |
| utils/tui/model_ui.py | New TUI helpers for model picker and config editor |
| utils/tui/status_bar.py | Adds model_name field to status bar display |
| interactive.py | Implements /model commands and ModelSetupSession |
| main.py | Updates agent creation to use ModelManager |
| agent/base.py | Adds switch_model and get_current_model_info methods |
| config.py | Removes all LITELLM_* configuration |
| test/test_smart_edit_integration.py | Updates test to use ModelManager |
| docs/*.md | Updates documentation for new YAML-based config |
| examples/*.py | Updates examples to use ModelManager |
| rfc/006-multi-model-v2.md | New RFC documenting the design |
| pyproject.toml | Adds PyYAML dependency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
PR Title: Model config YAML-only + simplified /model UX
Summary
.aloop/models.yaml; removed legacy env-based hints andnamefield usage./modelUX to two commands: picker (/model) and editor (/model edit) with auto-reload on save.utils/tui/model_ui.py(deduped helpers likemask_secret,parse_kv_args).api_basepoints to localhost; file-save detection usesmtime_ns + size.Key changes
llm/model_manager.py: YAML schema withoutname, localapi_basekey exemption, cleanup.interactive.py: only/modeland/model edit; uses shared TUI helpers.utils/tui/model_ui.py: centralized picker/editor helpers + secret masking.agent/base.py: switch_model keeps memory/compressor LLMs in sync..aloop/models.yamlformat and updated UX.Tests
./scripts/dev.sh checkNotes
.aloop/models.yamlremains gitignored; no secrets committed.Checklist
/modelUX matches implementation./scripts/dev.sh check)