惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
小众软件
小众软件
S
SegmentFault 最新的问题
人人都是产品经理
人人都是产品经理
博客园 - 【当耐特】
博客园 - 三生石上(FineUI控件)
C
Check Point Blog
S
Schneier on Security
Microsoft Azure Blog
Microsoft Azure Blog
N
Netflix TechBlog - Medium
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
罗磊的独立博客
有赞技术团队
有赞技术团队
V
V2EX
Y
Y Combinator Blog
博客园 - 叶小钗
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
F
Fortinet All Blogs
W
WeLiveSecurity
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Stack Overflow Blog
Stack Overflow Blog
The Cloudflare Blog
S
Security @ Cisco Blogs
TaoSecurity Blog
TaoSecurity Blog
MyScale Blog
MyScale Blog
Hugging Face - Blog
Hugging Face - Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
www.infosecurity-magazine.com
www.infosecurity-magazine.com
PCI Perspectives
PCI Perspectives
H
Heimdal Security Blog
Schneier on Security
Schneier on Security
Security Latest
Security Latest
AWS News Blog
AWS News Blog
月光博客
月光博客
Security Archives - TechRepublic
Security Archives - TechRepublic
Recent Announcements
Recent Announcements
Google DeepMind News
Google DeepMind News
博客园 - Franky
Cisco Talos Blog
Cisco Talos Blog
T
Threat Research - Cisco Blogs
M
MIT News - Artificial intelligence
T
Troy Hunt's Blog
N
News and Events Feed by Topic
Cloudbric
Cloudbric
Scott Helme
Scott Helme
云风的 BLOG
云风的 BLOG
Attack and Defense Labs
Attack and Defense Labs

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4 test: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
fix(status): treat CLI runtime aliases as selected route · openclaw/openclaw@2bdbec8
brokemac79 · 2026-05-10 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -286,6 +286,7 @@ Docs: https://docs.openclaw.ai

286286

- Installer: when npm installs `openclaw` outside the parent shell PATH, print follow-up commands with the resolved binary path instead of telling users to run `openclaw` from a shell that will report `command not found`. Fixes #72382. Thanks @jbob762.

287287

- Plugins/runtime: share MIME and JSON Schema helpers across bundled plugins while preserving canonical media MIME inference, browser URL wildcard semantics, migration home-path resolution, QA request-limit responses, and extensionless text file previews.

288288

- Agents/memory flush: persist the pre-increment compaction counter after flush-triggered compaction so consecutive eligible compaction cycles run memoryFlush instead of alternating. Fixes #12590. Refs #12760, #26145, and #46513. Thanks @Kaspre, @lailoo, @drvoss, @Br1an67, and @dial481.

289+

- Status: treat CLI runtime aliases such as `claude-cli/<model>` as the canonical selected provider route in `/status`, avoiding spurious fallback/unknown-auth display and preserving fresh context usage from CLI usage snapshots. Fixes #79015. Thanks @ItsThierry.

289290

- Compute plugin callback authorization dynamically [AI]. (#78866) Thanks @pgondhi987.

290291

- Gateway/auth: allow `gateway.auth.mode: "none"` loopback backend RPC clients to skip device identity only for local non-browser backend connections, restoring subagent spawns and gateway tools without opening remote or browser-origin bypasses. Fixes #75780. Thanks @yozakura-ava.

291292

- Canvas plugin: keep legacy root `canvasHost` configs valid until `openclaw doctor --fix` migrates them into `plugins.entries.canvas.config.host`, move Canvas/A2UI clients to gateway protocol v4 plugin surfaces, and refresh the generated A2UI bundle hash so normal builds stay clean.

Original file line numberDiff line numberDiff line change

@@ -97,6 +97,28 @@ export function isCliRuntimeAlias(runtime: string | undefined): boolean {

9797

return normalized ? CLI_RUNTIME_ALIASES.has(normalizeProviderId(normalized)) : false;

9898

}

9999
100+

function canonicalizeRuntimeAliasProvider(provider: string): string {

101+

return resolveLegacyRuntimeModelProviderAlias(provider)?.provider ?? provider;

102+

}

103+
104+

function normalizeRuntimeModelRefForComparison(raw: string): string {

105+

const trimmed = raw.trim();

106+

const slash = trimmed.indexOf("/");

107+

if (slash <= 0 || slash >= trimmed.length - 1) {

108+

return normalizeProviderId(canonicalizeRuntimeAliasProvider(trimmed));

109+

}

110+

const provider = trimmed.slice(0, slash).trim();

111+

const model = trimmed.slice(slash + 1).trim();

112+

const canonicalProvider = normalizeProviderId(canonicalizeRuntimeAliasProvider(provider));

113+

return model ? `${canonicalProvider}/${model}` : canonicalProvider;

114+

}

115+
116+

export function areRuntimeModelRefsEquivalent(left: string, right: string): boolean {

117+

return (

118+

normalizeRuntimeModelRefForComparison(left) === normalizeRuntimeModelRefForComparison(right)

119+

);

120+

}

121+
100122

function resolveConfiguredRuntime(params: {

101123

cfg?: OpenClawConfig;

102124

provider: string;

Original file line numberDiff line numberDiff line change

@@ -1,5 +1,6 @@

11

import { describe, expect, it } from "vitest";

22

import {

3+

buildFallbackNotice,

34

resolveActiveFallbackState,

45

resolveFallbackTransition,

56

type FallbackNoticeState,

@@ -120,4 +121,37 @@ describe("fallback-state", () => {

120121

expect(resolved.nextState.activeModel).toBeUndefined();

121122

expect(resolved.nextState.reason).toBeUndefined();

122123

});

124+
125+

it("does not treat a CLI runtime alias as a model fallback", () => {

126+

const resolved = resolveFallbackTransition({

127+

selectedProvider: "anthropic",

128+

selectedModel: "claude-opus-4-7",

129+

activeProvider: "claude-cli",

130+

activeModel: "claude-opus-4-7",

131+

attempts: [],

132+

state: {

133+

fallbackNoticeSelectedModel: "anthropic/claude-opus-4-7",

134+

fallbackNoticeActiveModel: "claude-cli/claude-opus-4-7",

135+

fallbackNoticeReason: "selected model unavailable",

136+

},

137+

});

138+
139+

expect(resolved.fallbackActive).toBe(false);

140+

expect(resolved.fallbackCleared).toBe(false);

141+

expect(resolved.stateChanged).toBe(true);

142+

expect(resolved.nextState.selectedModel).toBeUndefined();

143+

expect(resolved.nextState.activeModel).toBeUndefined();

144+

});

145+
146+

it("does not build a fallback notice for equivalent CLI runtime aliases", () => {

147+

expect(

148+

buildFallbackNotice({

149+

selectedProvider: "anthropic",

150+

selectedModel: "claude-opus-4-7",

151+

activeProvider: "claude-cli",

152+

activeModel: "claude-opus-4-7",

153+

attempts: [],

154+

}),

155+

).toBeNull();

156+

});

123157

});

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

import { areRuntimeModelRefsEquivalent } from "../agents/model-runtime-aliases.js";

12

import { formatRawAssistantErrorForUi } from "../agents/pi-embedded-helpers.js";

23

import { normalizeOptionalString } from "../shared/string-coerce.js";

34

import type { FallbackNoticeState } from "../status/fallback-notice-state.js";

@@ -96,7 +97,7 @@ export function buildFallbackNotice(params: {

9697

}): string | null {

9798

const selected = formatProviderModelRef(params.selectedProvider, params.selectedModel);

9899

const active = formatProviderModelRef(params.activeProvider, params.activeModel);

99-

if (selected === active) {

100+

if (areRuntimeModelRefsEquivalent(selected, active)) {

100101

return null;

101102

}

102103

const reasonSummary = buildFallbackReasonSummary(params.attempts);

@@ -152,13 +153,17 @@ export function resolveFallbackTransition(params: {

152153

activeModel: normalizeOptionalString(params.state?.fallbackNoticeActiveModel),

153154

reason: normalizeOptionalString(params.state?.fallbackNoticeReason),

154155

};

155-

const fallbackActive = selectedModelRef !== activeModelRef;

156+

const fallbackActive = !areRuntimeModelRefsEquivalent(selectedModelRef, activeModelRef);

156157

const fallbackTransitioned =

157158

fallbackActive &&

158159

(previousState.selectedModel !== selectedModelRef ||

159160

previousState.activeModel !== activeModelRef);

160-

const fallbackCleared =

161-

!fallbackActive && Boolean(previousState.selectedModel || previousState.activeModel);

161+

const previousStateWasRealFallback = Boolean(

162+

previousState.selectedModel &&

163+

previousState.activeModel &&

164+

!areRuntimeModelRefsEquivalent(previousState.selectedModel, previousState.activeModel),

165+

);

166+

const fallbackCleared = !fallbackActive && previousStateWasRealFallback;

162167

const reasonSummary = buildFallbackReasonSummary(params.attempts);

163168

const attemptSummaries = buildFallbackAttemptSummaries(params.attempts);

164169

const nextState = fallbackActive

Original file line numberDiff line numberDiff line change

@@ -1163,6 +1163,62 @@ describe("runReplyAgent typing (heartbeat)", () => {

11631163

}

11641164

});

11651165
1166+

it("does not persist fallback state for an equivalent CLI runtime alias", async () => {

1167+

const sessionEntry: SessionEntry = {

1168+

sessionId: "session",

1169+

updatedAt: Date.now(),

1170+

fallbackNoticeSelectedModel: "anthropic/claude-opus-4-7",

1171+

fallbackNoticeActiveModel: "claude-cli/claude-opus-4-7",

1172+

fallbackNoticeReason: "selected model unavailable",

1173+

};

1174+

const sessionStore = { main: sessionEntry };

1175+

const dir = await mkdtemp(join(tmpdir(), "openclaw-agent-runner-cli-alias-"));

1176+

const storePath = join(dir, "sessions.json");

1177+

await writeFile(storePath, JSON.stringify({ main: sessionEntry }), "utf8");

1178+
1179+

state.runEmbeddedPiAgentMock.mockResolvedValue({

1180+

payloads: [{ text: "final" }],

1181+

meta: {

1182+

agentMeta: {

1183+

provider: "claude-cli",

1184+

model: "claude-opus-4-7",

1185+

usage: { input: 36_000, output: 19_000 },

1186+

},

1187+

},

1188+

});

1189+
1190+

const { run } = createMinimalRun({

1191+

sessionEntry,

1192+

sessionStore,

1193+

sessionKey: "main",

1194+

storePath,

1195+

runOverrides: {

1196+

provider: "anthropic",

1197+

model: "claude-opus-4-7",

1198+

config: {

1199+

agents: {

1200+

defaults: {

1201+

cliBackends: {

1202+

"claude-cli": { command: "claude" },

1203+

},

1204+

},

1205+

},

1206+

},

1207+

},

1208+

});

1209+

await run();

1210+
1211+

const stored = JSON.parse(await readFile(storePath, "utf8")).main as SessionEntry;

1212+

expect(sessionEntry.fallbackNoticeSelectedModel).toBeUndefined();

1213+

expect(sessionEntry.fallbackNoticeActiveModel).toBeUndefined();

1214+

expect(stored.fallbackNoticeSelectedModel).toBeUndefined();

1215+

expect(stored.fallbackNoticeActiveModel).toBeUndefined();

1216+

expect(stored.modelProvider).toBe("claude-cli");

1217+

expect(stored.model).toBe("claude-opus-4-7");

1218+

expect(stored.totalTokens).toBe(36_000);

1219+

expect(stored.totalTokensFresh).toBe(true);

1220+

});

1221+
11661222

it("surfaces overflow fallback when embedded run returns empty payloads", async () => {

11671223

state.runEmbeddedPiAgentMock.mockImplementationOnce(async () => ({

11681224

payloads: [],

Original file line numberDiff line numberDiff line change

@@ -1416,10 +1416,11 @@ export async function runReplyAgent(params: {

14161416

});

14171417

}

14181418

}

1419-

const cliSessionId = isCliProvider(providerUsed, cfg)

1419+

const usedCliProvider = isCliProvider(providerUsed, cfg);

1420+

const cliSessionId = usedCliProvider

14201421

? normalizeOptionalString(runResult.meta?.agentMeta?.sessionId)

14211422

: undefined;

1422-

const cliSessionBinding = isCliProvider(providerUsed, cfg)

1423+

const cliSessionBinding = usedCliProvider

14231424

? runResult.meta?.agentMeta?.cliSessionBinding

14241425

: undefined;

14251426

const runtimeContextTokens =

@@ -1447,6 +1448,7 @@ export async function runReplyAgent(params: {

14471448

usage,

14481449

lastCallUsage: runResult.meta?.agentMeta?.lastCallUsage,

14491450

promptTokens,

1451+

usageIsContextSnapshot: usedCliProvider ? true : undefined,

14501452

modelUsed,

14511453

providerUsed,

14521454

contextTokensUsed,

Original file line numberDiff line numberDiff line change

@@ -774,6 +774,43 @@ describe("buildStatusMessage", () => {

774774

expect(normalized).not.toContain("Context: 49k/1.0m");

775775

});

776776
777+

it("renders CLI runtime aliases as the selected model route", () => {

778+

const text = buildStatusMessage({

779+

agent: {

780+

model: "anthropic/claude-opus-4-7",

781+

},

782+

sessionEntry: {

783+

sessionId: "claude-cli-runtime-alias",

784+

updatedAt: 0,

785+

providerOverride: "anthropic",

786+

modelOverride: "claude-opus-4-7",

787+

modelProvider: "claude-cli",

788+

model: "claude-opus-4-7",

789+

fallbackNoticeSelectedModel: "anthropic/claude-opus-4-7",

790+

fallbackNoticeActiveModel: "claude-cli/claude-opus-4-7",

791+

fallbackNoticeReason: "selected model unavailable",

792+

inputTokens: 29,

793+

outputTokens: 19_000,

794+

cacheRead: 3_000_000,

795+

totalTokens: 36_000,

796+

totalTokensFresh: true,

797+

contextTokens: 1_000_000,

798+

},

799+

sessionKey: "agent:main:main",

800+

sessionScope: "per-sender",

801+

queue: { mode: "collect", depth: 0 },

802+

modelAuth: "unknown",

803+

activeModelAuth: "oauth (anthropic:claude-cli)",

804+

});

805+
806+

const normalized = normalizeTestText(text);

807+

expect(normalized).toContain("Model: anthropic/claude-opus-4-7");

808+

expect(normalized).toContain("oauth (anthropic:claude-cli)");

809+

expect(normalized).not.toContain("Fallback: claude-cli/claude-opus-4-7");

810+

expect(normalized).not.toContain("unknown");

811+

expect(normalized).toContain("Context: 36k/1.0m (4%)");

812+

});

813+
777814

it("keeps an explicit runtime context limit when fallback status already computed one", () => {

778815

const text = buildStatusMessage({

779816

config: {

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

import { areRuntimeModelRefsEquivalent } from "../agents/model-runtime-aliases.js";

12

import type { SessionEntry } from "../config/sessions.js";

23

import { normalizeOptionalString } from "../shared/string-coerce.js";

34

@@ -15,7 +16,7 @@ export function resolveActiveFallbackState(params: {

1516

const active = normalizeOptionalString(params.state?.fallbackNoticeActiveModel);

1617

const reason = normalizeOptionalString(params.state?.fallbackNoticeReason);

1718

const fallbackActive =

18-

params.selectedModelRef !== params.activeModelRef &&

19+

!areRuntimeModelRefsEquivalent(params.selectedModelRef, params.activeModelRef) &&

1920

selected === params.selectedModelRef &&

2021

active === params.activeModelRef;

2122

return {

Original file line numberDiff line numberDiff line change

@@ -2,6 +2,7 @@ import fs from "node:fs";

22

import { resolveContextTokensForModel } from "../agents/context.js";

33

import { DEFAULT_CONTEXT_TOKENS, DEFAULT_MODEL, DEFAULT_PROVIDER } from "../agents/defaults.js";

44

import { resolveModelAuthMode } from "../agents/model-auth.js";

5+

import { areRuntimeModelRefsEquivalent } from "../agents/model-runtime-aliases.js";

56

import {

67

buildModelAliasIndex,

78

resolveConfiguredModelRef,

@@ -849,17 +850,25 @@ export function buildStatusMessage(args: StatusArgs): string {

849850

];

850851

const activationLine = activationParts.filter(Boolean).join(" · ");

851852
853+

const selectedModelLabel = modelRefs.selected.label || "unknown";

854+

const runtimeAliasModelEquivalent = areRuntimeModelRefsEquivalent(

855+

selectedModelLabel,

856+

activeModelLabel,

857+

);

852858

const selectedAuthMode =

853859

normalizeAuthMode(args.modelAuth) ?? resolveModelAuthMode(selectedProvider, args.config);

854-

const selectedAuthLabelValue =

855-

args.modelAuth ??

856-

(selectedAuthMode && selectedAuthMode !== "unknown" ? selectedAuthMode : undefined);

860+

const rawSelectedAuthLabelValue =

861+

selectedAuthMode && selectedAuthMode !== "unknown"

862+

? (args.modelAuth ?? selectedAuthMode)

863+

: undefined;

857864

const activeAuthMode =

858865

normalizeAuthMode(args.activeModelAuth) ?? resolveModelAuthMode(activeProvider, args.config);

859866

const activeAuthLabelValue =

860-

args.activeModelAuth ??

861-

(activeAuthMode && activeAuthMode !== "unknown" ? activeAuthMode : undefined);

862-

const selectedModelLabel = modelRefs.selected.label || "unknown";

867+

activeAuthMode && activeAuthMode !== "unknown"

868+

? (args.activeModelAuth ?? activeAuthMode)

869+

: undefined;

870+

const selectedAuthLabelValue =

871+

rawSelectedAuthLabelValue ?? (runtimeAliasModelEquivalent ? activeAuthLabelValue : undefined);

863872

const fallbackState = resolveActiveFallbackState({

864873

selectedModelRef: selectedModelLabel,

865874

activeModelRef: activeModelLabel,

Original file line numberDiff line numberDiff line change

@@ -10,6 +10,7 @@ import {

1010

import { resolveContextTokensForModel } from "../agents/context.js";

1111

import { resolveFastModeState } from "../agents/fast-mode.js";

1212

import { resolveModelAuthLabel } from "../agents/model-auth-label.js";

13+

import { areRuntimeModelRefsEquivalent } from "../agents/model-runtime-aliases.js";

1314

import {

1415

resolveInternalSessionKey,

1516

resolveMainSessionAlias,

@@ -238,7 +239,7 @@ export async function buildStatusText(params: BuildStatusTextParams): Promise<st

238239

provider: activeProvider,

239240

effectiveHarness,

240241

});

241-

const selectedModelAuth = Object.hasOwn(params, "modelAuthOverride")

242+

let selectedModelAuth = Object.hasOwn(params, "modelAuthOverride")

242243

? params.modelAuthOverride

243244

: resolveModelAuthLabel({

244245

provider: selectedStatusProvider,

@@ -260,6 +261,18 @@ export async function buildStatusText(params: BuildStatusTextParams): Promise<st

260261

includeExternalProfiles: false,

261262

})

262263

: selectedModelAuth;

264+

const runtimeAliasModelEquivalent = areRuntimeModelRefsEquivalent(

265+

modelRefs.selected.label,

266+

modelRefs.active.label,

267+

);

268+

if (

269+

runtimeAliasModelEquivalent &&

270+

normalizeOptionalLowercaseString(selectedModelAuth) === "unknown" &&

271+

activeModelAuth &&

272+

normalizeOptionalLowercaseString(activeModelAuth) !== "unknown"

273+

) {

274+

selectedModelAuth = activeModelAuth;

275+

}

263276

const usageAuthLabel = modelRefs.activeDiffers ? activeModelAuth : selectedModelAuth;

264277

const currentUsageProvider =

265278

resolveUsageProviderId(activeStatusProvider) ?? resolveUsageProviderId(activeProvider);