

























@@ -12,7 +12,7 @@ import {
12121313const { createSessionStoreDir, openClient } = setupGatewaySessionsTestHarness();
141415-test("sessions.list surfaces transcript usage and model fallbacks from the transcript", async () => {
15+test("sessions.list keeps bulk rows lightweight and uses persisted model fields", async () => {
1616const { dir } = await createSessionStoreDir();
1717testState.agentConfig = {
1818models: {
@@ -92,10 +92,10 @@ test("sessions.list surfaces transcript usage and model fallbacks from the trans
9292);
9393expect(parent?.childSessions).toEqual(["agent:main:dashboard:child"]);
9494expect(child?.parentSessionKey).toBe("agent:main:main");
95-expect(child?.totalTokens).toBe(3_000);
96-expect(child?.totalTokensFresh).toBe(true);
97-expect(child?.contextTokens).toBe(1_048_576);
98-expect(child?.estimatedCostUsd).toBe(0.0042);
95+expect(child?.totalTokens).toBeUndefined();
96+expect(child?.totalTokensFresh).toBe(false);
97+expect(child?.contextTokens).toBeUndefined();
98+expect(child?.estimatedCostUsd).toBeUndefined();
9999expect(child?.modelProvider).toBe("anthropic");
100100expect(child?.model).toBe("claude-sonnet-4-6");
101101@@ -146,10 +146,14 @@ test("sessions.list uses the gateway model catalog for effective thinking defaul
146146expect(respond).toHaveBeenCalledWith(
147147true,
148148expect.objectContaining({
149+defaults: expect.objectContaining({
150+thinkingDefault: "medium",
151+}),
149152sessions: expect.arrayContaining([
150153expect.objectContaining({
151154key: "agent:main:main",
152-thinkingDefault: "medium",
155+thinkingDefault: undefined,
156+thinkingOptions: [],
153157}),
154158]),
155159}),
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。