chore: Fix types in tests 43/N.

This commit is contained in:
cpojer
2026-02-17 15:48:44 +09:00
parent 7d2ef131c1
commit 688f86bf28
18 changed files with 81 additions and 84 deletions

View File

@@ -119,7 +119,7 @@ describe("computeAdaptiveChunkRatio", () => {
role: "assistant",
content: [{ type: "text", text: "y".repeat(1000) }],
timestamp: Date.now(),
},
} as unknown as AgentMessage,
];
const ratio = computeAdaptiveChunkRatio(messages, CONTEXT_WINDOW);
@@ -134,7 +134,7 @@ describe("computeAdaptiveChunkRatio", () => {
role: "assistant",
content: [{ type: "text", text: "y".repeat(50_000 * 4) }],
timestamp: Date.now(),
},
} as unknown as AgentMessage,
];
const ratio = computeAdaptiveChunkRatio(messages, CONTEXT_WINDOW);

View File

@@ -68,7 +68,14 @@ function makeAssistant(text: string): AgentMessage {
api: "openai-responses",
provider: "openai",
model: "fake",
usage: { input: 1, output: 1, cacheRead: 0, cacheWrite: 0, total: 2 },
usage: {
input: 1,
output: 1,
cacheRead: 0,
cacheWrite: 0,
totalTokens: 2,
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 },
},
stopReason: "stop",
timestamp: Date.now(),
};