Skip to content

feat: /model inline keyboard buttons#70

Merged
royosherove merged 1 commit intomainfrom
feat/model-inline-keyboard
May 9, 2026
Merged

feat: /model inline keyboard buttons#70
royosherove merged 1 commit intomainfrom
feat/model-inline-keyboard

Conversation

@royosherove
Copy link
Copy Markdown
Member

/model now shows clickable Telegram buttons:

🤖 Current model: Claude Sonnet 4.6

Select a model:
[Claude Opus 4.7]
[Claude Opus 4.6]
[Claude Sonnet 4.6]
[Claude Haiku 4.5]

Clicking a button immediately switches the model. No typing needed.

Falls back to text list if inline keyboard unavailable.
393 tests green.

When /model is used without arguments, shows clickable buttons
for each available model (Opus 4.7, Opus 4.6, Sonnet 4.6, Haiku 4.5).
Clicking a button immediately switches the model.

Falls back to text list if inline keyboard fails.
393 tests green.
@royosherove royosherove merged commit 0e7a47d into main May 9, 2026
1 check passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 096ba1d810

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// Try to send with inline keyboard via telegramFetch
const adapter = thread?.adapter;
if (adapter?.telegramFetch) {
const chatId = thread?.platformThreadId?.split(":")?.[0] ?? thread?.id?.split(":")?.[0];
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Parse Telegram thread ID from the numeric segment

The inline-keyboard path derives chat_id with split(":")[0], but Telegram threads are encoded as telegram:<chatId> (see src/transports/telegram/telegram-adapter.ts:88-90, which reads index 1). In Telegram chats this makes chat_id become "telegram", so sendMessage fails and the new button UI always falls back to plain text instead of rendering clickable model buttons.

Useful? React with 👍 / 👎.

Comment on lines +16 to 20
export const MODEL_ALIASES: Record<string, { provider: string; model: string; label: string }> = {
"opus": { provider: "amazon-bedrock", model: "us.anthropic.claude-opus-4-6", label: "Claude Opus 4.6" },
"opus-4.6": { provider: "amazon-bedrock", model: "us.anthropic.claude-opus-4-6", label: "Claude Opus 4.6" },
"opus-4.7": { provider: "amazon-bedrock", model: "us.anthropic.claude-opus-4-7", label: "Claude Opus 4.7" },
"sonnet": { provider: "amazon-bedrock", model: "us.anthropic.claude-sonnet-4-6", label: "Claude Sonnet 4.6" },
"sonnet-4.6": { provider: "amazon-bedrock", model: "us.anthropic.claude-sonnet-4-6", label: "Claude Sonnet 4.6" },
"haiku": { provider: "amazon-bedrock", model: "us.anthropic.claude-haiku-4-5", label: "Claude Haiku 4.5" },
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore versioned model aliases to avoid invalid model writes

Dropping versioned aliases (for example sonnet-4.6, haiku-4.5, opus-4.6) regresses existing /model <alias> inputs: these now miss MODEL_ALIASES and fall into the raw-ID branch in applyModelSelection, which writes values like defaultModel = "sonnet-4.6" even though Bedrock expects full IDs (for example us.anthropic...). Users who previously used these aliases will silently persist invalid model IDs.

Useful? React with 👍 / 👎.

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.

1 participant