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

推荐订阅源

人人都是产品经理
人人都是产品经理
有赞技术团队
有赞技术团队
WordPress大学
WordPress大学
月光博客
月光博客
T
Tailwind CSS Blog
阮一峰的网络日志
阮一峰的网络日志
小众软件
小众软件
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Last Week in AI
Last Week in AI
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
罗磊的独立博客
Jina AI
Jina AI
酷 壳 – CoolShell
酷 壳 – CoolShell
宝玉的分享
宝玉的分享
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 三生石上(FineUI控件)
量子位
雷峰网
雷峰网
Apple Machine Learning Research
Apple Machine Learning Research
美团技术团队
博客园 - 聂微东
V
V2EX

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
fix: show active model in session status · openclaw/openc...
steipete · 2026-05-08 · via Recent Commits to openclaw:main

@@ -384,10 +384,15 @@ function expectSpawnedSessionLookupCalls(spawnedBy: string) {

384384

expect(callGatewayMock).toHaveBeenNthCalledWith(2, expectedCall);

385385

}

386386387-

function getSessionStatusTool(agentSessionKey = "main", options?: { sandboxed?: boolean }) {

387+

function getSessionStatusTool(

388+

agentSessionKey = "main",

389+

options?: { sandboxed?: boolean; activeModelProvider?: string; activeModelId?: string },

390+

) {

388391

const tool = createSessionStatusTool({

389392

agentSessionKey,

390393

sandboxed: options?.sandboxed,

394+

activeModelProvider: options?.activeModelProvider,

395+

activeModelId: options?.activeModelId,

391396

config: mockConfig as never,

392397

});

393398

expect(tool.name).toBe("session_status");

@@ -661,6 +666,51 @@ describe("session_status tool", () => {

661666

expect(details.sessionKey).toBe("agent:main:current");

662667

});

663668669+

it("does not apply the active run model to a literal current session key", async () => {

670+

resetSessionStore({

671+

main: {

672+

sessionId: "s-main",

673+

updatedAt: 10,

674+

},

675+

"agent:main:current": {

676+

sessionId: "s-current",

677+

updatedAt: 20,

678+

providerOverride: "anthropic",

679+

modelOverride: "claude-sonnet-4-6",

680+

},

681+

});

682+683+

const tool = getSessionStatusTool("main", {

684+

activeModelProvider: "openai-codex",

685+

activeModelId: "gpt-5.2",

686+

});

687+688+

const result = await tool.execute("call-current-literal-key-active-model", {

689+

sessionKey: "current",

690+

});

691+

const details = result.details as { ok?: boolean; sessionKey?: string };

692+

expect(details.ok).toBe(true);

693+

expect(details.sessionKey).toBe("agent:main:current");

694+695+

expect(buildStatusMessageMock).toHaveBeenCalledWith(

696+

expect.objectContaining({

697+

sessionEntry: expect.objectContaining({

698+

providerOverride: "anthropic",

699+

modelOverride: "claude-sonnet-4-6",

700+

}),

701+

}),

702+

);

703+

expect(buildStatusMessageMock).not.toHaveBeenCalledWith(

704+

expect.objectContaining({

705+

agent: expect.objectContaining({

706+

model: expect.objectContaining({

707+

primary: "openai-codex/gpt-5.2",

708+

}),

709+

}),

710+

}),

711+

);

712+

});

713+664714

it("resolves sessionKey=current for a channel-plugin requester via implicit fallback", async () => {

665715

resetSessionStore({});

666716

@@ -710,6 +760,121 @@ describe("session_status tool", () => {

710760

expect(details.statusText).toContain("🧠 Model:");

711761

});

712762763+

it("renders the active run model for semantic current lookups", async () => {

764+

resetSessionStore({

765+

"agent:main:scope:scopy:direct:scopy": {

766+

sessionId: "current-active-model",

767+

updatedAt: 10,

768+

},

769+

});

770+771+

const tool = getSessionStatusTool("agent:main:scope:scopy:direct:scopy", {

772+

activeModelProvider: "openai-codex",

773+

activeModelId: "gpt-5.2",

774+

});

775+776+

await tool.execute("call-current-active-model", { sessionKey: "current" });

777+778+

expect(buildStatusMessageMock).toHaveBeenCalledWith(

779+

expect.objectContaining({

780+

agent: expect.objectContaining({

781+

model: expect.objectContaining({

782+

primary: "openai-codex/gpt-5.2",

783+

}),

784+

}),

785+

}),

786+

);

787+

});

788+789+

it("renders the active run model for omitted sessionKey lookups", async () => {

790+

resetSessionStore({

791+

"agent:main:scope:scopy:direct:scopy": {

792+

sessionId: "implicit-current-active-model",

793+

updatedAt: 10,

794+

},

795+

});

796+797+

const tool = getSessionStatusTool("agent:main:scope:scopy:direct:scopy", {

798+

activeModelProvider: "openai-codex",

799+

activeModelId: "gpt-5.2",

800+

});

801+802+

await tool.execute("call-implicit-current-active-model", {});

803+804+

expect(buildStatusMessageMock).toHaveBeenCalledWith(

805+

expect.objectContaining({

806+

agent: expect.objectContaining({

807+

model: expect.objectContaining({

808+

primary: "openai-codex/gpt-5.2",

809+

}),

810+

}),

811+

}),

812+

);

813+

});

814+815+

it("renders the active run model for current lookups with persisted overrides", async () => {

816+

resetSessionStore({

817+

"agent:main:scope:scopy:direct:scopy": {

818+

sessionId: "current-active-model-with-override",

819+

updatedAt: 10,

820+

providerOverride: "anthropic",

821+

modelOverride: "claude-sonnet-4-6",

822+

},

823+

});

824+825+

const tool = getSessionStatusTool("agent:main:scope:scopy:direct:scopy", {

826+

activeModelProvider: "openai-codex",

827+

activeModelId: "gpt-5.2",

828+

});

829+830+

await tool.execute("call-current-active-model-with-override", { sessionKey: "current" });

831+832+

expect(buildStatusMessageMock).toHaveBeenCalledWith(

833+

expect.objectContaining({

834+

sessionEntry: expect.not.objectContaining({

835+

providerOverride: expect.any(String),

836+

modelOverride: expect.any(String),

837+

}),

838+

agent: expect.objectContaining({

839+

model: expect.objectContaining({

840+

primary: "openai-codex/gpt-5.2",

841+

}),

842+

}),

843+

}),

844+

);

845+

});

846+847+

it("does not reuse the active run model after a semantic current reset", async () => {

848+

resetSessionStore({

849+

"agent:main:scope:scopy:direct:scopy": {

850+

sessionId: "current-reset-model",

851+

updatedAt: 10,

852+

providerOverride: "openai-codex",

853+

modelOverride: "gpt-5.2",

854+

},

855+

});

856+857+

const tool = getSessionStatusTool("agent:main:scope:scopy:direct:scopy", {

858+

activeModelProvider: "openai-codex",

859+

activeModelId: "gpt-5.2",

860+

});

861+862+

await tool.execute("call-current-reset-model", {

863+

sessionKey: "current",

864+

model: "default",

865+

});

866+867+

expect(buildStatusMessageMock).toHaveBeenCalledWith(

868+

expect.objectContaining({

869+

agent: expect.objectContaining({

870+

model: expect.objectContaining({

871+

primary: "openai/gpt-5.4",

872+

}),

873+

}),

874+

}),

875+

);

876+

});

877+713878

it("materializes a valid persisted session entry when implicit current fallback mutates model state", async () => {

714879

resetSessionStore({});

715880