Skip to content

fix(status): show effective channel model override#89602

Open
zerone0x wants to merge 1 commit into
openclaw:mainfrom
zerone0x:fix/89532-status-channel-model
Open

fix(status): show effective channel model override#89602
zerone0x wants to merge 1 commit into
openclaw:mainfrom
zerone0x:fix/89532-status-channel-model

Conversation

@zerone0x

@zerone0x zerone0x commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • resolve channel-level channels.modelByChannel overrides in /status even when they differ from the session/default model
  • show the effective channel override model as the primary model and include the session/default model separately
  • add regression coverage for a Telegram channel override differing from the default model

Fixes #89532

Tests

  • node scripts/run-vitest.mjs src/auto-reply/status.test.ts src/auto-reply/reply/commands-status.test.ts src/channels/model-overrides.test.ts

@openclaw-barnacle openclaw-barnacle Bot added size: S triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 2, 2026
@clawsweeper

clawsweeper Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed June 29, 2026, 11:23 PM ET / 03:23 UTC.

Summary
The PR changes /status formatting to display a channels.modelByChannel override as the primary model when it differs from the session/default model, and adds a Telegram override regression test.

PR surface: Source +10, Tests +31. Total +41 across 2 files.

Reproducibility: yes. at source level. Configure a channels.modelByChannel override that differs from the selected/default model: current /status suppresses the differing override while the reply path applies it before execution.

Review metrics: none identified.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #89532
Summary: This PR is the open candidate fix for the narrow /status channel-model mismatch; the broader resolver issue overlaps but does not replace the linked bug yet.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🧂 unranked krab
Result: blocked until real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add redacted real Telegram or real-channel /status proof showing the effective override model, session/default model, and matching auth/runtime metadata.
  • Move effective channel model resolution before auth, runtime, usage, context, and text-verbosity metadata are derived.
  • Rebase or otherwise resolve the current conflict against main before the next review.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body lists tests only and needs redacted after-fix /status proof from a real Telegram or real-channel setup; screenshots, recordings, terminal/live output, or logs count if private IDs, tokens, phone numbers, IPs, endpoints, and account details are removed, and updating the PR body should trigger a fresh ClawSweeper review or a maintainer can comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Mantis proof suggestion
A native Telegram proof would directly show whether /status displays the effective override model, session/default model, and matching auth/runtime labels. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis telegram desktop proof: verify /status in a Telegram group with channels.modelByChannel shows the effective override model, session/default model, and matching auth label.

Risk before merge

  • [P1] Merging as-is can show the channel override model while auth, runtime, usage, or credential metadata still comes from the selected/default provider path.
  • [P1] The PR body lists tests only; external contributor real-behavior proof is still absent for the visible Telegram /status change.
  • [P1] The PR is currently conflicting against main, so any final review needs the resolved merge result rather than this stale head alone.

Maintainer options:

  1. Fix coherent status state before merge (recommended)
    Resolve the channel override before auth/runtime/usage/context metadata is computed, add command-path coverage with different selected/default and override providers, then rebase the branch and collect real /status proof.
  2. Fold into the shared resolver tracker
    Pause or replace this PR if maintainers want Refactor session model/auth state resolution #87957 to own a single resolver for status, display, run selection, and auth metadata.
  3. Accept as a display-only incremental fix
    Maintainers could intentionally accept the narrower display change, but they would be owning the known risk that provider/auth metadata remains misleading until the broader resolver work lands.

Next step before merge

  • [P1] Contributor proof is missing, the branch is conflicting, and the remaining blocker is coherent status model/auth resolution rather than a safe ClawSweeper repair lane.

Security
Cleared: The diff only changes TypeScript status rendering and tests; no dependency, workflow, secret, package, or generated-code surface changed.

Review findings

  • [P2] Resolve the override before deriving status metadata — src/status/status-message.ts:1001-1002
Review details

Best possible solution:

Derive one effective channel model/provider state before /status computes auth, runtime, usage, context, and display labels, then show both effective and session/default models when they differ.

Do we have a high-confidence way to reproduce the issue?

Yes, at source level. Configure a channels.modelByChannel override that differs from the selected/default model: current /status suppresses the differing override while the reply path applies it before execution.

Is this the best way to solve the issue?

No, not as currently patched. The direction is useful, but applying the override inside buildStatusMessage is too late when buildStatusText has already derived auth, runtime, usage, and harness metadata.

Full review comments:

  • [P2] Resolve the override before deriving status metadata — src/status/status-message.ts:1001-1002
    This branch renders channelModelRef.label with activeAuthLabel, but the command path can still pass auth/runtime/usage values computed from the selected/default model before the channel override is applied. A channel override such as xai/grok-4.3 can therefore be shown with OpenAI auth/runtime/usage metadata; resolve the effective channel model before computing those fields or recompute all metadata from the override.
    Confidence: 0.86

Overall correctness: patch is incorrect
Overall confidence: 0.86

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 54b09580f61b.

Label changes

Label justifications:

  • P2: This is a normal-priority operator-facing status correctness bug with limited blast radius because reply routing itself is not shown to be broken.
  • merge-risk: 🚨 auth-provider: The diff can display a channel override model while auth, runtime, or usage metadata remains derived from a different selected/default provider path.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🧂 unranked krab.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body lists tests only and needs redacted after-fix /status proof from a real Telegram or real-channel setup; screenshots, recordings, terminal/live output, or logs count if private IDs, tokens, phone numbers, IPs, endpoints, and account details are removed, and updating the PR body should trigger a fresh ClawSweeper review or a maintainer can comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • mantis: telegram-visible-proof: Mantis should capture Telegram visible proof. The PR changes visible Telegram /status output for a Telegram channel override, which is suitable for a short Telegram Desktop proof recording.
Evidence reviewed

PR surface:

Source +10, Tests +31. Total +41 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 32 22 +10
Tests 1 31 0 +31
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 63 22 +41

What I checked:

  • Repository policy read and applied: Root AGENTS.md was read fully, and the Telegram maintainer note was read because the PR affects visible Telegram /status behavior and proof expectations. (AGENTS.md:1, 54b09580f61b)
  • Current main still suppresses differing channel overrides: resolveChannelModelNote resolves the channel override, but returns no note when the override provider/model differs from the selected/default provider/model passed to the formatter. (src/status/status-message.ts:542, 54b09580f61b)
  • Status auth is derived before the formatter sees channel overrides: buildStatusText computes selected/active auth labels, harness, usage provider, and context before delegating to buildStatusMessage, so formatter-only override handling can leave metadata on the selected/default path. (src/status/status-text.ts:350, 54b09580f61b)
  • Normal reply path applies the channel override: Reply execution resolves channels.modelByChannel, parses the override model, and uses the resolved override as the primary provider/model before running the reply. (src/auto-reply/reply/get-reply.ts:576, 54b09580f61b)
  • PR head renders the override with precomputed auth: The PR head renders channelModelRef.label with activeAuthLabel, but the command path can pass activeModelAuth from the selected/default model when the runtime active model did not differ before the formatter override. (src/status/status-message.ts:1001, 70bab535e932)
  • PR body lacks real behavior proof: The PR body lists only the targeted Vitest command and no redacted after-fix /status output, terminal/live output, logs, recording, screenshot, or linked runtime artifact. (70bab535e932)

Likely related people:

  • thewilloftheshadow: GitHub commit metadata and git show identify this account as author of the original thread-aware channels.modelByChannel resolver, reply-path wiring, and initial status tests. (role: introduced existing feature surface; confidence: high; commits: f555835b0974; files: src/channels/model-overrides.ts, src/auto-reply/reply/get-reply.ts, src/auto-reply/status.test.ts)
  • dutifulbob: Commit metadata for the shared session status runtime extraction points to this account as author of the status command layer now deriving auth and runtime metadata before the formatter. (role: status runtime contributor; confidence: medium; commits: 380de88a61de; files: src/status/status-text.ts)
  • osolmaz: The shared status runtime extraction credits this account as reviewer/co-author, and the broader open resolver tracker is authored by this account. (role: reviewer and canonical resolver requester; confidence: medium; commits: 380de88a61de; files: src/status/status-text.ts, src/status/status-message.ts)
  • xydigit-zt: Merged PR history shows this account authored the direct-user-id channels.modelByChannel resolver update that currently touches the same resolver and status call site. (role: recent adjacent area contributor; confidence: medium; commits: 9bf681d663e9; files: src/channels/model-overrides.ts, src/status/status-message.ts, docs/gateway/config-channels.md)
  • LiLan0125: Current blame for the status, reply, and resolver lines points to a broad recent carry-forward commit by this account, so they are relevant for current-main context even if not the original feature author. (role: recent area contributor; confidence: low; commits: 685b95b607bb; files: src/status/status-message.ts, src/status/status-text.ts, src/auto-reply/reply/get-reply.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (1 earlier review cycle)
  • reviewed 2026-06-22T02:46:44.508Z sha 70bab53 :: needs real behavior proof before merge. :: [P2] Resolve channel auth before rendering the override model

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. mantis: telegram-visible-proof Mantis should capture Telegram visible proof. P2 Normal backlog priority with limited blast radius. labels Jun 2, 2026
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. label Jun 19, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added stale Marked as stale due to inactivity triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. and removed stale Marked as stale due to inactivity labels Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mantis: telegram-visible-proof Mantis should capture Telegram visible proof. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: /status does not show effective model from channels.modelByChannel

2 participants