feat: model registry Phase 2 — cloud provider UI (Anthropic + Google)

Adds cloud provider management to /settings/models:
- Google Accounts section: add/remove Gemini API keys with labels
- Add Model form: provider tabs (Local / Google / Anthropic) with
  catalog dropdowns that auto-fill label and context_k
- Provider badges on model rows (Anthropic / Google / Local)
- /settings/local now redirects to /settings/models (canonical URL)
- save_cloud_model() in model_registry for Anthropic/Google entries
- Distill role migration restored in _migrate_from_local_llm
- Test fixes: version assertions updated to V2

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-04-27 20:41:06 -04:00
parent 45c95d20ba
commit f08b033d6c
8 changed files with 585 additions and 297 deletions

View File

@@ -70,7 +70,7 @@ def test_empty_registry_no_files(tmp_path):
import model_registry as reg
with patch.object(config.settings, "home_dir", home):
data = reg._load("scott")
assert data["version"] == 1
assert data["version"] == 2
assert data["hosts"] == []
assert data["models"] == []
assert data["roles"] == {}
@@ -244,7 +244,7 @@ def test_migration_saves_registry_file(tmp_path):
data2 = reg._load("scott")
assert (home / "scott" / "model_registry.json").exists()
assert data2["version"] == 1
assert data2["version"] == 2
# ---------------------------------------------------------------------------