






















@@ -398,12 +398,13 @@ describe("live model switch", () => {
398398399399describe("shouldSwitchToLiveModel", () => {
400400it("returns the persisted selection when liveModelSwitchPending is true and model differs", async () => {
401+const sessionEntry = {
402+liveModelSwitchPending: true,
403+providerOverride: "openai",
404+modelOverride: "gpt-5.4",
405+};
401406state.loadSessionStoreMock.mockReturnValue({
402-main: {
403-liveModelSwitchPending: true,
404-providerOverride: "openai",
405-modelOverride: "gpt-5.4",
406-},
407+main: sessionEntry,
407408});
408409409410const { shouldSwitchToLiveModel } = await loadModule();
@@ -431,15 +432,20 @@ describe("live model switch", () => {
431432const result = shouldSwitchToLiveModel(makeShouldSwitchParams());
432433433434expect(result).toBeUndefined();
435+expect(state.loadSessionStoreMock).toHaveBeenCalledWith("/tmp/session-store.json", {
436+skipCache: true,
437+clone: false,
438+});
434439});
435440436441it("returns undefined when liveModelSwitchPending is true but models match", async () => {
442+const sessionEntry = {
443+liveModelSwitchPending: true,
444+providerOverride: "anthropic",
445+modelOverride: "claude-opus-4-6",
446+};
437447state.loadSessionStoreMock.mockReturnValue({
438-main: {
439-liveModelSwitchPending: true,
440-providerOverride: "anthropic",
441-modelOverride: "claude-opus-4-6",
442-},
448+main: sessionEntry,
443449});
444450445451const { shouldSwitchToLiveModel } = await loadModule();
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。