fix(gateway): add codex runtime telegram alias

This commit is contained in:
Yanzhong Su 2026-05-14 19:27:17 +01:00 committed by Teknium
parent 5fba236644
commit d87b27cff8
2 changed files with 9 additions and 1 deletions

View file

@ -123,7 +123,8 @@ COMMAND_REGISTRY: list[CommandDef] = [
CommandDef("model", "Switch model for this session", "Configuration",
aliases=("provider",), args_hint="[model] [--provider name] [--global]"),
CommandDef("codex-runtime", "Toggle codex app-server runtime for OpenAI/Codex models",
"Configuration", args_hint="[auto|codex_app_server]"),
"Configuration", aliases=("codex_runtime",),
args_hint="[auto|codex_app_server]"),
CommandDef("gquota", "Show Google Gemini Code Assist quota usage", "Info",
cli_only=True),

View file

@ -107,6 +107,7 @@ class TestResolveCommand:
assert resolve_command("gateway").name == "platforms"
assert resolve_command("set-home").name == "sethome"
assert resolve_command("reload_mcp").name == "reload-mcp"
assert resolve_command("codex_runtime").name == "codex-runtime"
assert resolve_command("tasks").name == "agents"
def test_topic_is_gateway_command(self):
@ -251,6 +252,12 @@ class TestTelegramBotCommands:
assert "queue" in names
assert "steer" in names
def test_hyphenated_codex_runtime_is_exposed_as_underscore_command(self):
"""Telegram autocomplete exposes /codex-runtime as /codex_runtime."""
names = {name for name, _ in telegram_bot_commands()}
assert "codex_runtime" in names
assert "codex-runtime" not in names
class TestSlackSubcommandMap:
def test_returns_dict(self):