From 58ee283658dce71d41f6730df937a97c3018991a Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sat, 4 Apr 2026 05:02:14 +0900 Subject: [PATCH] test(providers): fix anthropic payload test typing --- src/agents/anthropic-payload-policy.test.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/agents/anthropic-payload-policy.test.ts b/src/agents/anthropic-payload-policy.test.ts index fc47603a05b..5e7d3dd1afc 100644 --- a/src/agents/anthropic-payload-policy.test.ts +++ b/src/agents/anthropic-payload-policy.test.ts @@ -4,6 +4,12 @@ import { resolveAnthropicPayloadPolicy, } from "./anthropic-payload-policy.js"; +type TestPayload = { + messages: Array<{ role: string; content: unknown }>; + service_tier?: string; + system?: unknown; +}; + describe("anthropic payload policy", () => { it("applies native Anthropic service tier and cache markers without widening cache scope", () => { const policy = resolveAnthropicPayloadPolicy({ @@ -14,7 +20,7 @@ describe("anthropic payload policy", () => { enableCacheControl: true, serviceTier: "standard_only", }); - const payload: Record = { + const payload: TestPayload = { system: [ { type: "text", text: "Follow policy." }, { type: "text", text: "Use tools carefully." }, @@ -76,7 +82,7 @@ describe("anthropic payload policy", () => { enableCacheControl: true, serviceTier: "auto", }); - const payload: Record = { + const payload: TestPayload = { system: [{ type: "text", text: "Follow policy." }], messages: [{ role: "user", content: "Hello" }], };