Repository navigation
fix: show effective channel model in Telegram status - #118548
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 4:32 AM ET / 08:32 UTC. ClawSweeper reviewWhat this changesThe branch makes native Telegram Merge readinessThis PR remains necessary and is a focused candidate fix for the Telegram Priority: P2 Review scores
Verification
How this fits togetherTelegram native slash commands enter OpenClaw’s reply fast path, which creates a status response before the ordinary reply pipeline runs. The response consumes session and delivery metadata, then becomes the status message shown to the Telegram operator. flowchart LR
A[Telegram slash command] --> B[Native reply fast path]
B --> C[Session and delivery facts]
C --> D[Channel model selection]
D --> E[Status detail builder]
E --> F[Telegram status message]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +54, Tests +293. Total +347 across 2 files. View PR surface stats
Review metrics
Mantis proof suggestionA short native Telegram Desktop capture would provide maintainers an additional direct visual check of the configured group or topic model shown by Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Land the producer-owned native-status repair with its persisted-session regression coverage, then handle Discord’s independent direct-status producer in a separate owner-boundary change if that surface still shows the same inconsistency. Do we have a high-confidence way to reproduce the issue? Yes. Current source shows native Is this the best way to solve the issue? Yes. Resolving the canonical channel override at the native producer is the narrowest maintainable fix because this fast path builds all model-dependent status facts before ordinary reply routing runs. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0cad02313a9c. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…ion-routing * origin/main: refactor(agents): remove stale runner state plumbing (#118495) test(gateway): skip servers for handler fixtures (#118581) test(tui): reuse real gateway PTY fixture (#118567) fix: keep command tests independent of ambient Gateway tokens (#118577) fix: show effective channel model in Telegram status (#118548) test(system-agent): reuse approval CLI fixture (#118572) test(macos): deduplicate Claude session catalog fixtures (#118571)
Closes #89532
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.
What Problem This Solves
Fixes an issue where users running the native
/statuscommand in a Telegram group, topic, or direct conversation would see the account's default model and its associated runtime settings instead of the effective model configured for that conversation throughchannels.modelByChannel.Before the fix, a Telegram conversation configured for
anthropic/claude-sonnet-4-6could report the defaultopenai/gpt-5.6-lunaand stale runtime, thinking, fast-mode, or context information.Why This Change Was Made
Native Telegram
/statusreturns before the ordinary reply pipeline reaches channel-model routing. Resolve the effective channel model once at the native status producer, before model-bound thinking, authentication, runtime, context, and fast-mode facts are prepared, using the existing canonical channel-override and model-alias resolvers.Preserve explicit session selections, valid automatic fallbacks, model-selection locks, and already-prepared heartbeat/fallback models. Support Telegram topics, model-parent sessions, direct peer/sender IDs, aliases, and current-channel identity; ignore persisted direct-message origin data from another channel so a shared session cannot apply a stale Discord identity to a Telegram command.
This supersedes the larger renderer-layer approach in #117443 without modifying or closing that bot PR.
Scope is intentionally the Telegram/native status path reported in #89532. Discord's separate direct status path through
extensions/discord/src/monitor/native-command-status.tsandsrc/plugin-sdk/command-status.runtime.tsremains an explicit follow-up; this PR does not expand or change the public plugin SDK contract.User Impact
Telegram users can trust
/statusto show the actual model selected for their configured group, topic, or direct conversation, along with that model's correct runtime, context window, thinking level, and fast-mode state. Existing explicit model choices, locked sessions, and heartbeat/fallback selections remain unchanged.Evidence
Full existing and new focused native-command suites: 61/61 tests passed.
Dedicated Linux/Testbox regression matrix: 12/12 tests passed, covering effective channel selection, aliases, stale shared-session channel metadata, group/topic parent fallback, explicit model-parent sessions, direct native peer IDs, live sender IDs, conflicting stale cross-channel direct-message identities, explicit user/automatic selections, locked sessions, and prepared heartbeat/fallback models. Routed-model thinking defaults are asserted on the real producer callback.
Full remote changed-file gate: passed, including production and test
tsgochecks, formatting, lint, max-lines ratchets, plugin boundaries, SDK surface baseline, dependency guards, dead-code checks, import cycles, database/schema guards, and the remaining repository safeguards.Testbox workflow: https://github.com/openclaw/openclaw/actions/runs/30786178929
The delegated one-shot runner was stopped after successful proof; the backing Actions step can show cancellation during normal lease cleanup. The wrapper's
exitCode=0andrunStatus=succeededare the authoritative result.Real isolated production
getReplyFromConfignative Telegram/statusinvocation, with an actual persisted session, exact group-specificchannels.modelByChannelconfiguration, and the real status formatter:Fresh Codex Sol extra-high-reasoning
autoreview: clean; no accepted/actionable findings.Four independent owner-boundary reviews: GO; no actionable P0/P1/P2 findings.
AI-assisted implementation; the behavior, ownership boundary, and validation evidence were independently reviewed.
Maintainer review decisions
/statusrepair reported in Bug: /status does not show effective model from channels.modelByChannel #89532. Discord's independent direct-status producer remains a separate, explicitly documented follow-up; expanding this PR into the plugin SDK would cross its owner boundary.0cad02313a9cbc6d1e60dfcb1d44b1bde523e3fbproduces a clean merge tree with this reviewed head, and neither of the two touched files changed on main since the branch point. Behind-main drift alone does not justify replacing the exact head that already has successful hosted CI.getReplyFromConfig+ persisted SQLite scenario directly displays the effective model and its matching runtime/context/thinking/fast facts; an additional Mantis recording would be supplemental, not a missing correctness gate.