Repository navigation
fix(telegram): keep long model names selectable - #114472
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 5:42 PM ET / 21:42 UTC. ClawSweeper reviewWhat this changesThis PR replaces oversized Telegram Merge readinessKeep open: current main still silently drops models whose compact callback exceeds 64 bytes, and this head now routes its opaque callbacks correctly. The remaining blocker is maintainer direction on whether to use the merged typed model-picker seam or explicitly retain a Telegram-private codec. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherTelegram’s flowchart LR
A[Authorized provider catalog] --> B[Telegram model keyboard]
B --> C[Bounded callback payload]
C --> D[Callback router]
D --> E[Authorized catalog resolution]
E --> F[Session model apply]
F --> G[Telegram confirmation]
Decision needed
Why: Both paths repair the bug, but they set different long-lived ownership boundaries between core model-picker actions and channel transport encoding. Before merge
Agent review detailsSecurityNone. PR surfaceSource +85, Tests +322. Total +407 across 4 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Choose one canonical picker boundary: complete the typed model-picker transport codec and migrate Telegram, or explicitly authorize this bounded Telegram-private mitigation and retain its current-catalog authorization checks. Do we have a high-confidence way to reproduce the issue? Yes, from source: a model whose standard and compact callback strings exceed 64 bytes makes current main return null and skip its button; the supplied long Ollama identifier is a concrete case. Is this the best way to solve the issue? Unclear: the current head repairs the active route, but its Telegram-private protocol is not yet established as the best long-term owner boundary over the merged typed picker contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fab76d4842de. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (13 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Maintainer decision required before this PR can be rewritten or landed. The bug remains real on current Two post-PR facts change the best-fix decision:
Peter needs to choose between:
The first option expands a public/plugin seam and the second explicitly chooses interim product/ownership debt. Both cross this repair work order's decision gate. The existing branch remains preserved; no code was changed and no live Telegram proof was run for a candidate that should not be merged as written. |
aab7768 to
329772a
Compare
329772a to
494c5ca
Compare
Mantis Telegram proof — PASSSummary: With one configured OpenAI model whose standard and compact Telegram callbacks are 72 and 65 bytes, exact main reported 2 available models but rendered only the short model. The candidate rendered the long model with a 51-byte opaque callback, selected it through Telegram Desktop, confirmed and persisted the session override, retained it across Gateway restart, and rejected the same real-user callback after that user was removed from the Telegram allowlists.
Motion-trimmed clips: |
|
Land-ready verification on exact head 494c5ca: Long provider/model identifiers exceeded Telegram callback_data byte limits and made model buttons unusable. Use Telegram-owned compact callback tokens and stable picker snapshots without adding core product policy. Long models remain selectable, token scope and expiry are enforced, and normal models retain existing behavior. Authenticated Telegram Desktop exact-head baseline/candidate/security/restart workflow passed; focused owner tests, exact CI, and fresh full-branch P1 review are clean. ClawSweeper suggested a shared typed model-picker seam; current src/interactive/payload.ts only declares the schema and Telegram does not enable modelPicker, so no existing producer/snapshot seam exists. Migrating it would require a separate core product redesign and is intentionally not part of this focused transport fix. |
|
Merged via squash.
|


Problem
Telegram silently removed model buttons whose callback data exceeded the Telegram 64-byte transport limit.
Repair
Encode oversized provider/model callbacks using bounded opaque identifiers and resolve them only against the current authorized provider catalog through the current callback router. Existing standard and compact callbacks remain supported.
Verification
Original missing-button regressions reproduced; 173 tests passed, including a real local Telegram Bot API server and grammY update/callback flow. Independent review passed. Authenticated Telegram Desktop proof is running separately.