diff --git a/CHANGELOG.md b/CHANGELOG.md index 56ca5144345..b660fee438a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ Docs: https://docs.openclaw.ai - Providers/OpenAI: resolve `keychain::` `OPENAI_API_KEY` refs before creating OpenAI Realtime browser sessions or voice bridges, with a bounded cached Keychain lookup. Fixes #72120. Thanks @ctbritt. - Discord/gateway: reconnect when the gateway socket closes while waiting for the shared IDENTIFY concurrency window, instead of silently skipping IDENTIFY and leaving the bot online but unresponsive. Fixes #74617. Thanks @zeeskdr-ai. - Telegram/startup: use the existing `getMe` request guard for the gateway bot probe instead of a fixed 2.5-second budget, and honor higher `timeoutSeconds` configs for slow Telegram API paths. Fixes #75783. Thanks @tankotan. +- Telegram/models: make model picker confirmations say selections are session-scoped and do not change the agent's persistent default. Fixes #75965. Thanks @sd1114820. - Control UI/slash commands: keep fallback command metadata on a browser-safe registry path, so provider thinking runtime imports cannot blank the Web UI with `process is not defined`. Fixes #75987. Thanks @novkien. - Infer/media: report missing image-understanding and audio-transcription provider configuration for `image describe`, `image describe-many`, and `audio transcribe` instead of blaming the input path when no provider is available. Fixes #73569 and supersedes #73593, #74288, and #74495. Thanks @bittoby, @tmimmanuel, @Linux2010, and @vyctorbrzezowski. - Docs/health: clarify that session listing surfaces stored conversation rows rather than Discord/channel socket liveness, and point connectivity checks at channel status and health probes. Fixes #70420. Thanks @ashersoutherncities-art and @martingarramon. diff --git a/docs/concepts/models.md b/docs/concepts/models.md index f1f95d2752d..4b14320eeee 100644 --- a/docs/concepts/models.md +++ b/docs/concepts/models.md @@ -167,6 +167,7 @@ You can switch models for the current session without restarting: - `/model` (and `/model list`) is a compact, numbered picker (model family + available providers). - On Discord, `/model` and `/models` open an interactive picker with provider and model dropdowns plus a Submit step. + - On Telegram, `/models` picker selections are session-scoped; they do not change the agent's persistent default in `openclaw.json`. - `/models add` is deprecated and now returns a deprecation message instead of registering models from chat. - `/model <#>` selects from that picker. diff --git a/extensions/telegram/src/bot-handlers.runtime.ts b/extensions/telegram/src/bot-handlers.runtime.ts index 644923386aa..c3ea8adc732 100644 --- a/extensions/telegram/src/bot-handlers.runtime.ts +++ b/extensions/telegram/src/bot-handlers.runtime.ts @@ -1745,8 +1745,11 @@ export const registerTelegramHandlers = ({ const actionText = isDefaultSelection ? "reset to default" : `changed to ${escapeHtml(selection.provider)}/${escapeHtml(selection.model)}`; + const scopeText = isDefaultSelection + ? "Session selection cleared. New replies use the agent's configured default." + : "Session-only selection. The agent default in openclaw.json is unchanged; /reset or a new session may return to that default."; await editMessageWithButtons( - `✅ Model ${actionText}\n\nThis model will be used for your next message.`, + `✅ Model ${actionText}\n\n${scopeText}`, [], // Empty buttons = remove inline keyboard { parse_mode: "HTML" }, ); diff --git a/extensions/telegram/src/bot.create-telegram-bot.test.ts b/extensions/telegram/src/bot.create-telegram-bot.test.ts index f00617ec933..71c48c8bde9 100644 --- a/extensions/telegram/src/bot.create-telegram-bot.test.ts +++ b/extensions/telegram/src/bot.create-telegram-bot.test.ts @@ -3739,7 +3739,7 @@ describe("createTelegramBot", () => { expect(editMessageTextSpy).toHaveBeenCalledTimes(1); expect(String(editMessageTextSpy.mock.calls.at(-1)?.[2] ?? "")).toContain( - "This model will be used for your next message.", + "Session-only selection. The agent default in openclaw.json is unchanged", ); expect( editMessageTextSpy.mock.calls.some((call) => diff --git a/extensions/telegram/src/bot.test.ts b/extensions/telegram/src/bot.test.ts index 6ccda9f6a59..e7a6a10f1e9 100644 --- a/extensions/telegram/src/bot.test.ts +++ b/extensions/telegram/src/bot.test.ts @@ -1061,6 +1061,9 @@ describe("createTelegramBot", () => { expect(editMessageTextSpy.mock.calls[0]?.[2]).toContain( `${CHECK_MARK_EMOJI} Model reset to default`, ); + expect(editMessageTextSpy.mock.calls[0]?.[2]).toContain( + "Session selection cleared. New replies use the agent's configured default.", + ); const entry = Object.values(loadSessionStore(storePath, { skipCache: true }))[0]; expect(entry?.providerOverride).toBeUndefined(); @@ -1205,6 +1208,9 @@ describe("createTelegramBot", () => { expect(editMessageTextSpy.mock.calls[0]?.[2]).toContain( `${CHECK_MARK_EMOJI} Model reset to default`, ); + expect(editMessageTextSpy.mock.calls[0]?.[2]).toContain( + "Session selection cleared. New replies use the agent's configured default.", + ); const entry = Object.values(loadSessionStore(storePath, { skipCache: true }))[0]; expect(entry?.providerOverride).toBeUndefined(); @@ -1275,7 +1281,7 @@ describe("createTelegramBot", () => { expect(editMessageTextSpy).toHaveBeenCalledWith( 1234, 17, - `${CHECK_MARK_EMOJI} Model changed to openai/gpt-5.4\n\nThis model will be used for your next message.`, + `${CHECK_MARK_EMOJI} Model changed to openai/gpt-5.4\n\nSession-only selection. The agent default in openclaw.json is unchanged; /reset or a new session may return to that default.`, expect.objectContaining({ parse_mode: "HTML" }), );