Repository navigation
Conversation
Greptile SummaryThis PR fixes Key observations:
Confidence Score: 5/5
Last reviewed commit: "Agents: show runtime..." |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48959d6c8c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| @@ -419,7 +435,7 @@ export function createSessionStatusTool(opts?: { | |||
| : `🕒 Time zone: ${userTimezone}`; | |||
|
|
|||
| const agentDefaults = cfg.agents?.defaults ?? {}; | |||
| const defaultLabel = `${configured.provider}/${configured.model}`; | |||
| const defaultLabel = `${providerForCard}/${modelForCard}`; | |||
There was a problem hiding this comment.
Preserve selected model to keep fallback status visible
Setting defaultLabel to providerForCard/modelForCard makes the selected model equal the runtime model whenever a session has entry.model but no per-session override. In buildStatusMessage, fallback visibility is computed from selected-vs-active model mismatch plus fallbackNotice* state, so this change suppresses the ↪️ Fallback: line for active fallback sessions (the selected model is no longer the configured default). This regresses debugging for real fallback scenarios where the session is still running a non-selected model.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in a40015f87. The status card now keeps selected-model semantics for fallback detection and only uses a display-only runtime model when there is no active fallback state, so the fallback line remains visible. Added regression coverage in src/auto-reply/status.test.ts and src/agents/openclaw-tools.session-status.test.ts.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a40015f87d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const providerForCard = resolvedCardModel.provider?.trim() || configured.provider; | ||
| const modelForCard = resolvedCardModel.model.trim(); | ||
| const usageProvider = resolveUsageProviderId(providerForCard); |
There was a problem hiding this comment.
Preserve unknown runtime provider in session status
When resolveSessionModelIdentityRef(...) returns only a model (for legacy entries where entry.modelProvider is missing/ambiguous), this fallback injects configured.provider, so status can emit synthetic refs like openai/claude-sonnet-4-6 and then resolve auth/usage against the wrong provider. In the new runtime-model display path this becomes user-visible misinformation; provider should remain unset in this branch instead of defaulting to the configured provider.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d16c9c390e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const defaultProviderForCard = hasExplicitModelOverride || preserveFallbackStatus | ||
| ? configured.provider | ||
| : (runtimeProviderForCard ?? ""); | ||
| const defaultModelForCard = hasExplicitModelOverride | ||
| const defaultModelForCard = hasExplicitModelOverride || preserveFallbackStatus | ||
| ? configured.model |
There was a problem hiding this comment.
Use fallback-selected model instead of global default
Fresh evidence: the new preserveFallbackStatus branch hardcodes configured.provider/configured.model whenever fallback notice fields are present. That only works when the selected model is the global default; for sessions selected through channel/group routing (no explicit modelOverride persisted), fallbackNoticeSelectedModel can differ, so fallback matching in buildStatusMessage fails and session_status shows the wrong model/provider and hides the fallback line. Preserve the selected model from the stored fallback-selected ref rather than forcing the global default here.
Useful? React with 👍 / 👎.
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: merged #55425 already shipped the original persisted-runtime-model So I’m closing this here and keeping the remaining discussion on the canonical linked item. Review detailsBest possible solution: Keep the shipped #55425 behavior for the original symptom and pursue the selected/default-versus-active runtime display in #42690 or an equivalent current-main replacement targeting Do we have a high-confidence way to reproduce the issue? Yes. The PR defect has a high-confidence static reproduction: use fallback notice fields from a channel/group-selected route that differs from the global default, then the branch passes the wrong selected ref and fallback matching fails. Is this the best way to solve the issue? No. The branch is not the best fix because it edits stale status surfaces and couples fallback preservation to global defaults; the maintainable fix is a current Security review: Security review cleared: The diff is limited to status rendering and tests and does not alter secrets, workflows, dependencies, install scripts, package metadata, or code execution paths. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 62b20e7fa2ed. |
|
Codex review: needs changes before merge. What this changes: This PR changes Required change before merge: This is a narrow replacement candidate: the remaining defect is localized to status display semantics and tests, but the source PR is stale and should be translated to the current Review detailsBest possible solution: Land a focused current-main replacement that keeps ordinary runtime model display, separates display-only runtime identity from selected-model semantics in the Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against acae48b790fa. |
Summary
session_statusshowed the configured default model even when the session store already recorded a different runtime model.session_statusdisagreed withopenclaw sessions.session_statusnow resolves its main model line from the runtime session model when no explicit per-session override is set, and the regression test covers that case.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
session_statusnow shows the runtime session model on the🧠 Model:line when the session store has a persisted runtime model and there is no explicit per-session model override.Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation:Repro + Verification
Environment
session_statusopenai-codex/gpt-5.4, session store runtime modelanthropic/claude-opus-4-6Steps
session_statusfor that session.🧠 Model:line.Expected
🧠 Model:line matches the runtime model stored on the session entry.Actual
session_statusshowed the configured default model.session_statusshows the persisted runtime session model unless an explicit per-session override exists.Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
anthropic/claude-opus-4-6wins over defaultopenai-codex/gpt-5.4.modelOverridestill remains higher priority than runtime fallback; usage provider lookup now follows the same selected provider as the card.pnpm test -- src/agents/openclaw-tools.session-status.test.tsstarted Vitest but hung before process exit, so I did not get a clean local wrapper completion signal even though the regression test was added.Review Conversations
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoFailure Recovery (if this breaks)
48959d6c8src/agents/tools/session-status-tool.ts,src/agents/openclaw-tools.session-status.test.tssession_statusshowing the wrong model when runtime model and default model differ.Risks and Mitigations
resolveSessionModelIdentityRef(...)helper that already backs other session model displays.