openclaw - ✅(Solved) Fix Telegram model picker shows raw IDs instead of display names when navigated via button click [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#70560Fetched 2026-04-24 05:56:25
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
cross-referenced ×1

When using the Telegram channel and navigating the /models <provider> picker by clicking the provider button, the model list shows raw model IDs (e.g. gemini-3.1-pro-preview) instead of the configured display names (e.g. Gemini 3.1 Pro (Bridge)).

When typing the same command as text (/models <provider>), the display names render correctly.

Affects all custom-provider bridges (Claude, Gemini, OpenAI bridges via CLIProxyAPI).

Root Cause

In dist/extensions/telegram/bot-Dm2NPcQu.js, the callback handler for the provider-button click destructures the result of buildModelsProviderData() but omits modelNames:

const { byProvider, providers } = modelData;  // modelNames missing

When later calling buildModelsKeyboard(...), the modelNames parameter is not passed:

const buttons = buildModelsKeyboard({
  provider, models, currentModel, currentPage, totalPages, pageSize
  // modelNames missing!
});

In dist/extensions/telegram/command-ui-FFM3hJ1Q.js, buildModelsKeyboard then falls back to the raw model ID:

const displayText = truncateModelId(modelNames?.get(`${provider}/${model}`) ?? model, 38);

Meanwhile, the text-command path in dist/commands-models-B8u0MMFL.js passes modelNames correctly through buildTelegramModelsListChannelData, which is why typing /models <provider> works.

Fix Action

Fix / Workaround

Verified hotfix

Applying the suggested 2-line patch to the local install fixed the issue immediately for both claude-bridge and gemini-bridge. Display names render correctly in both navigation paths after restart.

PR fix notes

PR #70564: fix(telegram): pass modelNames to buildModelsKeyboard in button-click callback handler

Description (problem / solution / changelog)

Summary

  • The Telegram model picker showed raw model IDs (e.g. gemini-3.1-pro-preview) instead of configured display names (e.g. Gemini 3.1 Pro (Bridge)) when navigating via provider button click.
  • The text-command path (/models <provider>) worked correctly because it passes modelNames through buildTelegramModelsListChannelData.
  • The button-click callback handler in extensions/telegram/src/bot-handlers.runtime.ts destructured buildModelsProviderData() but omitted modelNames from the result, then called buildModelsKeyboard() without it.
  • buildModelsKeyboard in model-buttons.ts has modelNames?.get(...) ?? model as fallback, so without the Map it always renders the raw model ID.
  • Fix: destructure modelNames from modelData and forward it to buildModelsKeyboard.

Change Type

  • Bug fix

Scope

  • Integrations

Linked Issue/PR

Closes #70560

  • This PR fixes a bug or regression

Root Cause

In extensions/telegram/src/bot-handlers.runtime.ts, the modelCallback.type === "list" branch destructured buildModelsProviderData() as { byProvider, providers }, omitting modelNames. The buildModelsKeyboard call in that branch therefore received no modelNames argument and fell back to raw model IDs via the nullish-coalescing operator in model-buttons.ts.

Regression Test Plan

Existing unit tests in extensions/telegram/src/bot-handlers.runtime.test.ts and extensions/telegram/src/model-buttons.test.ts cover the affected code paths. No new test added since the fix is a straightforward one-parameter addition matching what the working text-command path already does.

User-visible / Behavior Changes

Model picker button navigation in Telegram now shows configured display names instead of raw model IDs for custom provider bridges.

Diagram

N/A

Security Impact

  • New permissions: No
  • Secrets handling: No
  • Network calls: No
  • Command execution: No
  • Data access scope: No

Repro + Verification

  • Environment: Telegram bot with custom provider having name field set in config
  • Steps: Type /models → click provider button → observe model list
  • Expected: Display names from name field (e.g. Gemini 3.1 Pro (Bridge))
  • Actual (before fix): Raw model IDs (e.g. gemini-3.1-pro-preview)

Evidence

The modelNames Map is returned by buildModelsProviderData (bot-deps.ts line 150) and accepted by buildModelsKeyboard (model-buttons.ts line 39), but was not being threaded through the button-click handler. The text-command path at bot-deps.ts line 343 already destructures and passes modelNames correctly, confirming the fix approach.

Human Verification

Verified that buildModelsProviderData returns modelNames in its result object, that buildModelsKeyboard accepts modelNames as an optional parameter, and that the text-command path already uses this parameter correctly. Did not verify on a live Telegram instance.

Review Conversations

  • I have replied to and resolved all bot review conversations

Fixes #70560

Changed files

  • extensions/telegram/src/bot-handlers.runtime.ts (modified, +2/-1)

Code Example

{
     "id": "gemini-3.1-pro-preview",
     "name": "Gemini 3.1 Pro (Bridge)"
   }

---

const { byProvider, providers } = modelData;  // modelNames missing

---

const buttons = buildModelsKeyboard({
  provider, models, currentModel, currentPage, totalPages, pageSize
  // modelNames missing!
});

---

const displayText = truncateModelId(modelNames?.get(`${provider}/${model}`) ?? model, 38);

---

-const { byProvider, providers } = modelData;
+const { byProvider, providers, modelNames } = modelData;

---

const buttons = buildModelsKeyboard({
   provider, models, currentModel, currentPage: safePage, totalPages,
-  pageSize
+  pageSize, modelNames
 });
RAW_BUFFERClick to expand / collapse

Bug: Telegram model picker shows raw IDs instead of display names when navigated via button click

Summary

When using the Telegram channel and navigating the /models <provider> picker by clicking the provider button, the model list shows raw model IDs (e.g. gemini-3.1-pro-preview) instead of the configured display names (e.g. Gemini 3.1 Pro (Bridge)).

When typing the same command as text (/models <provider>), the display names render correctly.

Affects all custom-provider bridges (Claude, Gemini, OpenAI bridges via CLIProxyAPI).

Steps to reproduce

  1. Configure a custom provider with name fields in ~/.openclaw/openclaw.json, e.g.:
    {
      "id": "gemini-3.1-pro-preview",
      "name": "Gemini 3.1 Pro (Bridge)"
    }
  2. In Telegram, type /models → click on provider button (e.g. gemini-bridge).
  3. Observe that the model list shows raw IDs instead of name field values.
  4. As a comparison, type /models gemini-bridge directly as text → display names render correctly.

Expected behavior

Both navigation paths (button click and text command) should render the display names from the name field.

Root cause

In dist/extensions/telegram/bot-Dm2NPcQu.js, the callback handler for the provider-button click destructures the result of buildModelsProviderData() but omits modelNames:

const { byProvider, providers } = modelData;  // modelNames missing

When later calling buildModelsKeyboard(...), the modelNames parameter is not passed:

const buttons = buildModelsKeyboard({
  provider, models, currentModel, currentPage, totalPages, pageSize
  // modelNames missing!
});

In dist/extensions/telegram/command-ui-FFM3hJ1Q.js, buildModelsKeyboard then falls back to the raw model ID:

const displayText = truncateModelId(modelNames?.get(`${provider}/${model}`) ?? model, 38);

Meanwhile, the text-command path in dist/commands-models-B8u0MMFL.js passes modelNames correctly through buildTelegramModelsListChannelData, which is why typing /models <provider> works.

Suggested fix

In bot-Dm2NPcQu.js, destructure and forward modelNames:

-const { byProvider, providers } = modelData;
+const { byProvider, providers, modelNames } = modelData;
 const buttons = buildModelsKeyboard({
   provider, models, currentModel, currentPage: safePage, totalPages,
-  pageSize
+  pageSize, modelNames
 });

Environment

  • OpenClaw version: 2026.4.21 (commit f788c88)
  • Node.js: v22.22.2
  • OS: Linux 6.17.13-3-pve (x64)
  • Channel: Telegram
  • Custom providers: claude-bridge (openclaw-claude-bridge), gemini-bridge / openai-bridge (CLIProxyAPI)

Verified hotfix

Applying the suggested 2-line patch to the local install fixed the issue immediately for both claude-bridge and gemini-bridge. Display names render correctly in both navigation paths after restart.

extent analysis

TL;DR

The most likely fix is to update the bot-Dm2NPcQu.js file to destructure and forward modelNames when building the models keyboard.

Guidance

  • Verify that the modelData object contains the modelNames property before attempting to destructure it.
  • Apply the suggested 2-line patch to the bot-Dm2NPcQu.js file to fix the issue.
  • Restart the application after applying the patch to ensure the changes take effect.
  • Test both navigation paths (button click and text command) to confirm that display names render correctly.

Example

The suggested fix involves updating the following lines of code:

-const { byProvider, providers } = modelData;
+const { byProvider, providers, modelNames } = modelData;
 const buttons = buildModelsKeyboard({
   provider, models, currentModel, currentPage: safePage, totalPages,
-  pageSize
+  pageSize, modelNames
 });

Notes

This fix assumes that the modelNames property is correctly populated in the modelData object. If this is not the case, additional debugging may be required to determine why the property is missing.

Recommendation

Apply the workaround by updating the bot-Dm2NPcQu.js file with the suggested 2-line patch, as it has been verified to fix the issue in the provided environment.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Both navigation paths (button click and text command) should render the display names from the name field.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING