fix(cli): wire /whoami slash command in classic CLI

This commit is contained in:
kronexoi
2026-05-15 05:08:42 +03:00
committed by Teknium
parent 4511ba49dd
commit 4f12cfd98d
2 changed files with 36 additions and 0 deletions
+18
View File
@@ -443,6 +443,24 @@ class TestNestedDictModelDefaultPairing:
assert cli.requested_provider == "anthropic"
assert cli.provider == "anthropic"
def test_whoami_command_is_dispatched_and_prints_cli_access(self, capsys):
"""/whoami is advertised in classic CLI help and must not fall through.
Regression test: the command existed in the shared registry, so it
appeared in /help and completion, but classic CLI dispatch lacked a
matching branch and printed `Unknown command: /whoami`.
"""
cli = _make_cli()
cli.process_command("/whoami")
output = capsys.readouterr().out
assert "Unknown command" not in output
assert "cli (local terminal)" in output
assert "Tier:" in output
assert "unrestricted" in output
assert "Slash commands: all available" in output
class TestRootLevelProviderOverride:
"""Root-level provider/base_url in config.yaml must NOT override model.provider."""