Skip to content

Telegram: model list buttons broken for providers with dots in name (e.g. hf.co) #38745

@justkekalot

Description

@justkekalot

Bug

When using /models in a Telegram chat, providers with dots in their ID (e.g. hf.co) display models as plain text instead of inline keyboard buttons. Providers without dots (e.g. openai-codex) display correctly as buttons.

Root cause

In src/telegram/model-buttons.ts, parseModelCallbackData() uses this regex to parse the mdl_list_ callback:

const listMatch = trimmed.match(/^mdl_list_([a-z0-9_-]+)_(\d+)$/i);

The character class [a-z0-9_-] does not include a dot (.). When a user taps the hf.co (2) provider button, the callback_data is mdl_list_hf.co_1, which fails to match. parseModelCallbackData returns null, and the model list falls back to plain text.

Expected behavior

Providers with dots in the ID should render model lists as inline keyboard buttons, same as any other provider.

Fix

Add . to the regex character class:

- const listMatch = trimmed.match(/^mdl_list_([a-z0-9_-]+)_(\d+)$/i);
+ const listMatch = trimmed.match(/^mdl_list_([a-z0-9_.-]+)_(\d+)$/i);

This pattern appears in two compiled files:

  • dist/reply-DhtejUNZ.js
  • dist/pi-embedded-CtM2Mrrj.js

Environment

  • openclaw v2026.3.2
  • Raspberry Pi 5, Debian 13 (trixie)
  • Telegram channel with hf.co/unsloth/Qwen3.5-*-GGUF models configured via ollama

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions