core/cli: /models and remote catalog for model selection

Cache GET /models, merge with config ids for Tab and choose; free-form model ids allowed.
This commit is contained in:
2026-07-15 17:32:04 +08:00
parent e1ea43cb8f
commit 6bd80cb915
8 changed files with 348 additions and 34 deletions
+1 -1
View File
@@ -235,7 +235,7 @@ async def test_provider_switch_prompts_when_model_missing(
# When switching to b, only-a is missing → select_model is invoked interactively.
monkeypatch.setattr(
"plyngent.cli.slash.select_model",
lambda provider, preferred=None, interactive=True: "only-b",
lambda provider, preferred=None, interactive=True, choices=None: "only-b",
)
assert await handle_slash(state, "/provider b") is True
assert state.provider_name == "b"