Skip to content

Conversation

@Li0k
Copy link
Collaborator

@Li0k Li0k commented Jan 30, 2026

PR Title: Model config YAML-only + simplified /model UX

Summary

  • Switched to YAML-only model configuration in .aloop/models.yaml; removed legacy env-based hints and name field usage.
  • Simplified /model UX to two commands: picker (/model) and editor (/model edit) with auto-reload on save.
  • Added Codex-style model picker and extracted model TUI helpers into utils/tui/model_ui.py (deduped helpers like mask_secret, parse_kv_args).
  • Updated model switching to keep MemoryManager/compressor in sync with the active LLM.
  • Improved local validation: no API key required when api_base points to localhost; file-save detection uses mtime_ns + size.
  • Documentation & RFC updated for the new design; RFC-006 marked Completed.

Key changes

  • llm/model_manager.py: YAML schema without name, local api_base key exemption, cleanup.
  • interactive.py: only /model and /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.
  • Docs/RFC: consistent .aloop/models.yaml format and updated UX.

Tests

  • ./scripts/dev.sh check

Notes

  • .aloop/models.yaml remains gitignored; no secrets committed.

Checklist

  • Updated docs to match YAML-only config
  • Updated RFC-006 status and content
  • Ensured /model UX matches implementation
  • Tests passed (./scripts/dev.sh check)

@Li0k Li0k force-pushed the fix/model-manager-yaml branch from 58efb62 to fc84d54 Compare January 30, 2026 17:13
@Li0k Li0k marked this pull request as ready for review January 30, 2026 17:14
@Li0k Li0k requested review from Copilot and luohaha and removed request for luohaha January 30, 2026 17:14
Copy link

Copilot AI left a 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 ModelManager class for managing models via .aloop/models.yaml
  • Adds /model command 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.

@luohaha luohaha merged commit 0dbcb03 into main Jan 31, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants