Repository navigation
fix(telegram): follow configured model runtime - #133125
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 3:40 AM ET / 07:40 UTC. ClawSweeper reviewWhat this changesThe PR makes Telegram model-picker selections adopt the selected model’s configured runtime, reports that outcome in chat, and reuses the resolved runtime in the shared selection transaction. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open for normal maintainer review: an authorized Telegram picker click now deliberately clears an existing session runtime pin, which is a compatibility-significant behavior change. The patch is focused and source-consistent, but the protected Priority: P2 Review scores
Verification
How this fits togetherTelegram’s model picker sends an authorized callback to the shared session model-selection transaction, which persists model and runtime choices for the next agent turn. The Telegram plugin then presents the resolved policy outcome to the operator. flowchart LR
A[Telegram model picker] --> B[Authorized callback]
B --> C[Shared model selection]
C --> D[Clear session runtime override]
D --> E[Resolve configured runtime]
E --> F[Persist session for next reply]
E --> G[Telegram confirmation]
Decision needed
Why: This changes an existing persisted session preference after an explicit click. The PR body records approval, but available review context does not independently confirm that decision event. Before merge
Agent review detailsSecurityNone. PR surfaceSource -8, Tests +45. Total +37 across 5 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the picker’s pre-click notice and explicit CLI runtime override, and land only after the Telegram/model-policy owner confirms that clearing prior session pins on picker selection is the intended compatibility contract. Do we have a high-confidence way to reproduce the issue? Yes—source establishes a deterministic path: start with a compatible session runtime override, select a model whose configured runtime differs, and observe current main preserve the pin while this patch clears it. Is this the best way to solve the issue? Yes, subject to the stated policy confirmation: Telegram declares its channel-specific intent, while the shared transaction remains the canonical owner of runtime resolution, persistence, follow-up refresh, and context selection. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f1d2c5b91f80. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
04fc6cc to
b80fcaa
Compare
b80fcaa to
2507db4
Compare
|
Owner decision: accept configured-runtime selection. A Telegram model-button click is an explicit request to adopt the selected model's configured runtime. The picker states this before mutation, and Proof: On Telegram Test Server, the same authorized model callback kept the stale session runtime on main. The repaired head showed the configured-runtime notice before the click, confirmed the effective runtime after the click, and removed the stale override.
Example
|
Telegram model buttons now adopt the selected model's configured runtime after stating that effect before the click. This removes stale compatible session runtime overrides, reports the effective runtime, and reuses the shared resolved runtime for follow-up and context handling. Co-authored-by: Ayaan Zaidi <[email protected]>
Problem
Telegram model-picker buttons preserved a compatible session runtime override. A selected model's configured runtime policy could not take effect, and the confirmation told the operator to run a second manual
/model --runtimecommand.Root cause
The Telegram callback sent
runtime: unchangedto the shared model-selection transaction. Session runtime overrides outrank configured model policy, so a prior compatible override stayed active.Product decision
Ayaan Zaidi approves a Telegram model-button click as the explicit operator action that adopts the selected model's configured runtime policy. The model list states this effect before the click. Explicit
/model --runtimeremains the override path.Fix
/model --runtimebehavior unchanged.Shape
/model --runtime.Production
Live proof
Real Telegram Test Server user and bot, same callback and isolated session state on both revisions:
5a1e1316e0a1a56362d6bf4124c983228fbfb1a4: the callback completed, the bot saidRuntime unchanged, and the session keptagentRuntimeOverride: openclaw.b80fcaa17edc26af9654f6e7d6c70e34ba8fef91: the picker stated the configured-runtime effect before the click; the callback completed; the bot saidRuntime set to openclaw from configured policy; and the runtime override was absent.2507db42dc320fce8a6435b7de89bc0db8911be2is a patch-identical rebase onto healedmain. No owner file changed, and stable patch ID022cbaa92e40a52c1c066fa8e76174b56042c224matches the proven head.The selected model was
openai/gpt-5.6-lunawith configured runtimeopenclaw. This exercises the generic picker/runtime-policy boundary without provider credentials.Validation
node scripts/run-vitest.mjs src/model-picker/apply-session-model-selection.test.ts— 36 passed.node scripts/run-vitest.mjs extensions/telegram/src/bot.test.ts— 143 passed.extensions/telegram/src/bot.create-telegram-bot.test.ts— passed.Overlap